Purchase Order Layering

Purchase order layering updates the expected delivery dates for items on backorder, based on records in the PO Layering table. The oldest orders on the system receive stock before new orders.

When to run purchase order layering: It is important to run this function before you generate backorder notices or run any other function that relies on accurate purchase order date and quantity information. You can run Purchase Order Layering on demand at any time.

Important: When you run purchase order layering, the system clears the PO Layering table and rebuilds it based on the purchase order records that are uploaded to the table. In order to ensure accurate updates, you must upload the PO Layering table with ALL open purchase orders every time you perform an upload.

Instructions: Follow these steps to update purchase order layering.

1.

Upload the most recent purchase order information to the PO Layering table:

• Use the File Storage API to upload a POLAYR text file to the FILE_STORAGE table, and then run the UPPOLAY Upload PO Layering File (Program name PFR0134, Parameter POLAYR) periodic function to update the PO Layering table, or

• Place the file in the CWDIRECTCP_UPLOAD_ DIRECTORY if the file storage API is not enabled, and then run the UPPOLAY Upload PO Layering File (Program name PFR0134, Parameter POLAYR) periodic function to update the PO Layering table, or

• Use the Work with File Uploads (WUPL) menu option to upload the text file and update the PO Layering table.

PO Layering Table (POLAYR)

The PO Layering table contains the following fields:

• Company (numeric, 3 positions)

• Item number (alphanumeric, 12 positions)

• SKU code (alphanumeric, 14 positions)

• Warehouse (numeric, 3 positions)

• PO number (numeric, 7 positions)

• Sequence number (numeric, 5 positions)

• Due date (numeric, 7 positions)

• Open quantity (numeric, 7 positions)

• Status (alphanumeric, 16 positions)

• Reference number (alphanumeric, 15 positions)

You can use the following sample data to create a PO Layering upload file:

7|RF123SKU4567|ROSE XSML WMNS|4|53|1|1080915|20| |Ref#

Note:

• To leave any field in the upload file blank, pass a space in an alphanumeric field and a 0 in a numeric field so that the file can be processed without errors. Leaving a field with no space or 0 is interpreted as null in the database and causes errors.

• If you run the UPPOLAY periodic function and you do not have a POLAYR file in the folder defined in the CWDIRECTCP_UPLOAD_DIRECTORY property, the system writes an error that you can review in Work with File Uploads (WUPL). The error indicates that the process could not complete because the POLAYR file was not found in the upload folder.

2.

Once the records are uploaded to the PO Layering table, the process uses the newly uploaded records to update the due date and backorder quantity for order lines on backorder. This update occurs for all companies and all warehouses for which there is an entry in the PO Layering table.

Errors: If an error occurs during the upload, the system clears the file and does not update the due date and backorder quantity for order lines on backorder.

Note: The system does not update records in the PO layering table when you change an item on backorder (such as deleting, rejecting, or canceling an order line on backorder). In this situation, you must perform a PO Layering Upload again to make sure the information in the PO Layering table is correct.

Update PO Layering Example

The following records are in the PO Layering table for item ABC:

PO#

Due Date

Open Qty

100

January 1

2

115

February 1

50

You place the following orders for item ABC:

Order#

Order Qty

Results

1010

1

The system:

• decreases the Open Qty for PO# 100 in the PO Layering table to 1.

• assigns an expected date of January 1 to the order line.

1012

2

The system:

• decreases the Open Qty for PO# 100 in the PO Layering table to 0 and updates its status to C (Closed).

• decreases the Open Qty for PO# 115 in the PO Layering table to 49.

assigns an expected date of February 1 to the order line.

1015

1

The system:

• decreases the Open Qty for PO# 115 in the PO Layering table to 48.

• assigns an expected date of February 1 to the order line.

You cancel order 1010, freeing up 1 unit of item ABC on purchase order 100. However, the system does not reevaluate the expected date assigned to the open orders for item ABC until you upload the PO Layering table with the most recent purchase order information in your external system.

You upload the most recent purchase order information in your external system to the PO Layering table. The following records are now in the PO Layering table for item ABC:

PO#

Due Date

Open Qty

100

January 1

2

115

February 1

50

129

February 15

50

The system updates the expected date for the open orders that contain item ABC based on the records in the PO Layering table:

Order#

Order Qty

Updates

1010

N/A - line canceled

The system does not update the order since it has been canceled.

1012

2

The system:

• decreases the Open Qty for PO# 100 in the PO Layering table to 0 and updates its status to C (Closed).

• assigns an expected date of January 1 to the order line.

1015

1

The system:

• decreases the Open Qty for PO# 115 in the PO Layering table to 49.

• assigns an expected date of February 1 to the order line.

Update on-order quantity? The UPDATE_ON_ORDER_FROM_PO_LAYERING property controls whether the PO layering process updates the on-order quantity for the warehouse:

• You should set this property to TRUE if you upgrade to 19.0 or higher from a release prior to 18.0, in order to have PO layering update the on-order quantity consistently with prior functionality.

• You should leave this property set to FALSE if you use the Enterprise Order Integration (Future Receipts and Pre-Order Processing), since the OCDSFA periodic function also updates the warehouse on-order quantity.

If this property is set to TRUE and you run the OCDSFA periodic function as well as the PO layering process, whichever process ran most recently updates the on-order quantity for the warehouse.

CS12_04 OMSCS 19.0 December 2019 OHC