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 |
|
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_job |
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 will purge aged inventory adjustment and aged item transformation records. This 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 and item transformation table based on its purge criteria from system parameter settings. The Inventory Adjustment Months parameter will determine records to be kept before they are purged if adjustment date has elapsed from this pre-determined number of months. The Inventory Adjustment Months parameter will also determine the item transformation records to be kept before they are purged if the transformation date has elapsed this 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 tables. Using bulk processing, this program will first delete the records from inventory adjustment table followed by the item transformation tables. 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.
Key Tables Affected
Table 12-2 Key Tables Affected
Table | Select | Insert | Update | Delete |
---|---|---|---|---|
PURGE_CONFIG_OPTIONS |
Yes |
No |
No |
No |
PERIOD |
Yes |
No |
No |
No |
RMS_BATCH_STATUS |
Yes |
No |
No |
No |
B8D_PROCESS_CONFIG |
Yes |
No |
No |
No |
JOB_AUDIT_LOGS |
No |
Yes |
No |
No |
B8D_INV_ADJ_PURGE_STG |
Yes |
Yes |
No |
Yes |
INV_ADJ_PRG_HIST |
No |
Yes |
No |
No |
INV_ADJ |
No |
No |
No |
Yes |
B8D_ITEM_TRANSFORMATION_PURGE_STG |
Yes |
Yes |
No |
Yes |
ITEM_TRANSFORMATION_WO_PRG_HIST |
No |
Yes |
No |
No |
ITEM_TRANSFORMATION_WO |
Yes |
No |
No |
Yes |
ITEM_TRANSFORMATION_DETAIL_PRG_HIST |
No |
Yes |
No |
No |
ITEM_TRANSFORMATION_DETAIL |
Yes |
No |
No |
Yes |
ITEM_TRANSFORMATION_HEAD_PRG_HIST |
No |
Yes |
No |
No |
ITEM_TRANSFORMATION_HEAD |
Yes |
No |
No |
Yes |
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. This batch will also delete all item transformation records whose transformation date has elapsed a pre-determined number of months. The number of months that inventory adjustment and item transformation 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.
Upload Stock Count Results from sim_rms_* input Table to svc_stkupld_* Staging Tables (simrmsstockcountupload)
Module Name |
simrmsstockcountupload.ksh |
Description |
Upload stock count results into staging tables. |
Functional Area |
Stock Counts |
Module Type |
Business Processing |
Module Technology |
ksh |
Catalog ID |
|
Wrapper Script |
rmswrap_shell.ksh |
Design Overview
This shell script uploads stock counts from the SIM inbound tables into the SVC_STKUPLD_*
tables for
further processing by the stockcountprocess
batch. These tables serve as the interface by which the Merchandising
core stock upload process updates the system with the actual inventory counts from the input tables.
The program retrieves records from the SIM_RMS_*
input tables that are in N
(new) status
and processes each record in parallel depending on the number of threads specified in the rms_plsql_batch_config
table. Data validation will be performed before loading into the SVC_STKUPLD_FHEAD
, SVC_STKUPLD_FDETL
, and SVC_STKUPLD_FTAIL
tables. After a successful load, data is deleted from the input tables. This is
scheduled to run in the nightly batch after stockcountupld
and before stockcountprocess
.
Wrapper for SIM_RMS_* APIs (batch_sim_rms_import.ksh)
Module Name |
batch_sim_rms_import.ksh |
Description |
This is a wrapper script that calls the individual SIOCS to Merchandising APIs. |
Functional Area |
Cross Pillar |
Module Type |
Business Processing |
Module Technology |
ksh |
Catalog ID |
|
Runtime Parameters |
N/A |
Design Overview
A set of import tables in Merchandising, prefixed with SIM_RMS_
are exposed to SIOCS. These tables are
populated with data from SIOCS, similar to how SIOCS populates staging tables to publish messages to RICS. This wrapper is
used to process records from the SIOCS input tables into Merchandising. Below are the individual importer APIs that this
wrapper supports:
-
SIM_RMS_IMPORT_ASNOUT
-
SIM_RMS_IMPORT_DSD_RECEIPT
-
SIM_RMS_IMPORT_INVADJ
-
SIM_RMS_IMPORT_INVENTORY_REQUEST
-
SIM_RMS_IMPORT_PO_RECEIPT
-
SIM_RMS_IMPORT_RTV
-
SIM_RMS_IMPORT_STOCK_ORDER_RECEIPT
-
SIM_RMS_IMPORT_STOCK_ORDER_STATUS
-
SIM_RMS_IMPORT_STOCK_COUNT_SCHEDULE
-
SIM_RMS_IMPORT_FDG
The above APIs transform the data to call the same business logic used by RICS.