Documentation >
MAC-PAC Technical Library >
Distribution >
Order Processing >
Programs >
Sales Order Entry and Maintenance Driver - Purpose >
Sales Order Entry and Maintenance Driver - Calculations
Sales Order Entry and Maintenance Driver - Calculations
OP100E1
A. Housekeeping
1. See the Common Processing Routines - Housekeeping section of this manual for a general discussion of this subroutine. Processing specific to this program is described below.
2. The Company Name and Balances Available for Distribution are retrieved from the System Control file (CT100M).
3. Arrays and fields are initialized from the Reference file (REFERP).
4. Processing flag is set for RMA if called from RMA Receipt Control OP215E.
B. Mainline
Control is passed among three screens which, besides this program, are called by the Sales Order Header Maintenance program (OP100E2) and the Sales Order Line Maintenance program (OP100E3).
1. Sales Order Maintenance Function Select screen (OP100S01)
From the select screen, a request is made to add, change, or close an order, or generate a blanket or backorder release. For an add transaction, the Company, Warehouse, Bill-to/Ship-to, Order Number (if not system assigned), and the Order Type are required. If the order type is B (Blanket) , the Blanket Schedule Flag must be entered--if this field is not entered the default will be taken from Reference File 413. If the order type is B and it does not use the blanket scheduling option, the default for the number of releases and release interval fields is set to one. For an order change or close, only the Order Number is needed. The following processing is performed if processing for RMA Receipt Control the Fast Path and Inquiry Command Keys are disabled:
a. The select screen is displayed. Command keys are available for command line, exit, valid values prompting, and transfer to the Sales Order Inquiry program (OP800E).
b. The select screen request is validated. See the Order Processing User Manual for validation rules.
c. An external program monitors whether the failed order entered on the select screen requires recovery. If the transaction does require recovery, one of the two following conditions must be met:
· The job number on the Sales Order Header file (OP100M1) for the failed order must NOT be active on the system. (No spool files for the failed orders job can exist on the system.).
· The sales order requested must be recovered by the same user, from the same workstation, and with the same job number as when it failed.
d. If a new order is being added, or if an existing order is being changed, credit checking will be performed if the order entry credit checking flag is Yes on Reference File category D38 and if the customer is not exempt from credit checking (CMCRTP=0). See the CRDCHK program description in this manual for a discussion of this processing.
e. Control totals are initialized.
(1) If it is an add transaction, totals are set to zero.
(2) If it is a change or close transaction, totals are set to the values on the Sales Order Header file (OP100M1).
f. If all fields are valid, processing continues to the next screen.
2. Sales Order Maintenance Header screen (OP100S02)
This screen is processed by the Sales Order Maintenance program (OP100E2). See the description of OP100E2 in this manual for more information.
3. Sales Order Maintenance Multi-Line screen (OP100S03)
· If Expert Configurator is not installed.
· If Expert Configurator is installed, but configured order flag = N.
This screen is processed by the Sales Order Line Maintenance program (OP100E3). See the description of OP100E3 in this manual for more information.
4. Sales Order Maintenance Single-Line screen (OP100S01)
If Expert Configurator is installed and the configured order flag = Y.
This screen is processed by the Sales Order Line Maintenance program (OP100E3). See the description of OP100E3 in this manual for more information.
5. Sales Order Maintenance Recap screen (OP100S05)
a. The recap screen is displayed. Part numbers are highlighted for lines that have warning errors associated with them.
b. Command keys are available to display the multi-line or(or single-line if configured order flag was equal to Y), header screen. If any errors are displayed on the recap screen, these command keys are not displayed and are disabled.
c. F5 is available/displayed only if one of the parts on the sales order is job controlled. It calls the Job Setup and Maintenance conversation (JC100E) to associate one or more sales order lines with a job. When the user exits the Job Setup and Maintenance conversation, this screen is redisplayed.
d. The screen is validated. See the Order Processing User Manual for validation rules.
e. If all fields are valid, the following occurs:
(1) If an Action Code has been entered for any line or for the line action code at the header level, the Sales Order Line Maintenance program is executed to process the action.
(2) If an action code has been entered for the Header Action Code, the Sales Order Header Maintenance program is executed to process the action.
f. If F22 = End Order was pressed, order end processing occurs:
(1) If a close transaction, the Sales Order Line Maintenance program (OP100E3) is called to perform close processing for each line. If no errors are detected, the order is closed.
(2) If not a close transaction, but all the line items are closed, the order is closed.
(3) The following master files are updated for an add transaction:
· Sales Order Header file (OP100M1)
· The RMA Header file (OP145M1) if processing for RMA Receipt Control
· Purchase Order Generation Trigger file (PO185AP1), only for remote sourcing
(4) Subsequent asynchronous processing is determined.
(a) The system determines which immediate processes are pending in the following hierarchical sequence:
· Stock location reservation
· Control totals or shipment generation
· Manufacturing configuration
· Purchase order generation
(b) If any asynchronous processes are pending, the sales order is locked with the corresponding lock code and a record is written to trigger the asynchronous process.