Purge Into History Tables (b8d_sa_purge)

Module Name

b8saprgb.pls/ b8saprgs.pls

Description

Purge records into History tables

Functional Area

Financial data

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 based on the Store/Day, Sales Audit System Options, and Period tables. 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 records from the base tables based on Store Day Sequence Number, Store, and Business Day. Using bulk processing, this program will filter the records from the tables and insert the records into the history tables. Then the inserted records will be deleted from the base tables.

The decision to insert or not to insert the records into the history tables is based on the Archive Indicator and Archive Job Indicator from the Background Process Configuration table.

  1. If the both the Archive Indicator and Archive Job Indicator values are Y, then the data from the base tables are inserted into the history tables.

  2. If both indicators are set to 'N', then the records are deleted from the base tables without inserting into the history tables.

Restart/Recovery

N/A

Key Tables Affected

Table Select Insert Update Delete

PERIOD

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

RMS_BATCH_STATUS

Yes

No

No

No

B8D_PROCESS_CONFIG

Yes

No

No

No

B8D_SA_PURGE_STG

No

Yes

No

No

ALL_PART_TABLES

Yes

No

No

No

SA_COMMENTS_HIST

No

Yes

No

No

SA_CUSTOMER_HIST

No

Yes

No

No

SA_CUST_ATTRIB_HIST

No

Yes

No

No

SA_ERROR_HIST

No

Yes

No

No

SA_ERROR_REV_HIST

No

Yes

No

No

SA_EXPORTED_HIST

No

Yes

No

No

SA_EXPORTED_REV_HIST

No

Yes

No

No

SA_EXPORT_LOG_HIST

No

Yes

No

No

SA_FLASH_SALES_HIST

No

Yes

No

No

SA_HQ_VALUE_HIST

No

Yes

No

No

SA_IMPORT_LOG_HIST

No

Yes

No

No

SA_MISSING_TRAN_HIST

No

Yes

No

No

SA_POS_VALUE_HIST

No

Yes

No

No

SA_STORE_DAY_HIST

No

Yes

No

No

SA_STORE_VALUE_HIST

No

Yes

No

No

SA_SYS_VALUE_HIST

No

Yes

No

No

SA_TOTAL_HIST

No

Yes

No

No

SA_TRAN_DISC_HIST

No

Yes

No

No

SA_TRAN_DISC_REV_HIST

No

Yes

No

No

SA_TRAN_HEAD_HIST

No

Yes

No

No

SA_TRAN_HEAD_REV_HIST

No

Yes

No

No

SA_TRAN_IGTAX_HIST

No

Yes

No

No

SA_TRAN_IGTAX_REV_HIST

No

Yes

No

No

SA_TRAN_ITEM_HIST

No

Yes

No

No

SA_TRAN_ITEM_REV_HIST

No

Yes

No

No

SA_TRAN_PAYMENT_HIST

No

Yes

No

No

SA_TRAN_PAYMENT_REV_HIST

No

Yes

No

No

SA_TRAN_TAX_HIST

No

Yes

No

No

SA_TRAN_TAX_REV_HIST

No

Yes

No

No

SA_TRAN_TENDER_HIST

No

Yes

No

No

SA_TRAN_TENDER_REV_HIST

No

Yes

No

No

SA_COMMENTS

Yes

No

No

Yes

SA_CUSTOMER

Yes

No

No

Yes

SA_CUST_ATTRIB

Yes

No

No

Yes

SA_ERROR

Yes

No

No

Yes

SA_ERROR_REV

Yes

No

No

Yes

SA_EXPORTED

Yes

No

No

Yes

SA_EXPORTED_REV

Yes

No

No

Yes

SA_EXPORT_LOG

Yes

No

No

Yes

SA_FLASH_SALES

Yes

No

No

Yes

SA_HQ_VALUE

Yes

No

No

Yes

SA_IMPORT_LOG

Yes

No

No

Yes

SA_MISSING_TRAN

Yes

No

No

Yes

SA_POS_VALUE

Yes

No

No

Yes

SA_STORE_DAY

Yes

No

No

Yes

SA_STORE_VALUE

Yes

No

No

Yes

SA_SYS_VALUE

Yes

No

No

Yes

SA_TOTAL

Yes

No

No

Yes

SA_TRAN_DISC

Yes

No

No

Yes

SA_TRAN_DISC_REV

Yes

No

No

Yes

SA_TRAN_HEAD

Yes

No

No

Yes

SA_TRAN_HEAD_REV

Yes

No

No

Yes

SA_TRAN_IGTAX

Yes

No

No

Yes

SA_TRAN_IGTAX_REV

Yes

No

No

Yes

SA_TRAN_ITEM

Yes

No

No

Yes

SA_TRAN_ITEM_REV

Yes

No

No

Yes

SA_TRAN_PAYMENT

Yes

No

No

Yes

SA_TRAN_PAYMENT_REV

Yes

No

No

Yes

SA_TRAN_TAX

Yes

No

No

Yes

SA_TRAN_TAX_REV

Yes

No

No

Yes

SA_TRAN_TENDER

Yes

No

No

Yes

SA_TRAN_TENDER_REV

Yes

No

No

Yes

SA_CUSTOMER

Yes

No

No

Yes

SA_POS_VALUE_WKSHT

Yes

No

No

Yes

SA_SYS_VALUE_WKSHT

Yes

No

No

Yes

SA_ERROR_WKSHT

Yes

No

No

Yes

SA_STORE_ACH

Yes

No

No

Yes

SA_ESCHEAT_VOUCHER

Yes

No

No

Yes

SA_ESCHEAT_TOTAL

Yes

No

No

Yes

KEY_MAP_GL

Yes

No

No

Yes

SA_GL_REF_DATA

Yes

No

No

Yes

SA_STORE_DAY_WRITE_LOCK

Yes

No

No

Yes