Purge Closed Deals (deal_purge_job)
Module Name |
deal_purge_job |
Description |
Purge Closed Deals |
Functional Area |
Deals |
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 complex deal header and fixed deals tables based on its purge criteria from system parameter settings. The Deal History Months parameter will determine old/aged deals after they have held in specific number of months after they were closed. PO-specific deals will not be covered in this purge processing. 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 either complex deal related tables or fixed deal related tables depending if indicator is complex deal or not. For Fixed Deals, DELETE_RECORDS_SQL.DEL_FIXED_DEAL is called while complex deals will be processed with call to DELETE_RECORDS_SQL.DEL_DEAL. 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 6-2 Key Tables Affected
Table | Select | Insert | Update | Delete |
---|---|---|---|---|
DEAL_HEAD |
Yes |
No |
No |
Yes |
SYSTEM_OPTIONS |
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_DEAL_PURGE_STG |
Yes |
Yes |
No |
Yes |
DEAL_HEAD_CFA_EXT |
No |
No |
No |
Yes |
FIXED_DEAL |
Yes |
No |
No |
Yes |
DEAL_ITEM_LOC_EXPLODE |
No |
No |
No |
Yes |
DEAL ACTUALS_FORECAST |
No |
No |
No |
Yes |
DEAL_ITEMLOC_DIV_GRP |
No |
No |
No |
Yes |
DEAL_ITEMLOC_DCS |
No |
No |
No |
Yes |
DEAL_ITEMLOC_ITEM |
No |
No |
No |
Yes |
DEAL_ITEMLOC_PARENT_DIFF |
No |
No |
No |
Yes |
DEAL_COMP_PROM |
No |
No |
No |
Yes |
DEAL_PROM |
No |
No |
No |
Yes |
DEAL_THRESHOLD_REV |
No |
No |
No |
Yes |
DEAL_THRESHOLD |
No |
No |
No |
Yes |
DEAL_QUEUE |
No |
No |
No |
Yes |
POP_TERMS_FULFILLMENT |
No |
No |
No |
Yes |
POP_TERMS_DEF |
No |
No |
No |
Yes |
DEAL_DETAIL |
No |
No |
No |
Yes |
FIXED_DEAL_MERCH_LOC |
No |
No |
No |
Yes |
FIXED_DEAL_MERCH |
No |
No |
No |
Yes |
FIXED_DEAL_DATES |
No |
No |
No |
Yes |
FIXED_DEAL_GL_REF_DATA |
No |
No |
No |
Yes |
KEY_MAP_GL |
No |
No |
No |
Yes |