Documentation >
MAC-PAC Technical Library >
Distribution >
Order Processing >
Programs >
Blanket Shipment Schedule Maintenance - Purpose >
Blanket Shipment Schedule Maintenance - Calculations
Blanket Shipment Schedule Maintenance - Calculations
OP115E
A. Housekeeping
1. A parameter list is set up for the fast path and help screen parameters.
2. Key lists are defined for each file retrieved by the program.
3. Workfields are defined and program constants are initialized.
4. The following records are retrieved from the Reference file (REFERP):
a. CPF File Access Status Codes are retrieved from Reference File category 015.
b. System Defaults are retrieved from Reference File category 133.
c. The date format record is retrieved from Reference File category 049. If flag is Y, format date as DDMMYY. If flag is N, format date as MMDDYY. If flag is A, format date as YYMMDD. If a record is not found, the date format defaults to MMDDYY .If flag is N, format date as MMDDYY.
d. The number of decimals for quantity fields is retrieved from Reference File category 446.
e. Valid Company/Warehouse combinations are retrieved from Reference File category 409.
5. The System Control file (CT100M) is checked for the manufacturing company/warehouse (DECTL1) and company name (COMNAM).
6. The default company/warehouse is retrieved from Reference File category 428.
7. See the Common Processing Routines - Housekeeping section of this manual for more information about this subroutine.
B. Mainline
1. The Blanket Order Schedule file (OP100L31) is read and the subfile for detail screen is initialized.
2. The Blanket Shipment Schedule Detail Screen (OP115S02) is displayed and validated. For detailed validation rules, see the Screens Section of the Order Processing User Manual. If any fields are invalid, the screen is redisplayed with the invalid fields highlighted and an appropriate error message displayed. Validation for each changed line includes:
a. The line status is checked. If it is a new line, the status will default to O (Open). If a line is being canceled, the status is set to K (Canceled). If a line has any other status code, format an error message.
b. Dates are validated; the promised ship date cannot be blank and must be in a valid date format.
c. The scheduled shipments are checked to make sure that the shipped quantity (CZSUM) is not greater than the line quantity (LINQTY).
d. The following calculations/validations are done to the scheduled quantities entered by the user:
(1) The old line quantity (CZQTY) is subtracted from the shipped quantity (CZSUM).
(2) The received quantity (ZNUMDC) must be numeric, non-zero, with the correct number of decimal places.
(3) If there are no validation errors for the quantity fields, add the new scheduled line quantity (CZQTY) to the shipped quantity (CZSUM).
(4) The sum of all scheduled quantities (CZSUM) cannot be greater than the total quantity of the sales order line (LINQTY).
e. The customer information is validated.
(1) The currency level is validated against Reference File 133. The currency level (R133CL) will be either at the Global , Company, or Company/Location level.
(2) If the Ship-to (CZCSTS) or Warehouse (CZWHNO) fields are blank, format the default values (CZSUM) and (CNWHCD).
(3) The ship-to customer must exist on the against the Customer Master Logical file (ARCUSTL1).
f. The warehouse must be validated against the Warehouse Description file (IC170M) if there are no Ship-to Customer records or if a ship-to customer was entered manually.
3. Once changes lines have been validated, the Blanket Order Schedule file (OP100M5) is updated for all the selected orders, and a record is written to the BOL Asynchronous Trigger file (OP690BP).