Using the System Utilities | Contents | SCVs | Search | Glossary | Reports | Solutions | XML | Index | Working with Default Options (WDFT) |
Working with User Exit/Edit Point (WUEP)
Purpose: Use Work with User Exit/Edit Points to have the system call a user-defined program whenever a certain activity occurs within CWSerenade. This option enables you to insert your own program in a crucial area.
User exit points allow the system to pass parameters to an external program to obtain additional information whenever a certain activity occurs within CWSerenade. You might also set up a user exit point as a means of feeding information to an external accounting package, or a service bureau that maintains customer information.
The user exit point launches the external program defined in the implementation class field for the user exit point and extracts the information you need from CWSerenade tables; it knows where to look for the data based on the information passed by the calling program. Once the user-defined program completes, the system returns to normal processing.
Example: When you create a new customer, you can provide a “hook” to a user-defined program to obtain additional information to be used for activities such as setting up a house charge for the customer.
User edit points allow the system to pass a hash map of pre-defined values to an external program for validation whenever a certain activity occurs in the CWSerenade application and have the external program return a string response so that CWSerenade can display any data returned in the string as an error message on the CWSerenade screen from where the user edit point was called.
The user edit point launches the external program defined in the implementation class field for the user edit point and extracts the information you need from CWSerenade; it knows where to look for the data based on the information passed by the calling program.
The external program returns a string:
• If the returned string is null or blank, normal processing continues.
• If the returned string contains data, the system displays the first 78 characters of the data in the string as an error message on the CWSerenade screen from where the user edit point was called.
Example: After you enter information on the Work with Order screen, select the initial OK and perform the standard screen validation, you can send certain values on the screen to an external program for additional validation, such as requiring a purchase order number if the order type is a certain value.
Difference between user exit point and user edit point: Use a user exit point to call a user-defined program when you do not require information to be passed back to CWSerenade; use a user edit point when you want the user-defined program to return a string whose data you can display on a CWSerenade screen for further validation. The Calling function defines whether the function is a user exit point or user edit point. See User Exit Point Parameters and User Edit Point Parameters for a list of calling functions and the parameters they pass.
UEP log: Based on the user program defined for the user exit point or user edit point, the system writes information to the User Exit/Edit Point (UEP) Log.
In this topic:
• Work with User Exit/Edit Point Screen
• Create User Exit/Edit Point Screen
• Change User Exit/Edit Point Screen
For more information: The CWSerenade SDK (Software Development Kit) and its associated documentation is delivered upon request. Contact your project manager for more information.
Specific parameters will be passed from CWSerenade to your user program. When attaching a user program at an exit point, make sure that your program accepts the parameters identified below. See User Edit Point Parameters to review the parameters passed for each user edit point.
Important: All parameters, including numeric ones, are passed as alphanumeric
Parameters |
Table(s) to Access |
|
After creating a customer |
||
CSR0265 |
Company code (3 numeric) Customer # (9 numeric) Transaction type (A) (1 alphanumeric) |
Customer Sold To |
Before changing a customer's name and address or Mail or Rent flags through: • customer maintenance (WCST) • order entry or maintenance (OEOM, OIOM) • order API (only for a change to name or address) • customer API • customer sold-to merge/purge (MMCS) (only for a change to the Mail or Rent flags) • catalog requests (WCAT or WCRU) • MBS address changes (PACS) (only for a change to the Mail or Rent flags). To call this user exit point for a name and address change, any of the following must be updated: first name, middle initial, last name, street address, apartment, second through fourth address lines, city, state, or postal code. |
||
CSR0078 |
Company code (3 numeric) Customer # (9 numeric) Transaction type (C) (1 alphanumeric) Date (7 numeric; (CYYMMDD) Time (7 numeric; preceding 0 plus HHMMSS) Change type: • D if the customer’s Mail or Rent flags change • H if the customer’s name or address changes; see the note in the first column for more information |
Customer Sold To Customer Sold To Extended |
When you add or change an order detail line through: • order entry or maintenance (OEOM, OIOM) • process mass substitutions (PSUB) • generate membership orders (EGMO) • the order API |
||
ADDCHGODT |
Company code (3 numeric) Order # (8 numeric) Order ship-to # (3 numeric) Order detail sequence # (5 numeric) Add/change flag (1 numeric) |
Order Entry Order Maintenance |
When you accept the entry or update of an order through: • selecting Accept to accept an order or selecting Add Recipient to accept the order and add a recipient order in order entry and maintenance (OEOM/OIOM) • process auto sold out cancellations (MASO) • process mass substitutions (PSUB) • generate membership orders (EGMO) • process backorders pending cancellation (WBPC) • select Accept to accept an order batch of phone or web orders (OEOM) • create an order through the order API |
||
OEACCEPT |
Return code (7 alphanumeric) Company code (3 numeric) Order # (9 numeric) Order ship-to# (3 numeric) Program mode (E entry, M maintenance) (1 alphanumeric)
These programs are called during program mode E (entry): accept an order or accept an order and add a recipient in order entry or maintenance (OEOM/OIOM) generate membership orders (EGMO) accept an order batch of phone or web orders (OEOM) apply a payment to an order through the order API |
Order Ship To Auto Soldout RI Price Change Member ship B/O Cancellation Pending |
|
These programs are called during program mode M (maintenance): process auto sold out cancellations (MASO) process mass substitutions (PSUB) process retail price changes (WRPC) process backorders pending cancellation (WBPC) accept an order or accept an order and add a recipient in order entry or maintenance (OEOM/OIOM) |
|
After the system updates the Pick Sort GH table during Pick Slip Generation (WSPS) |
||
AFTCRTPSGH |
Company code (3 numeric) Billing batch number (7 numeric) |
Pick Sort GH |
After pick slips are voided through Void Pick Batch (WSVP) or Void/Reprint Picks (WVRP) |
||
VOIDPICK |
Company code (3 numeric) Pick control number (7 numeric) |
Pick Control Header |
After pick slip generation (WSPS) is complete |
||
AFTPICKGEN |
Company code (3 numeric) Pick Control number (7 numeric) |
Pick Control Header |
Specific parameters will be passed from CWSerenade to your user program. When attaching a user program at an exit point or edit point, make sure that your program accepts the parameters identified below. See User Exit Point Parameters to review the parameters passed for each user exit point.
Important: All parameters, including numeric ones, are passed as alphanumeric
Calling Function |
Parameters |
Table(s) to Access |
When you select OK on the Work with Order screen after the data on the screen has been validated in: • order entry (OEOM), including batch order entry, but not business-to-business order entry • order maintenance (OEOM) |
||
EDOEHEAD |
COMPANY: company code (3 numeric) ORDER_TYPE: order type code (1 alphanumeric) SHIP_VIA: ship via code (2 numeric) CUST_CLASS: customer class code (2 alphanumeric) SALES_REP: sales representative number (7 numeric) SHIP_TO_NBR: ship to number (6 numeric) ORDER_NBR: order number (9 numeric) PO_NBR: purchase order number (15 alphanumeric)
The program returns a string: • If the returned string is null or blank, normal processing continues. • If the returned string contains data, the system displays the first 78 characters of the data in the string on the Work with Order screen as an error message. You cannot continue with the order until the error is resolved, or you can reject the order. |
No tables accessed; the parameters are passed interactively based on the values on the screen |
Work with User Exit/Edit Point Screen
How to display this screen: Enter WUEP in the Fast path field at the top of any menu or select Work with User Exit/Edit Points from a menu.
Field |
Description |
Calling function |
The name of the program that calls the user program. The calling function defines whether the function is a user exit point or user edit point. See User Exit Point Parameters and User Edit Point Parameters for a list of calling functions and the parameters they pass. Alphanumeric, 10 positions. |
Description |
The description of the program that calls the user program (for example, Create Customer Sold To). Alphanumeric, 30 positions. |
Appl area (Application area) |
The general category of applications to which the calling program belongs. Application areas are defined in and validated against the Application Area table (accessed from the System Control table). Alphanumeric, 3 positions. |
User function |
Not currently implemented. Alphanumeric, 10 positions; display-only. |
.
Screen Option |
Procedure |
Create a user exit/edit point |
Select Create to advance to the Create User Exit/Edit Point Screen. |
Change a user exit/edit point |
Select Change for a user exit/edit point to advance to the Change User Exit/Edit Point Screen. |
Delete a user exit/edit point |
Select Delete for a user exit/edit point to delete it. |
Display a user exit/edit point |
Select Display for a user exit/edit point to advance to the Display User Exit Point Screen. You cannot change any information at this screen. See the Create User Exit/Edit Point Screen and the Change User Exit/Edit Point Screen for field descriptions. |
Create User Exit/Edit Point Screen
Purpose: Use this screen to identify the program to call the user program.
How to display this screen: Select Create at the Work with User Exit/Edit Point Screen.
Field |
Description |
The name of the program that calls the user program. The calling function defines whether the function is a user exit point or user edit point. See User Exit Point Parameters and User Edit Point Parameters for a list of calling functions and the parameters they pass. Alphanumeric, 10 positions. Create screen: required. Change screen: display-only. |
|
Description |
The description of the program that calls the user program (for example, Create Customer Sold To). Informational only. Alphanumeric, 30 positions; required. |
Appl area (Application area) |
The general category of applications to which the calling program belongs. Application areas are defined in and validated against the Application Area table (accessed from the System Control table). Alphanumeric, 3 positions; required. |
Completing this screen: After you complete this screen, select Change from the Work with User Exit/Edit Point Screen for the user exit/edit point you just created to advance to the Change User Exit/Edit Point Screen. In the Implementation class field, enter the name of the program you want to call at the designated calling point (this is a program you developed) to advance to the Description field. Enter the description associated with the program you will call at the calling point. You return to the Work with User Exit/Edit Point Screen.
Change User Exit/Edit Point Screen
To change: Select Change for a record at the Work with User Exit/Edit Point Screen to advance to the Change User Exit/Edit Point screen.
See Create User Exit/Edit Point Screen for all field descriptions except the User function and Implementation class. You cannot change the value in the Calling function field. Update information as needed.
Field |
Description |
Implementation class |
The program to run at this user exit/edit point. Your entry should specify the entire project path and class name. For example, enter com.mr.serenade.bo.interfaces.UEPclass where: • com.mr.serenade.bo.interfaces is the project path, and • UEPclass is the name of the class. Alphanumeric, 50 positions; optional. |
Description |
The description of the program that calls the user program (for example, Create Customer Sold To). Informational only. Alphanumeric, 30 positions; optional. |
Using the System Utilities | Contents | SCVs | Search | Glossary | Reports | Solutions | XML | Index | Working with Default Options (WDFT) |
WUEP OROMS 5.0 2018 OTN