MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Distribution > Purchasing > Programs > Requisition Maintenance - Purpose > Requisition Maintenance - Calculations

Requisition Maintenance - Calculations

PO160E

A.   Housekeeping

1.   See Common Processing Routines - Housekeeping of this manual for a general discussion of the Housekeeping subroutine.  Processing specific to this program is described below.

2.   A parameter list is set up for the fast path and help screen parameters.

3.   Key lists are defined for each file retrieved by the program.

4.   Workfields are defined and program constants are initialized.

5.   The following records are retrieved from the Reference file (REFERP):

a.   The date format record (category 049) is retrieved.  If this record is not found, the date format defaults to MMDDYY.

b.   The default company/warehouse is retrieved from the workstation assignment record (category 428).  This company/warehouse is validated against the array of authorized company/warehouses for the user.

c.   The decimal field precision record (category 446) is retrieved.

d.   All company/warehouses to which the user is authorized are retrieved from the user company/warehouse authorization record (category 409) and loaded into an array.  If no records are found for the user, a flag is set authorizing the user to all company/warehouses.

e.   The applications installed record (category 012) is retrieved.  The Product Costing Installed flag will be checked during the costing routine to determine which costs to use in the calculations.  The Job Control Installed flag will also be checked to determine whether to display the job number.  The Expert Configurator Installed Flag will be checked to indicate whether the configuration code and command keys F19 and F23 are to be displayed.

f.    The system option assignment record (category 133) is retrieved.  The single/multiple currency record is checked to determine if the base currency should be displayed on the screen(s).

g.   The following categories are retrieved and stored in arrays for access during processing:

·     Part types (category 405)

·     Requisition status codes (category 476)

·     Requisition print codes (category 494)

·      Requisition print codes (category 410)

h.   All requisition release codes to which the user is authorized are retrieved from the requisition release authorization record (category 477) and loaded into an array.  If no records are found for the user, a flag is set authorizing the user to all requisition release codes.

i.    The Purchasing application system defaults 1 record (category 491) is retrieved.  The Requisition Close Percent, Requisition Modification Option and Requisition Number Assignment Method are saved.

6.   All valid company/warehouse combinations along with their corresponding G/L locations are retrieved from the Warehouse Description file (IC170M) and stored in an array.

B.   Mainline

1.   The Requisition Maintenance Function Select screen (PO160S01) is initialized with blanks and displayed to the user.

Two maintenance modes are allowed:  add a new requisition or change an existing requisition.

2.   The user's input is validated.  See the Purchasing User Manual, File Maintenance Screens-Purchasing Planning, for validation rules.  Any errors are highlighted and the appropriate error message is displayed.

3.   In the change mode, the Requisition file (PO160M1) is checked to see if the record to be changed is in use.  If so, the Function Select screen is redisplayed with an error message.  If the record is not in use, the record is retrieved and formatted for display on the Multi-Line screen. 

4.   The Requisition Maintenance Multi-Line screen (PO160S02) is initialized and displayed.  In change mode, the Part Description is retrieved from the Part Master file (DE100M).  The Requisition Total is summed; if the total is greater than the Requisition Amount Limit specified in the Company/Location Defaults record (category D32) on the Reference file, a warning message is displayed.

5.   To enter data, the user first must enter a Line Number and Maintenance Code at the bottom of the screen.

a.   For add transactions, the Line Number is automatically incremented by one each time.  For change transactions, the Line Number must be one of the existing Line Numbers displayed.

b.   Four Maintenance Codes are allowed:

(1)  A - Add the line.

(2)  C - Change the line.

(3)  X - Cancel the line.

(4)  R - Reinstate the line.

c.   The user's input is validated.  See the Purchasing User Manual, File Maintenance Screens-Purchasing Planning, for validation rules.

6.   If no errors have occurred, the Multi-Line screen is redisplayed.

a.   For an add transaction, a line is displayed in the subfile at the bottom of the screen for data entry.  All fields are initialized with blanks and are open to data entry.

b.   For a change transaction, the existing record is displayed in the subfile.  Certain fields are open for data entry depending on whether the requisition has been covered.

c.   For cancel and reinstate transactions, no data is displayed in the subfile.  If the transaction is valid, the line status field of the selected line is changed accordingly.

7.   The added or changed input is validated.  See the Purchasing User Manual, File Maintenance Screens-Purchasing Planning, for validation rules.

8.   Cost fields are calculated.

a.   The Estimated Cost is calculated:

ESTIMATED COST

=

UNIT COST

times

REQUISITION QUANTITY

(1)  If the company/warehouse is a manufacturing company/warehouse and the Product Costing application is installed, the Unit Cost equals the sum of the Standard Total Material, Labor, and Overhead Costs from the Part Master file.

(2)  If the company/warehouse is a manufacturing company/warehouse and the Product Costing application is not installed, the Unit Cost equals the sum of the Standard This-Level Material, Labor and Overhead Costs from the Part Master file.

(3)  If the company/warehouse is a distribution company/warehouse with moving average costing or the part is non-standard, the Unit Cost is equal to the Moving Average Unit Cost from the Warehouse Balance file.

(4)  If the company/warehouse is a distribution company/warehouse with standard costing and the part is not non-standard, the Unit Cost is equal to the Standard Unit Cost from the Warehouse Balance file.

(5)  If the company/warehouse is a distribution company/warehouse but no warehouse balance record exists for the part, the Unit Cost is calculated using the Part Master File cost fields as in (1) and (2) above.

(6)  If the part is configuration coded, the unit cost is retrieved from the Configuration Master file, and is equal to the Total Standard Cost.

b.   The Total Requisition Amount is adjusted.

(1)  For an add transaction, the new Estimated Cost is added to the Total Requisition Amount.

(2)  For a change transaction, if the Estimated Cost has changed, the new Estimated Cost is added to the Total Requisition Amount, and the previous Estimated Cost is then subtracted from the total.

(3)  For a cancel transaction, the Estimated Cost is subtracted from the Total Requisition Amount.

(4)  For a reinstate transaction, the Estimated Cost is added to the Total Requisition Amount.

c.   The new Total Requisition Amount is compared to the Requisition Amount Limit from the Reference file.  If the total is above the limit and the user is not authorized to exceed the limit, the Requisition Status is changed to firm planned and a warning message is displayed to the user.

9.   The Requisition file (PO160M1) is updated with the data from the Multi-Line screen.  If automatic number assignment is in effect, the Reference file (REFERPU) is updated with the Next Available Requisition Number (category 468).  The Net Change Flag on the Part Master file is updated if the following conditions are true:

·     The Company/Warehouse is the manufacturing company/warehouse

·     The Part Type for the part is not 5 (reference part)

·     The Requisition Quantity or Requisition Date has changed

10.  An audit trail record of the transaction is formatted and written to the Requisition Audit Trail file (PO160BP1).

11.  If the user presses F4 - Detail (while in add or change mode) or F14 - Detail Add (while in change mode), the Requisition Maintenance Detail screen (PO160S03) is displayed for the line number entered in the subfile at the bottom of the Multi-Line screen.  If no line number was entered, the line number defaults to the next available line number.

12.  The Detail screen is initialized and displayed.

a.   For an add transaction, the screen is initialized with the values from the Multi-Line screen and the remaining fields are filled with blanks.

If the part is a non-standard part, an account/center can be entered.  This account/center is validated against the Account/Center Master file (GLFILEL5).

If a SO is entered, the program validates the SO as described in the Screens Section of the Purchasing User Manual.

b.   For a change transaction, the screen is initialized with the data from the Requisition file for the current requisition line.  Decodes are retrieved from the Reference file and the arrays loaded in Housekeeping.

13.  The user's input is validated.  See the Purchasing User Manual, File Maintenance Screens-Purchasing Planning, for validation rules.

14.  If no errors have occurred, the record is updated on the Requisition file (PO160M1).  An audit trail record is formatted and written to the Requisition Audit Trail file (PO160PB1).

The sales order line file is updated with the requisition and vendor. 

15.  If the user presses F12 - Display Comments, the Requisition Maintenance Comment screen (PO160S04) is displayed for the current requisition line number (the line number entered at the bottom of the Multi-Line screen, or the line number associated with the Detail screen).  Line number 00 is reserved for header-level comments.

a.   For an add requisition transaction, the subfile is loaded with blanks.

b.   For a change transaction, the existing comments are retrieved from the Requisition Comment file (PO160M2) and loaded into the subfile.

16.  Up to 99 comment lines may be entered for each requisition line.  When the ENTER key is pressed, the Print Code is validated.  See the Purchasing User Manual, File Maintenance Screens-Purchasing Planning, for validation rules.

17.  The Requisition Comment file (PO160M2) is updated with the added or changed comments.  An audit trail record is formatted and written to the Requisition Comment Audit Trail file (PO160BP2).

PO160E Program Menu