Auto Close Purchase Orders (order_auto_close_job)

Module Name

order_auto_close_job

Description

Auto Close Purchase Orders

Functional Area

Purchase Orders

Module Type

Admin - Ad hoc

Module Technology

Background Processing

Catalog ID

N/A

Wrapper Script

b8dwrap.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This background job is composed of two steps processing. It will have a threading assignment and a business logic processing.

Thread assignment program will filter eligible records from order header table based on defined criteria. This program is used to process POs that need to be deleted or closed that meet certain conditions. The criteria are as mentioned below:

Category 1

  • The order is not in ‘C'ompleted status and was previously approved.

  • The number of days between the latest ship date and the current date is greater than the ‘Approved PO Close Delay' system parameter.

  • There are no open shipments for the order.

  • End of week date should not be null.

Category 2

  • The order is not in ‘C'ompleted status and was previously approved.

  • A specified amount of time (‘Approved PO Close Delay' system parameter) after the not after date of the PO has passed.

  • A specified amount of time (‘Partially Received PO Close Delay' system parameter) after the not after date has passed.

  • A specified amount of time (‘Partially Received PO Close Delay' system parameter) after the expected receipt date (or shipped date if the expected date has not been captured) has passed.

  • There are no open appointments in the system for the order.

Category 3

  • The order has a status of worksheet or submitted, and the order has never been previously approved.

  • The number of days between the current date and the order creation date is greater than the ‘Worksheet PO Clean Up Delay' system parameter.

  • The order is a manual order (not created by replenishment).

  • End of week date should not be null.

These records are chunked and Thread ID is assigned for each. They will be stored temporarily in a staging table.

The Business logic program will process all records from the staging table. Using bulk processing, this program will process retrieved records based on their category:

  1. Category 1 orders will be closed. Closing an order involves adjusting the order quantities, shipment quantities and OTB. Any allocation associated with the order will also be closed if it is released ‘X' number of days before vdate. The ‘X' number of days is defaulted from an external system and set on the RMFCS codes table for code type ‘DEFT'.

  2. For Category 2 orders, orders will be closed if there are no pending receipts or if the ‘Auto Close Partially Received' system indicator is set to ‘Y'.

  3. Category 3 orders will be deleted from the system.

It will free up and clean the staging table afterwards. There is a STOP ON NEXT feature in bulk processing (through a loop) where Administrators can stop this batch with a flip of this indicator.

Restart/Recovery

N/A

Key Tables Affected

Table 5-1 Key Tables Affected

Table Select Insert Update Delete

RMS_BATCH_STATUS

Yes

No

No

No

B8D_PROCESS_CONFIG

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

B8D_ORDER_AUTO_CLOSE_STG

Yes

No

Yes

Yes

ORDHEAD

Yes

No

Yes

Yes

SHIPMENT

Yes

No

Yes

No

APPT_HEAD

Yes

No

No

No

APPT_DETAIL

Yes

No

No

No

SHIPSKU

Yes

No

Yes

No

ORDLOC

No

No

Yes

Yes

ALLOC_DETAIL

No

No

Yes

Yes

OBLIGATION_COMP

No

No

No

Yes

WO_DETAIL

No

No

No

Yes

WO_HEAD

No

No

No

Yes

WO_SKU_LOC

No

No

No

Yes

WO_WIP

No

No

No

Yes

ALLOC_CHRG

No

No

No

Yes

ALLOC_HEADER

No

No

No

Yes

ORDLOC_DISCOUNT

No

No

No

Yes

TIMELINE

No

No

No

Yes

ORDSKU_TEMP

No

No

No

Yes

ORDLOC_TEM

No

No

No

Yes

ALLOC_CHRG_TEMP

No

No

No

Yes

ALLOC_DETAIL_TEMP

No

No

No

Yes

ALLOC_HEADER_TEMP

No

No

No

Yes

ORDLOC_EXP_TEMP

No

No

No

Yes

ORDSKU_HTS_ASSESS_TEMP

No

No

No

Yes

ORDSKU_HTS_TEMP

No

No

No

Yes

ORDLOC_DISCOUNT_TEMP

No

No

No

Yes

TIMELINE_TEMP

No

No

No

Yes

REQ_DOC_TEMP

No

No

No

Yes

WO_DETAIL_TEMP

No

No

No

Yes

WO_HEAD_TEMP

No

No

No

Yes

ORDLOC_WKSHT

No

No

No

Yes

ORDLOC_REV

No

No

No

Yes

ORDSKU_REV

No

No

No

Yes

ORDSKU

No

No

No

Yes

ORDCUST

No

No

No

Yes

ORDHEAD_REV

No

No

No

Yes

ORDLC

No

No

No

Yes

DEAL_COMP_PROM

No

No

No

Yes

DEAL_ITEMLOC

No

No

No

Yes

DEAL_THRESHOLD

No

No

No

Yes

DEAL_DETAIL

No

No

No

Yes

DEAL_QUEUE

No

No

No

Yes

DEAL_CALC_QUEUE

No

No

No

Yes

DEAL_HEAD

No

No

No

Yes

ORD_INV_MGMT

No

No

No

Yes

REPL_RESULTS

No

No

No

Yes

REV_ORDERS

No

No

No

Yes

REQ_DOC

No

No

No

Yes

ORD_PREISSUE

No

No

No

Yes

Design Assumptions

N/A