Documentation >
MAC-PAC Technical Library >
Distribution >
Order Processing >
Programs >
Sales Order Line Processing - Purpose >
Sales Order Line Processing - Calculations
Sales Order Line Processing - Calculations
OP100E3
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. Arrays and fields are initialized from the Reference file (REFERP).
B. Mainline
Control is passed among the following three screens:
1. Sales Order Maintenance Multi-Line screen (OP100S03)
· If Expert Configurator is not installed.
· If Expert Configurator is installed, but configured order flag = N.
The multi-line screen allows the addition and maintenance of line records to the Sales Order Line file (OP100M2).
Only two fields need to be entered for a line add: Part Number and Order Quantity. The following processing is performed.
a. If a header action code has been entered, the Header Processing program (OP100E2) is called to process the requested action.
b. All fields are validated. If an error is detected on a field that is on the multi-line screen, processing continues to the next line. If an error is detected on a field that is not displayed on the multi-line screen, the Generic Windows program is invoked to display the field in error and the error message.
c. Command keys are available to display the header recap screen or to post the sales order (end transaction). If any errors are displayed on the multi-line screen, these command keys are not displayed and are disabled. Also, if no lines have been posted, the command keys to display the recap screen and to post the order are not displayed and are disabled.
d. If the line is valid, it is posted as described below. If an action code has been requested for the line, the action code is processed.
e. If all the fields are valid and the line is to be posted, the following occurs:
(1) Availability checking is performed. The program AVLCHK is called to carry out this processing. AVLCHK performs remote sourcing processing, creating requisitions when required.
(2) Costing is performed. The program COSTNG is called to carry out this processing.
(3) Pricing is performed unless the Deferred Pricing Option has been selected. The program PRICNG is called to carry out this processing.
(4) Weight and volume calculations are performed. See the Common Processing Routines - Weight and Volume Calculations section of this manual.
(5) Unit of measure conversions are performed when necessary. See the Common Processing Routines - Unit of Measure Conversion section of this manual.
(6) The sales order planning flag (SLPLFG) for the order is set to no if the line will be sourced from a distribution warehouse and yes if it will be sourced from a manufacturing balance within a manufacturing warehouse. If the line will be sourced from a distribution balance within a manufacturing warehouse, the flag is set based on the option defined for the manufacturing warehouse on the Plant/Warehouse Description file.
(7) The sales order line, discount detail, and subfile records are updated. Audit trail and transaction register records and associated error message records are written.
(8) The warehouse balance record is updated with appropriate quantity values.
(9) The Sales Order Header file is updated.
(10) The Part Master file (DE100M) is updated if the net change flag was set on.
f. Control is then passed to the next process.
2. Sales Order Maintenance Single-Line screen (OP100S0A)
· If Expert Configurator is installed and the configured order flag = Y.
The single-line screen allows the addition and maintenance of line records to the Sales Order Line file (OP100M2). You can also maintain line records to the Sales Order Options file (EC200M) for lines with configured parts.
Only three fields need to be entered for a line add: the maintenance code of A, the part number, and order quantity. The following processing is performed:
a. The single-line screen is displayed.
b. All fields are validated. If an error is detected on a field that is on the single-line screen, processing continues to the next line. If an error is detected on a field that is not displayed on the single-line screen, the Generic Windows program is invoked to display the field in error and the error message.
c. Command keys are available to display the header recap screen or to post the sales order (end transaction). If any errors are displayed on the single-line screen, these command keys are not displayed and are disabled. Also, if no lines have been posted, the command keys to display the recap screen and post the orders are not displayed and are disabled.
d. Each line you add is validated fully before you are able to enter another line. If a line is valid, it is posted as described in step e(2) (below). If a line is found to be invalid it will not be posted and no other lines will be allowed to be added.
e. If all the fields are valid and the line is to be posted, the following occurs:
(1) Availability checking is performed. The program AVLCHK is called to carry out this processing.
(2) Costing is performed. If the part is configuration costed, the costs are retrieved from the Configuration Code file (EC140M). If this is a new configuration code, the costs are set to zero.
(3) Pricing is performed unless the deferred pricing option has been selected. The program PRICNG is called to carry out this processing. For lines with non-configured parts, see the PRICING program description in this manual for additional information. For lines with configured parts, see the Expert Configurator User Manual, Overview section.
(4) Weight and volume calculations are performed. See the Common Processing Routines - Weight and Volume Calculations section of this manual.
(5) Unit of measure conversions are performed when necessary. See the Common Processing Routines - Unit of Measure Conversion section of this manual.
(6) The Expert Configuration program (EC210E) is called. See the Expert Configurator Program Documentation Manual for more information.
(7) Check if lot numbers have been assigned to any sales order lines that have configuration coded parts. If those lines have lot numbers assigned to them and their configuration code changes, an error message is sent.
(8) If the part is configured and lot assignable, the Inventory Check program (OP205E) is called to check for any inventory for the configuration. If inventory is available, the lot select screen is shown.
(9) If the part is job controlled and the assign job flag is yes, The Job Setup and Maintenance program (JC100E) is called to allow the assignment of a job to the sales order or sales order line.
(10) The sales order planning flag (SLPLFG) is set to no if the line will be sourced from a distribution warehouse and yes if it will be sourced from a manufacturing balance within a manufacturing warehouse. If the line will be sourced from a distribution balance within a manufacturing warehouse, the flag is set based on the option defined for the manufacturing warehouse on the Plant/Warehouse Description file.
(11) The sales order line, discount detail, and subfile records are updated. Audit trail and transaction register records and associated error message records are written.
(12) The warehouse balance record is updated with appropriate quantity values.
(13) The Sales Order Header file (OP100M1) is updated.
(14) The Part Master file (DE100M) is updated if the net change flag was set on.