End Of Half Rollup of Data/Calculations for Stock Ledger (saleoh)

Module Name

saloeh.pc

Description

End Of Half Rollup of Data/Calculations for Stock Ledger

Functional Area

Stock Ledger

Module Type

Business Processing

Module Technology

ProC

Catalog ID

RMS337

Wrapper Script

rmswrap_multi.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

The End of Half Stock Ledger Processing is different from many of the other 'End of' processes in that it is also the program that controls how many months of stock ledger data remain on the tables, in addition to the updates to the Half Data table. This program should be run after the end-of-month processing for month 6 has run and before the end-of-month processing for month 1 has run.

The first step for this program is to delete records from stock ledger tables that are 18 months or older. Specifically, the tables that are deleted from are DAILY_DATA, WEEK_DATA, MONTH_DATA, HALF_DATA, and HALF_DATA_BUDGET. The 18-month limit is not a system parameter - it is hard-coded into the program.

The next step in this program is for new records to be written into HALF_DATA_BUDGET for each department/location for next year's half.

This program also rolls up the inter-stock take shrink amount and inter-stock take sales amount from the HALF_DATA table at the department/location level for this half and calculates the shrinkage percent to insert into HALF_DATA_BUDGET for the next year's half.

Restart/Recovery

There is no main driving cursor for this program. The different functions of this batch program have their own driving cursors. All the driving cursors are threaded by department using the v_restart_dept view. The logical unit of work (LUW) for the delete functions is a half number while the different insert functions have the following LUWs

  • half_data() - dept/class/subclass/location

  • half_data_budget() - dept/location

Data is committed every time the number of rows processed exceeds commit_max_ctr.

Design Assumptions

N/A