12 Inventory
Most inventory processes in Merchandising are performed via the UI and near real time RIB integrations. However, some inventory related batch processes exist to manage inventory data.
Program Summary
The following batch designs are included in this chapter:
-
Purge Aged Customer Orders (customer_orders_purge_job) - background job
-
Purge Aged Inventory Adjustments (inv_adj_purge_job) - background job
Adjust Inventory for Wastage Items (wasteadj)
Module Name |
wasteadj.pc |
Description |
Adjust Inventory for Wastage Items |
Functional Area |
Inventory |
Module Type |
Business Processing |
Module Technology |
ProC |
Catalog ID |
RMS388 |
Wrapper Script |
rmswrap_multi.ksh |
Design Overview
This program reduces inventory of spoilage type wastage items to account for natural wastage that occurs over the shelf life of the product. This program affects only items with spoilage type wastage identified on ITEM_MASTER with a waste_type of ‘SP' (spoilage). Sales type wastage is accounted for at the time of sale.
This program should be scheduled to run prior to the stock count and stock ledger batch to ensure that the stock adjustment taken during the current day is credited to the appropriate day.
Purge Aged Customer Orders (customer_order_purge.ksh)
Module Name |
customer_order_purge.ksh |
Description |
Purge Aged Customer Orders |
Functional Area |
Purchase Orders |
Module Type |
Admin |
Module Technology |
ksh |
Catalog ID |
RMS205 |
Wrapper Script |
rmswrap_shell.ksh |
Design Overview
This module will serve as the wrapper for the package function which will purge the store fulfillment customer order records from the customer order tables based on the history months system parameter. This will also purge the obsolete records having the status 'X' where the customer order could not be created.
Purge Aged Customer Orders (customer_orders_purge_job)
Module Name |
customer_orders_purge_job |
Description |
Download Sales and Stock On Hand From RMS to Suppliers |
Functional Area |
Inventory |
Module Type |
Integration |
Module Technology |
ProC |
Catalog ID |
RMS47 |
Wrapper Script |
b8dwrap.ksh |
Design Overview
This background job is composed of one step processing only. It will retain the business logic processing from original KSH script algorithm.
The Business logic program will remove all store fulfillment customer order records from customer order and customer order detail tables based on the purge criteria from the system parameter setting, customer order history months. This will also purge the obsolete records having status 'X' where the customer order could not be created.
Purge Aged Inventory Adjustments (inv_adj_purge_job)
Module Name |
inv_adj_purge_adj |
Description |
Purge Aged Inventory Adjustments |
Functional Area |
Inventory |
Module Type |
Admin - Ad hoc |
Module Technology |
Background Processing |
Catalog ID |
N/A |
Wrapper Script |
b8dwrap.ksh |
Design Overview
This background job is composed of two-step processing. It will have a threading assignment and a business logic processing.
Thread assignment program will filter eligible records from inventory adjustment table based on its purge criteria from system parameter settings. The Inventory Adjustment Months parameter will determine records to kept before they are purged whole adjustment date has elapsed from a pre-determined number of months. 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 delete the records from inventory adjustment table. 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.
Purge Aged Inventory Adjustments (invaprg)
Module Name |
invaprg.pc |
Description |
Purge Aged Inventory Adjustments |
Functional Area |
Inventory |
Module Type |
Admin |
Module Technology |
ProC |
Catalog ID |
RMS251 |
Wrapper Script |
rmswrap.ksh |
Design Overview
This batch program will delete all inventory adjustment records whose adjustment date has elapsed a pre-determined number of months. The number of months that inventory adjustment records are kept before they are purged by this batch is defined by the system parameter Inventory Adjustment Months.
Refresh End of Day Inventory Snapshot (refeodinventory)
Module Name |
refeodinventory.ksh |
Description |
Refresh End of Day Inventory Snapshot |
Functional Area |
Inventory Tracking |
Module Type |
Business Processing |
Module Technology |
Ksh |
Catalog ID |
RMS303 |
Wrapper Script |
rmswrap_shell.ksh |
Design Overview
This script refreshes the item/location stock on hand end of day snapshot. This end of day snapshot is used for assorted history build programs. The script does the following:
-
Truncates the item/location stock on hand end of day snapshot table.
-
Inserts all records from the item/location stock on hand table into the item/location stock on hand end of day snapshot table.
Design Assumptions
-
All of the daily updates pertaining to stock on hand have been performed during prior batch phases.
-
The executing schema has DROP ANY TABLE privileges. This is needed to perform the truncate on the item/location end of day snapshot table.
-
The item/location end of day snapshot table is owned by the schema name specified in the TABLE_OWNER column of the SYSTEM_OPTIONS view.