Mirror of Oracle documentation

Converted for search and offline reading. Authoritative source: Oracle. Diagrams and some complex tables are simplified — check the PDF when in doubt.

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:

  • Adjust Inventory for Wastage Items (wasteadj)

  • Purge Aged Customer Orders (customer_order_purge.ksh)

  • Purge Aged Customer Orders (customer_orders_purge_job) - background job

  • Purge Aged Inventory Adjustments (inv_adj_purge_job) - background job

  • Purge Aged Inventory Adjustments (invaprg)

  • Refresh End of Day Inventory Snapshot (refeodinventory)

  • Upload Stock Count Results from sim_rms_* input Table to svc_stkupld_* Staging Tables (simrmsstockcountupload)

  • Wrapper for SIM_RMS_* APIs (batch_sim_rms_import.ksh)

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

Schedule

Oracle Retail Merchandising Batch Schedule

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.

Restart/Recovery

The logical unit of work is an item/location. This batch program commits when the number of records processed has reached commit_max_ctr. If the program aborts, it restarts from the last successfully processed item /location.

Design Assumptions

N/A

First Load of Inventory to Ledger (item_loc_soh_ledger_firstload)

Module Name item_loc_soh_ledger_firstload.ksh Description First Load of Inventory to Ledger Functional Area Inventory Tracking Module Type Business Processing Module Technology Ksh Catalog ID RMS303 Wrapper Script rmswrap_shell.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This job creates the first line of records in the ITEM_LOC_SOH_LEDGER table when the Inventory Layer Ind is Y and the Initialisation Status is I - In Progress in the SYSTEM_OPTIONS and INVENTORY_LAYER_TRACKING tables, respectively. This script will fetch the inventory of the item/ location from the ITEM_LOC_SOH table that has stock on hand greater than 0.

Once the first load is inserted into the ledger table, the script updates the initialisation status to C - Completed in the INVENTORY_LAYER_TRACKING table. This job is a one-time execution and part of a nightly process.

Restart/Recovery

N/A

Design Assumptions

N/A

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

Schedule

Oracle Retail Merchandising Batch Schedule

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.

Restart/Recovery

N/A

Design Assumptions

N/A

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

Schedule

Oracle Retail Merchandising Batch Schedule

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.

Restart/Recovery

N/A

Key Tables Affected

Table 12-1 Key Tables Affected

TableSelectInsertUpdateDelete
ORDCUSTYesNoNoYes
ORDCUST_DETAILYesNoNoYes
ORDCUST_CUSTOMER_DETAI
YesNoNoNo
L
PURGE_CONFIG_OPTIONSYesNoNoNo
PERIODYesNoNoNo

Security Considerations

N/A

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

Schedule

Oracle Retail Merchandising Batch Schedule

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.

Restart/Recovery

N/A

Key Tables Affected

Table 12-2 Key Tables Affected

TableSelectInsertUpdateDelete
PURGE_CONFIG_OPTIONSYesNoNoNo
PERIODYesNoNoNo
RMS_BATCH_STATUSYesNoNoNo
B8D_PROCESS_CONFIGYesNoNoNo
JOB_AUDIT_LOGSNoYesNoNo
B8D_INV_ADJ_PURGE_STGYesYesNoYes
INV_ADJ_PRG_HISTNoYesNoNo
INV_ADJNoNoNoYes
B8D_ITEM_TRANSFORMATION
_PURGE_STG
YesYesNoYes
ITEM_TRANSFORMATION_WO_
PRG_HIST
NoYesNoNo
ITEM_TRANSFORMATION_WOYesNoNoYes
ITEM_TRANSFORMATION_DET
AIL_PRG_HIST
NoYesNoNo
ITEM_TRANSFORMATION_DET
AIL
YesNoNoYes

Table 12-2 (Cont.) Key Tables Affected

TableSelectInsertUpdateDelete
ITEM_TRANSFORMATION_HEANoYesNoNo
D_PRG_HIST
ITEM_TRANSFORMATION_HEA
D
YesNoNoYes

Design Assumptions

N/A

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

Schedule

Oracle Retail Merchandising Batch Schedule

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.

Restart/Recovery

N/A

Design Assumptions

N/A

Purged the Inventory Layer from Ledger Table (purge_item_loc_soh_ledger)

Module Name purge_item_loc_soh_ledger.ksh Description Purged the Inventory Layer from Ledger table Functional Area Inventory Tracking Module Type Business Processing Module Technology Ksh Catalog ID RMS303 Wrapper Script rmswrap_shell.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This job purged the data from the ITEM_LOC_SOH_LEDGER table based on the number of retention days (that is, INVENTORY_LAYER_HIST_DAYS ) mentioned in SYSTEM_OPTIONS . Records that have 0 stocks and a last update date past the number of retention days are being purged. This job is a part of the nightly process.

Restart/Recovery

N/A

Design Assumptions

N/A

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

Schedule

Oracle Retail Merchandising Batch Schedule

Upload Stock Count Results from sim_rms_* input Table to svc_stkupld_* Staging Tables (simrmsstockcountupload)

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 into the item/location stock on hand end of day snapshot table all records from the item/location stock on hand table reflecting the current business date transactions. The current business date transactions are based on the FLASHBACK_SCN captured in the FLASHBACK_SNAPSHOT_INFO table for the process_name SCCEXT_SALSTAGE_REFEODINVENTORY .

Restart/Recovery

N/A

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

Schedule

Oracle Retail Merchandising Batch Schedule

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 .

Design Assumptions

N/A

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

Schedule

Oracle Retail Merchandising Batch Schedule

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

  • SIM_RMS_STORE_ORDER_REVIEW

The above APIs transform the data to call the same business logic used by RICS.

Restart/Recovery

N/A

Design Assumptions

N/A


In this guide

  • 17 Stock LedgerBatch Operations Guide · shares FLASHBACK_SCN, FLASHBACK_SNAPSHOT_INFO, SCCEXT_SALSTAGE_REFEODINVENTORY
  • 6 DealsBatch Operations Guide · shares ITEM_LOC_SOH_LEDGER, PURGE_CONFIG_OPTIONS