Go to primary content
Oracle® Retail Merchandising System Operations Guide, Volume 1 - Batch Overviews and Designs
16.0.024
E89599-02
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

7 Deals

Deals are complex business processes that can either affect the cost a retailer pays for goods purchased from a supplier (off invoice deals) or generate income from suppliers/partners (billback/rebate deals). These basic types of deals require different processing. This chapter contains information about the batch processes that support all types of Deals.

For additional information about Deals, including detailed flow diagrams, see the Merchandising Functional Library (Doc ID: 1585843.1).


Note:

The White Papers in this library are intended only for reference and educational purposes and may not reflect the latest version of Oracle Retail software.

Program Summary

Table 7-1 Deals - Program Summary

Program Description

dealupld.pc

Upload of Deals from 3rd Party Systems

batch_ditinsrt.ksh

Deal Calculation Queue Insert Multithreading

ditinsrt.pc

Insert into Deal Calculation Queue

discotbapply.pc

Update OTB After Deal Discounts

dealact.pc

Calculate Actual Impact of Billback Deals

dealinc.pc

Calculate Weekly/Monthly Income Based on Turnover

dealday.pc

Daily Posting of Deal Income to Stock & General Ledgers

dealfct.pc

Calculates/Update Forecasted Values for Deals

vendinvc.pc

Stage Complex Deal Invoice Information

vendinvf.pc

Stage Fixed Deal Invoice Information

dealcls.pc

Close Expired Deals

dealprg.pc

Purge Closed Deals


dealupld (Upload of Deals from 3rd Party Systems)

Module Name dealupld.pc
Description Upload of Deals from 3rd Party Systems
Functional Area Deals
Module Type Integration
Module Technology ProC
Catalog ID RMS42
Runtime Parameters NA

Design Overview

Dealupld.pc uploads deals from external systems into RMS. Generally, deals are uploaded from merchandise suppliers and other trading partners. Dealupld uses a proprietary file format (not any EDI standard).

Both deals uploaded via dealupld.pc and deals created via the user interface are written to a series of deals tables for deals processing.

Scheduling Constraints

Table 7-2 Scheduling Constraints

Schedule Information Description

Frequency

Daily

Scheduling Considerations

This program should run as the first batch in the Deals batch schedule.

Pre-Processing

NA

Post-Processing

NA


Restart/Recovery

The program uses File based restart recovery process.

Key Tables Affected

Table 7-3 Key Tables Affected

Table Select Insert Update Delete

ORDHEAD

Yes

No

No

No

SUPS

Yes

No

No

No

UOM_CLASS

Yes

No

No

No

DEAL_COMP_TYPE

Yes

No

No

No

DEPS

Yes

No

No

No

GROUPS

Yes

No

No

No

ITEM_MASTER

Yes

No

No

No

ITEM_SUPPLIER

Yes

No

No

No

STORE

Yes

No

No

No

DISTRICT

Yes

No

No

No

REGION

Yes

No

No

No

AREA

Yes

No

No

No

CHAIN

Yes

No

No

No

WH

Yes

No

No

No

LOC_LIST_HEAD

Yes

No

No

No

LOC_LIST_DETAIL

Yes

No

No

No

COUNTRY

Yes

No

No

No

PACKITEM_BREAKOUT

Yes

No

No

No

PACKITEM

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

DEAL_HEAD

No

Yes

No

No

DEAL_DETAIL

No

Yes

No

No

DEAL_ITEM_LOC

No

Yes

No

No

POP_TERMS_DEF

No

Yes

No

No

DEAL_THRESHOLD

No

Yes

No

No

PARTNER_ORG_UNIT

Yes

No

No

No


Integration Contract

Integration Type Upload to RMS
File Name Determined by runtime parameter
Integration Contract IntCon000008

The input file structure should be as below:

FHEAD
{
THEAD   of DHDTL        REQUIRED        for deal head record
                TDETL           REQUIRED        1 deal head record
        TTAIL                   REQUIRED        end of deal head record
        THEAD   of DCDTL        REQUIRED        for deal component records
        [
                TDETL           OPTIONAL        for deal component records
]
        TTAIL                   REQUIRED        end of deal component records
        THEAD   of DIDTL        REQUIRED        for item-loc records
        [
                TDETL           OPTIONAL        for item-loc records
        ]
        TTAIL                   REQUIRED        end of item-loc records
        THEAD of PPDTL  REQUIRED        for proof of performance records
        [
                TDETL           OPTIONAL        for proof of performance records
        ]
        TTAIL                   REQUIRED        end of proof of performance records
        THEAD   of DTDTL        REQUIRED        for threshold records
        [
                TDETL           OPTIONAL        for threshold records
        ]
        TTAIL                   REQUIRED        end of threshold records
}
FTAIL

Table 7-4 dealupld.pc - Input File Layout

Record Name Field Name Field Type Default Value Description

FHEAD

File Type Record Descriptor

Char(5)

FHEAD

Identifies file record type (the beginning of the input file)

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

File Type Definition

Char(5)

EDIDU

Identifies file as ’EDI Deals Upload'

File Create Date

Char(14)

Create date

Current date, formatted to ’YYYYMMDDHH24MISS'

THEAD

File Type Record Descriptor

Char(5)

THEAD

Identifies file record type to upload a new deal header

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Transaction Detail Record Type

Char(5)

DHDTL

Identifies file record type Deal Header. This record MUST BE FOLLOWED BY ONE AND ONLY ONE REQUIRED TDETL RECORD that holds the deal head information

TDETL

File Type Record Descriptor

Char(5)

TDETL

Identifies file record type to upload a new deal

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Partner Type

Char(6)

REQUIRED

Type of the partner the deal applies to. Valid values are ’S' for a supplier, 'S1' for supplier hierarchy level 1 (for example, the manufacturer), 'S2' for supplier hierarchy level 2 (for example, the distributor) and 'S3' for supplier hierarchy level 3 (that is, the wholesaler). Descriptions of these codes will be held on the codes table under a code_type of 'SUHL'

Information pertaining to a single deal has to belong to the same supplier, since a deal may have only one supplier hierarchy associated with it. Only items with the same supplier hierarchy can be on the same deal. Supplier hierarchy is stored at an item / supplier / country / location level

Partner Id

Char(10)

Blank (space character string)

Level of supplier hierarchy (for example, manufacturer, distributor or wholesaler), set up as a partner in the PARTNER table, used for assigning rebates by a level other than supplier. Rebates at this level will include all eligible supplier/item/country records assigned to this supplier hierarchy level

This field is required if the Partner Type field was set to ’S1', ’S2' or ’S3'. This field must be blank if the Partner Type field was set to ’S'


Supplier

Number (10)

Blank (space character string)

Deal supplier's number. This supplier can be at any level of supplier hierarchy

This field is required if the Partner Type field was set to ’S'. This field must be blank if the Partner Type field was set to ’S1', ’S2' or ’S3'

Type

Char(6)

REQUIRED

Type of the deal. Valid values are A for annual deal, P for promotional deal, O for PO-specific deal or M for vendor-funded markdown. Deal types will be held on the codes table under a code type of 'DLHT'

Currency Code

Char(3)

Blank (space character string)

Currency code of the deal's currency. All costs on the deal will be held in this currency

If Type is 'O', 'P' or 'A', then Currency Code may not be blank. Currency Code has to be blank if Type is 'M'

Active Date

Char(14)

REQUIRED

Date the deal will become active. This date will determine when deal components begin to be factored into item costs. For a PO-specific deal, the active_date will be the order's written date

Close Date

Char(14)

Blank (space character string)

Date the deal will/did end. This date determines when deal components are no longer factored into item costs. It is optional for annual deals, required for promotional deals. It will be left NULL for PO-specific deals

Close Date must not be blank if Type is 'P' or ’M'. Close Date has to be blank if Type is 'O'

External Reference Number

Char(30)

Blank (space character string)

Any given external reference number that is associated with the deal

Order Number

Number (12)

Blank (space character string)

Order the deal applies to, if the deal is PO-specific


Recalculate Approved Orders

Char(1)

REQUIRED

Indicates if approved orders should be recalculated based on this deal once the deal is approved. Valid values are Y for yes or N for no

Valid values are ’Y' and ’N'

Comments

Char (2000)

Blank (space character string)

Free-form comments entered with the deal

Billing Type

Char(6)

REQUIRED

Billing type of the deal component.

Valid values are 'OI' for off-invoice, 'BB' for bill-back, ’VFP' for vendor funded promotion and ’VFM' for vendor funded markdown. Billing types will be held on the codes table under a code type of 'DLBT'

Bill Back Period

Char(6)

Blank (space character string)

Code that identifies the bill-back period for the deal component. This field will only be populated for billing types of 'BB' or 'VFP' or ’VFM'. Valid bill back period codes are ’W', ’M', ’Q', ’H', ’A'.

If Billing Type is 'BB' then Bill Back Period must not be blank; if Billing Type is ’OI' (off invoice), then Bill back Period has to be blank

Deal Application Timing

Char(6)

Blank (space character string)

Indicates when the deal component should be applied - at PO approval or time of receiving. Valid values are 'O' for PO approval, 'R' for receiving. These values will be held on the codes tables under a code type of 'AALC'. It must be NULL for an M-type deal (vendor funded markdown)


Threshold Limit Type

Char(6)

Blank (space character string

Identifies whether thresholds will be set up as qty values, currency amount values or percentages (growth rebates only). Valid values are 'Q' for qty, 'A' for currency amount. Threshold limit types will be held on the codes table under a code type of 'DLLT'. It must be NULL for an M-type deal (vendor funded markdown) or if the threshold value type is ’Q' (buy/get deals).

If Growth Rebate Indicator is 'Y', then the Threshold Limit Type has to be 'Q', 'A' or NULL

Type

Char(6)

REQUIRED

Type of the deal. Valid values are A for annual deal, P for promotional deal, O for PO-specific deal or M for vendor-funded markdown. Deal types will be held on the codes table under a code type of 'DLHT'

Currency Code

Char(3)

Blank (space character string)

Currency code of the deal's currency. All costs on the deal will be held in this currency

If Type is 'O', 'P' or 'A', then Currency Code may not be blank. Currency Code has to be blank if Type is 'M'

Active Date

Char(14)

REQUIRED

Date the deal will become active. This date will determine when deal components begin to be factored into item costs. For a PO-specific deal, the active_date will be the order's written date

Close Date

Char(14)

Blank (space character string)

Date the deal will/did end. This date determines when deal components are no longer factored into item costs. It is optional for annual deals, required for promotional deals. It will be left NULL for PO-specific deals

Close Date must not be blank if Type is 'P' or 'M'. Close Date has to be blank if Type is 'O'


External Reference Number

Char(30)

Blank (space character string)

Any given external reference number that is associated with the deal

Order Number

Number (12)

Blank (space character string)

Order the deal applies to, if the deal is PO-specific

Recalculate Approved Orders

Char(1)

REQUIRED

Indicates if approved orders should be recalculated based on this deal once the deal is approved. Valid values are Y for yes or N for no

Valid values are 'Y' and 'N'

Comments

Char (2000)

Blank (space character string)

Free-form comments entered with the deal

Billing Type

Char(6)

REQUIRED

Billing type of the deal component. Valid values are 'OI' for off-invoice, 'BB' for bill-back, 'VFP' for vendor funded promotion and 'VFM' for vendor funded markdown. Billing types will be held on the codes table under a code type of 'DLBT'

Bill Back Period

Char(6)

Blank (space character string)

Code that identifies the bill-back period for the deal component. This field will only be populated for billing types of 'BB' or 'VFP' or 'VFM'. Valid bill back period codes are 'W', 'M', 'Q', 'H', 'A'.

If Billing Type is 'BB' then Bill Back Period must not be blank; if Billing Type is 'OI' (off invoice), then Bill back Period has to be blank

Deal Application Timing

Char(6)

Blank (space character string)

Indicates when the deal component should be applied - at PO approval or time of receiving. Valid values are 'O' for PO approval, 'R' for receiving. These values will be held on the codes tables under a code type of 'AALC'. It must be NULL for an M-type deal (vendor funded markdown)


Threshold Limit Type

Char(6)

Blank (space character string)

Identifies whether thresholds will be set up as qty values, currency amount values or percentages (growth rebates only). Valid values are 'Q' for qty, 'A' for currency amount. Threshold limit types will be held on the codes table under a code type of 'DLLT'. It must be NULL for an M-type deal (vendor funded markdown) or if the threshold value type is 'Q' (buy/get deals).

If Growth Rebate Indicator is 'Y', then the Threshold Limit Type has to be 'Q', 'A' or NULL

Threshold Limit Unit of Measure

Char(4)

Blank (space character string)

Unit of measure of the threshold limits, if the limit type is quantity. Only Unit of Measures with a UOM class of 'VOL' (volume), 'MASS' or 'QTY' (quantity) can be used in this field. Valid Unit of Measures can be found on the UOM_CLASS table

If the Threshold Limit Type is 'A', then Threshold Limit Unit of Measure has to be blank. If the Threshold Limit Type is 'Q', Threshold Limit Unit of Measure must not be blank. If Threshold Limit Type is blank, Threshold Limit Unit of Measure must be blank.

Rebate Indicator

Char(1)

REQUIRED

Indicates if the deal component is a rebate. Deal components can only be rebates for bill-back billing types. Valid values are 'Y' for yes or 'N' for no.

If Billing Type is 'OI', then Rebate Indicator must be 'N'.


Rebate Calculation Type

Char(6)

Blank (space character string)

Indicates if the rebate should be calculated using linear or scalar calculation methods. Valid values are 'L' for linear or 'S' for scalar. This field will be required if the rebate indicator is 'Y'. Rebate calculation types will be held on the codes table under a code type of 'DLCT'

If Rebate Indicator is 'Y', then Rebate Calculation Type must not be blank. Otherwise it has to be blank.

Growth Rebate Indicator

Char(1)

REQUIRED

Indicates if the rebate is a growth rebate, meaning it is calculated and applied based on an increase in purchases or sales over a specified period of time. Valid values are 'Y' for yes or 'N' for noIf Rebate Indicator is 'N', then Growth Rebate Indicator must be ’N'.

Historical Comparison Start Date

Char(14)

Blank (space character string)

The first date of the historical period against which growth will be measured in this growth rebate. Note performance and the rebate amount are not calculated - this field is for informational/reporting purposes only

If Growth Rebate Indicator is 'Y', then Historical Comparison Start Date must not be blank. Otherwise it must be blank.

Historical Comparison End Date

Char(14)

Blank (space character string)

The last date of the historical period against which growth will be measured in this growth rebate. Note performance and the rebate amount are not calculated - this field is for informational/reporting purposes only

If Growth Rebate Indicator is 'Y', then Historical Comparison End Date must not be blank. Otherwise it must be blank.


Rebate Purchases or Sales Application Indicator

Char(6)

Blank (space character string)

Indicates if the rebate should be applied to purchases or sales. Valid values are 'P' for purchases or 'S' for sales. It will be required if the rebate indicator is 'Y'. Rebate purchase/sales indicators will be held on the codes table under a code type of 'DLRP'

If the Rebate Indicator is 'Y', then the Rebate Purchases or Sales Application Indicator must not be blank. Otherwise it has to be blank.

Security Indicator

Char

Y

Security Indicator

TTAIL

File Line Identifier

Char(5)

TTAIL

TTAIL Identifies file record type (the end of the transaction detail)

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Transaction Record Counter

Numeric ID(6)

Sequential number

Created by program.

Number of records/transactions in current transaction set (only records between thead and ttail). For DHDTL TDETL records this will always be 1

THEAD

File Type Record Descriptor

Char(5)

THEAD

Identifies file record type to upload a new deal sub loop

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Transaction Detail Record Type

Char(5)

DCDTL

Identifies file record type of sub loop as Deal Component Detail

TDETL

File Type Record Descriptor

Char(5)

TDETL

Identifies file record type to upload deal components

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Deal Component Type

Char(6)

REQUIRED

Type of the deal component, user-defined and stored on the DEAL_COMP_TYPE table


Application Order

Number (10)

Blank (space character string)

Number indicating the order in which the deal component should be applied with respect to any other deal components applicable to the item within the deal. This number will be unique across all deal components within the deal. It must be NULL for an M-type deal (vendor funded markdown)

Collect Start Date

Char(14)

Blank (space character Deal Component Type string)

Date that collection of the bill-back should begin

If Billing Type is 'BB' then Collect Start Date must not be blank, otherwise it has to be blank

Collect End Date

Char(14)

Blank (space character string)

Date that collection of the bill-back should end

If Billing Type is 'BB' then Collect End Date must not be blank, otherwise it has to be blank

Cost Application Level Indicator

Char(6)

Blank (space character string)

Indicates what cost bucket the deal component should affect. Valid values are 'N' for net cost, 'NN' for net cost and 'DNN' for dead net cost. These values will be held on the codes tables under a code type of 'DLCA'. It must be NULL for an M-type deal (vendor funded markdown)

Pricing Cost Indicator

Char(1)

REQUIRED

Identifies deal components that should be included when calculating a pricing cost

Valid values are 'Y'es and 'N'o


Deal Class

Char(6)

Blank (space character string)

Identifies the calculation class of the deal component. Valid values are 'CU' for cumulative (discounts are added together and taken off as one lump sum), 'CS' for cascade (discounts are taken one at a time with subsequent discounts taken off the result of the previous discount) and 'EX' for exclusive (overrides all other discounts). 'EX' type deal components are only valid for promotional deals. Deal classes will be held on the codes table under a code type of 'DLCL'. It must be NULL for an M-type deal (vendor funded markdown)

Threshold Value Type

Char(6)

Blank (space character string)

Identifies whether the discount values associated with the thresholds will be set up as qty values, currency amount values, percentages or fixed amounts. Valid values are 'Q' for qty, 'A' for currency amount, 'P' for percentage or 'F' for fixed amount. Qty threshold value (buy/get) deals are only allowed on off-invoice discounts. Deal threshold value types will be held on the codes table under a code type of 'DLL2'. It must be NULL for an M-type deal (vendor funded markdown).

If Billing Type is 'BB', then the Threshold Value Type must be'A' or ’P'

Buy Item

Char(25)

Blank (space character string)

Identifies the item that must be purchased for a quantity threshold-type discount. This value is required for quantity threshold value type discounts. Otherwise it has to be blank


Get Type

Char(6)

Blank (space character string)

Identifies the type of the 'get' discount for a quantity threshold-type (buy/get) discount. Valid values include 'X' (free), 'P' (percent), 'A' (amount) and 'F' (fixed amount). They are held on the codes table under a code type of 'DQGT'. This value is required for quantity threshold value deals. Otherwise it has to be blank

Get Value

Number(20,4)

All 0s.

Identifies the value of the 'get' discount for a quantity threshold-type (buy/get) discount that is not a 'free goods' deal. The Get Type above identifies the type of this value. This value is required for quantity threshold value type deals that are not a Get Type of free. Otherwise it has to be 0

If Get Type is ’P', ’A' or ’F', then Get Value must not be blank. If the Get Type is ’X' or blank, then Get Value has to be blank

Buy Item Quantity

Number(12,4)

All 0s.

Identifies the quantity of the threshold 'buy' item that must be ordered to qualify for the 'free' item. This value is required for quantity threshold value type discounts. Otherwise it has to be 0

Recursive Indicator

Char(1)

REQUIRED

For 'buy/get free' discounts, indicates if the quantity threshold discount is only for the first 'buy amt.' purchased (such as,. for the first 10 purchased, get 1 free), or if a free item will be given for every multiple of the 'buy amt' purchased on the order (such as,. for each 10 purchased, get 1 free). Valid values are 'Y' for yes or 'N' for no

If the Get Type is blank, then Recursive Indicator has to be ’N'


Buy Item Order Target Quantity

Number(12,4)

All 0s.

Indicates the targeted purchase level for all locations on a purchase order. This is the target level that will be used for future calculation of net cost. This value is required for quantity threshold value type deals. Otherwise it has to be 0

Average Buy Item Order Target Quantity Per Location

Number(12,4)

All 0s.

Indicates the average targeted purchase level per location on the deal. This value will be used in future cost calculations. This value is required for quantity threshold value type deals. Otherwise it has to be 0

Get Item

Char(25)

Blank (space character string)

Identifies the 'get' item for a quantity threshold-type (buy/get) discount. This value is required for quantity threshold value deals. Otherwise it has to be blank

If Get Type is ’P', ’A', ’F' or ’X', then Get Item must not be blank. If the Get Type is blank, then Get Item has to be blank

Get Quantity

Number(12,4)

All 0s.

Identifies the quantity of the identified 'get' item that will be given at the specified 'get' discount if the 'buy amt' of the buy item is purchased. This value is required for quantity threshold value type discounts. Otherwise it has to be 0

If Get Type is ’P', ’A', ’F' or ’X', then Get Quantity must not be 0. If the Get Type is blank, then Get Quantity has to be 0


Free Item Unit Cost

Number(20,4)

All 0s.

For 'buy/get free' discounts, identifies the unit cost of the threshold 'free' item that will be used in calculating the prorated qty. discount. It will default to the item/supplier cost, but can be modified based on the agreement with the supplier. It must be greater than zero as this is the cost that would normally be charged for the goods if no deal applied

If Get Type is ’P', ’A', ’F' or blank, then Free Item Unit Cost must be 0. If the Get Type is ’X', then Free Item Unit Cost must not be 0

Transaction Level Discount Indicator

Char(1)

REQUIRED

Indicates if the discount is a transaction-level discount (such as,. 10% across an entire PO)

Valid Values are 'Y' or 'N'. If set to ’Y', Deal Class has to be ’CU' and Billing Type has to be ’OI'. No DIDTL or PPDTL records may be present for a Transaction Level Discount DCDTL record

Comments

Char(2000)

Blank (space character string)

Free-form comments entered with the deal component

TTAIL

File Line Identifier

Char(5)

TTAIL

Identifies file record type (the end of the transaction detail)

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Transaction Record Counter

Numeric ID(6)

Sequential number

Created by program.

Number of records/transactions in current transaction set (only records between thead and ttail)

THEAD

File Type Record Descriptor

Char(5)

THEAD

Identifies file record type to upload a new deal sub loop

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Transaction Detail Record Type

Char(5)

DIDTL

Identifies file record type of sub loop as Deal Component Item-location Detail

TDETL

File Type Record Descriptor

Char(5)

TDETL

Identifies file record type to upload deal item-location details

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Merchandise Level

Char(6)

REQUIRED

Indicates what level of the merchandise hierarchy the record is at. Valid values include '1' for company-wide (all items), '2' for division, '3' for group, '4' for dept, '5' for class, '6' for subclass, '7' for line, '8' for line/differentiator 1, '9' for line/differentiator 2' '10' for line/differentiator 3, ’11' for line/differentiator 4 and ’12' for. These level types will be held on the codes table under a code type of 'DIML'

Company Indicator

Char(1)

REQUIRED

Indicates if the deal component is applied company-wide (that is, whether all items in the system will be included in the discount or rebate). Valid values are 'Y' for yes and 'N' for no

Division

Number (4)

Blank (space character string)

ID of the division included in or excluded from the deal component. Valid values are on the DIVISION table

If Group is not blank, then Division must not be blank. If Merchandise Level is 2, then Division must not be blank and Group, Department, Class and Subclass must be blank

Group

Number (4)

Blank (space character string).

ID of the group included in or excluded from the deal component. Valid values are on the GROUPS table

If Department is not blank, then Group must not be blank. If Merchandise Level is 3, then Group must not be blank and Department, Class and Subclass must be blank


Department

Number (4)

Blank (space character string).

ID of the department included in or excluded from the deal component. Valid values are on the DEPS table

If Class is not blank, then Department must not be blank. If Merchandise Level is 4, then Department must not be blank and Class and Subclass must be blank

Class

Number (4)

Blank (space character string).

ID of the class included in or excluded from the deal component. Valid values are on the CLASS table

If Subclass is not blank, then Class must not be blank. If Merchandise Level is 5, then Class must not be blank and Subclass must be blank

Subclass

Number (4)

Blank (space character string).

ID of the subclass included in or excluded from the deal component. Valid values are on the SUBCLASS table

If Merchandise Level is 6 or more than 6, then Subclass must not be blank

Item Parent

Char(25)

Blank (space character string)

Alphanumeric value that uniquely identifies the item/group at the level above the item. This value must exist as an item in another row on the ITEM_MASTER table

If Merchandise Level is 7, then Item Parent or Item Grandparent must not be blank (at least one of them has to be given)

Item Grandparent

Char(25)

Blank (space character string)

Alphanumeric value that uniquely identifies the item/group two levels above the item. This value must exist as both an item and an item parent in another row on the ITEM_MASTER table

If Merchandise Level is 7, then Item Parent or Item Grandparent must not be blank (at least one of them has to be given)


Differentiator 1

Char(10)

Blank (space character string)

Diff_group or diff_id that differentiates the current item from its item_parent

If Item Grandparent, Item Parent and Differentiator 2 are blank, then Differentiator 1 must be blank. If Merchandise Level is 8, then Differentiator 1 must not be blank

Differentiator 2

Char(10)

Blank (space character string)

Diff_group or diff_id that differentiates the current item from its item_parent

If Item Grandparent, Item Parent and Differentiator 1 are blank, then Differentiator 2 must be blank. If Merchandise Level is 9, then Differentiator 2 must not be blank

Differentiator 3

Char(10)

Blank (space character string)

Diff_group or diff_id that differentiates the current item from its item_parent

If Item Grandparent, Item Parent and Differentiator 1 and 2 are blank, then Differentiator 3 must be blank. If Merchandise Level is 10, then Differentiator 3 must not be blank

Differentiator 4

Char(10)

Blank (space character string)

Diff_group or diff_id that differentiates the current item from its item_parent

If Item Grandparent, Item Parent and Differentiator 1, 2 and 3 are blank, then Differentiator 4 must be blank. If Merchandise Level is 10, then Differentiator 4 must not be blank

Organizational Level

Char(6)

Blank (space character string)

Indicates what level of the organizational hierarchy the record is at. Valid values include '1' for chain, '2' for area, '3' for region, '4' for district and '5' for location. These level types will be held on the codes table under a code type of 'DIOL'

If company indicator is N, this must not be blank. If location type is warehouse or location list, this must be 5


Chain

Number (10)

Blank (space character string).

ID of the chain included in or excluded from the deal component. Valid values are on the CHAIN table

If org. level is 1, this field must not be blank

Area

Number (10)

Blank (space character string).

ID of the area included in or excluded from the deal component. Valid values are on the AREA table

If org. level is 2, this field and chain must not be blank

Region

Number (10)

Blank (space character string).

ID of the region included in or excluded from the deal component. Valid values are on the REGION table

If org. level is 3, this field, area, and chain must not be blank

District

Number (10)

Blank (space character string).

ID of the district included in or excluded from the deal component. Valid values are on the DISTRICT table

If org. level is 4, then this field, region, area, and chain must not be blank

Location

Number (10)

Blank (space character string).

ID of the location included in or excluded from the deal component. Valid values are on the STORE, WH, or LOC_LIST_HEAD table

If org. level is 5, this field must not be blank. Chain, area, region, and district should be blank if the loc_type is L or W. If the loc_type is S, then they all must not be blank

If Location Type is not blank, then Location must not be blank. Otherwise it has to be blank

Origin Country Identifier

Char(3)

Blank (space character string)

Origin country of the item that the deal component should apply to

Location Type

Char(1)

Blank (space character string)

Type of the location referenced in the location field. Valid values are 'S' and 'W'. Location types will be held on the codes table under the code type 'LOC3'

If location is blank then this field has to be blank also


Item

Char(25)

Blank (space character string)

Unique alphanumeric value that identifies the item

If Merchandise Level is 10, then Item must not be blank

Exclusion Indicator

Char(1)

REQUIRED

Indicates if the deal component item/location line is included in the deal component or excluded from it. Valid values are 'Y' for yes or 'N' for no

Reference Line

Number (10)

REQUIRED

This value determines which line in the input file this item-loc record belongs to

TTAIL

File Line Identifier

Char(5)

TTAIL

Identifies file record type (the end of the transaction detail)

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Transaction Record Counter

Numeric ID(6)

Sequential number

Created by program.

Number of records/transactions in current transaction set (only records between thead and ttail)

THEAD

File Type Record Descriptor

Char(5)

THEAD

Identifies file record type to upload a new deal sub loop

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Transaction Detail Record Type

Char(5)

PPDTL

Identifies file record type of sub loop as Proof of Performance Detail

TDETL

File Type Record Descriptor

Char(5)

TDETL

Identifies file record type to upload deal proof of performance details

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Deal Sub Item

Char(25)

No data

Specific transaction level (or below) item that's proof of performance is being measured. This can be populated when the deal itself is on a case UPC but the proof of performance is on an individual selling unit


Proof of Performance Type

Char(6)

REQUIRED

Code that identifies the proof of performance type (that is, the term is that the item must be displayed on an end cap for 28 days - the pop_type is code 'ECD' for end cap display). Valid values for this field are stored in the code_type = 'PPT'. This field is required by the database

Proof of Performance Value

Number (20,4)

All 0s.

Value that describes the term of the proof of performance type (that is, the term is that the item must be displayed on an end cap for 28 days - the pop_value is 28). This field is required by the database if the record has a pop_value_type

If Proof of Performance Value is not blank, then Proof of Performance Value Type must not be blank. If Proof of Performance Value is blank, then Proof of Performance Value Type must be blank

Proof of Performance Value Type

Char(6)

Blank (space character string)

Value that describes the type of the pop_value (that is, the term is that the item must be displayed on an end cap for 28 days - the pop_value_type is the code 'DAYS' for days). Valid values for this field are stored in the code_type = 'PPVT'. This field is required by the database if the record has a pop_value

If Proof of Performance Value is not blank, then Proof of Performance Value Type must not be blank. If Proof of Performance Value is blank, then Proof of Performance Value Type must be blank

Vendor Recommended Start Date

Char(14)

Blank (space character string)

This column holds the date that the vendor recommends that the POP begin

Vendor Recommended End Date

Char(14)

Blank (space character string)

This column holds the date that the vendor recommends that the POP end


Planned Start Date

Char(14)

Blank (space character string)

This column holds the date that the merchandiser/category manager plans to begin the POP

Planned End Date

Char(14)

Blank (space character string)

This column holds the date that the merchandiser/category manager plans to end the POP

Comment

Comment Char(255)

Blank (space character string)

Free-form comments

Reference Line

Number (10)

REQUIRED

This value determines which line in the input file this Proof of Performance record belongs to

TTAIL

File Line Identifier

Char(5)

TTAIL

Identifies file record type (the end of the transaction detail)

File Line Identifier

Numeric ID(10)

Sequential number

Created by program

ID of current line being read from input file

Transaction Record Counter

Numeric ID(6)

Sequential number

Created by program.

Number of records/transactions in current transaction set (only records between thead and ttail)

THEAD

File Type Record Descriptor

Char(5)

THEAD

Identifies file record type to upload a new deal sub loop

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Transaction Detail Record Type

Char(5)

DTDTL

Identifies file record type of sub loop as Deal Component Threshold Detail

TDETL

File Type Record Descriptor

Char(5)

TDETL

Identifies file record type to upload deal threshold details

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Lower Limit

Number (20,4)

REQUIRED

Lower limit of the deal component. This is the minimum value that must be met in order to get the specified discount. This value will be either a currency amount or quantity value, depending on the value in the deal_detail.threshold_limit_type field of this deal component (Threshold Value Type field of the DCDTL record that this DTDTL record belongs to as specified in the reference line field)

Upper Limit

Number (20,4)

REQUIRED

Upper limit of the deal component. This is the maximum value for which the specified discount will apply. This value will be either a currency amount or quantity value, depending on the value in the deal_detail.threshold_limit_type field of this deal component (Threshold Value Type field of the DCDTL record that this DTDTL record belongs to as specified in the reference line field)

Value

Number (20,4)

REQUIRED

Value of the discount that will be given for meeting the specified thresholds for this deal component. This value will be either a currency amount or quantity value, depending on the value in the deal_detail.threshold_value_type field of this deal component (Threshold Value Type field of the DCDTL record that this DTDTL record belongs to as specified in the reference line field)


Target Level Indicator

Char(1)

REQUIRED

Indicates if a threshold level is the targeted purchase or sales level for a deal component. This indicator will be used for cost calculations. Valid values are 'Y' for yes and 'N' for no

Reference Line

Number (10)

REQUIRED

This value determines which line in the input file this Threshold record belongs to

TTAIL

File Line Identifier

Char(5)

TTAIL

Identifies file record type (the end of the transaction detail)

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

Transaction Record Counter

Numeric ID(6)

Sequential number

Created by program.

Number of records/transactions in current transaction set (only records between thead and ttail)

FTAIL

File Line Identifier

Char(5)

FTAIL

Identifies file record type (the end of the input file)

File Line Identifier

Numeric ID(10)

Sequential number

Created by program.

ID of current line being read from input file

File Record Counter

Numeric ID(10)

Sequential number

Created by program.

Number of records/transactions in current file (only records between head and tail)


batch_ditinsrt.ksh (Deal Calculation Queue Insert Multithreading)

Module Name batch_ditinsrt.ksh
Description Deal Calculation Queue Insert Multithreading
Functional Area Deals
Module Type Business Processing
Module Technology Ksh
Catalog ID RMS187
Runtime Parameters NA

Design Overview

The purpose of this module is to multithread the ditinsrt batch program.

Scheduling Constraints

Table 7-5 Scheduling Constraints

Schedule Information Description

Frequency

Daily

Scheduling Considerations

Run either batch_ditinsrt.ksh or ditinsrt.pc. See detailed program documents for more information

Pre-Processing

NA

Post-Processing

orddscnt

Threading Scheme

Threaded by different suppliers


Restart/Recovery

A commit occurs when all details of a deal are processed. Inherent restart/recovery is achieved through deleting deals from the DEAL_QUEUE table when they are processed. Because DEAL_QUEUE is part of the driving cursor, processed deals will not be fetched again when the program restarts.

Key Tables Affected

Table 7-6 Key Tables Affected

Table Select Insert Update Delete

DEAL_HEAD

Yes

No

No

No

ORDHEAD

Yes

No

No

No

ORDLOC_DISCOUNT

Yes

No

No

No

DEAL_QUEUE

Yes

No

No

Yes

SUPS

Yes

No

No

No

ITEM_SUPP_COUNTRY_LOC

Yes

No

No

No

DEAL_CALC_QUEUE

Yes

Yes

No

No


ditinsrt (Insert into Deal Calculation Queue)

Module Name ditinsrt.pc
Description Insert into Deal Calculation Queue
Functional Area Deals
Module Type Business Processing
Module Technology ProC
Catalog ID RMS217
Runtime Parameters NA

Design Overview

This batch program will populate the DEAL_CALC_QUEUE table with orders that may be affected by non vendor-funded, non PO-specific deals that are on the DEAL_QUEUE table (for future processing by orddscnt.pc).

Orders that had been applied to deals that no longer apply will also be inserted into the DEAL_CALC_QUEUE table. Processed records will then be deleted from the DEAL_QUEUE table

Scheduling Constraints

Table 7-7 Scheduling Constraints

Schedule Information Description

Frequency

Daily

Scheduling Considerations

NA

Pre-Processing

NA

Post-Processing

orddscnt

Threading Scheme

Handled by batch_ditinsrt.ksh


Restart/Recovery

A commit occurs when all details of a deal are processed.

Inherent restart/recovery is achieved through deleting deals from the DEAL_QUEUE table when they are processed. Because DEAL_QUEUE is part of the driving cursor, processed deals will not be fetched again when the program restarts.

Key Tables Affected

Table 7-8 Key Tables Affected

Table Select Insert Update Delete

DEAL_HEAD

Yes

No

No

No

ORDHEAD

Yes

No

No

No

ORDLOC_DISCOUNT

Yes

No

No

No

DEAL_QUEUE

Yes

No

No

Yes

SUPS

Yes

No

No

No

ITEM_SUPP_COUNTRY_LOC

Yes

No

No

No

DEAL_CALC_QUEUE

Yes

Yes

No

No


discotbapply (Update OTB After Deal Discounts)

Module Name discotbapply.pc
Description Update OTB After Deal Discounts
Functional Area Deals
Module Type Business Processing
Module Technology ProC
Catalog ID RMS215
Runtime Parameters NA

Design Overview

Deals processing can change the cost on purchase orders. When this occurs (in the batch program orddscnt.pc), Open To Buy (OTB) must also be updated to ensure that budgets reflect reality. This program updates these OTB buckets.

Scheduling Constraints

Table 7-9 Scheduling Constraints

Schedule Information Description

Frequency

Daily

Scheduling Considerations

This module should be run after orddscnt.pc

Pre-Processing

orddscnt.pc

Post-Processing

NA

Threading Scheme

Mulithreaded on department


Restart/Recovery

This program has inherent restart ability, because records are deleted from DISC_OTB_APPLY as they are processed. Array processing is used. Records are array fetched from DISC_OTB_APPLY table, processed and committed to the database.

Key Tables Affected

Table 7-10 Key Tables Affected

Table Select Insert Update Delete

DISC_OTB_APPLY

Yes

No

No

Yes

ORDHEAD

Yes

No

No

No

OTB

No

No

Yes

No


dealact (Calculate Actual Impact of Billback Deals)

Module Name dealact.pc
Description UCalculate Actual Impact of Billback Deals
Functional Area Deals
Module Type Business Processing
Module Technology ProC
Catalog ID RMS206
Runtime Parameters NA

Design Overview

This program will run on a daily basis and calculate actuals information to update the deal actuals table at the item/location level for bill back non rebate deals, bill back purchase order rebate deals and bill back sales and receipts deals.

Scheduling Constraints

Table 7-11 Scheduling Constraints

Schedule Information Description

Frequency

Daily

Scheduling Considerations

Must be run daily after SALSTAGE.PC. Otherwise data will be lost and income cannot be calculated retrospectively

Pre-Processing

SALSTAGE.PC

prepost dealact_nor pre

prepost dealact_po_pre

prepost dealact_sales pre

Post-Processing

NA

Threading Scheme

Multithreaded on department


Restart/Recovery

The database commit will take place when the number of deal_id/deal_detail_id records processed is equal to commit max counter in the restart control table.

Key Tables Affected

Table 7-12 Key Tables Affected

Table Select Insert Update Delete

DEAL_HEAD

Yes

No

No

No

DEAL_BB_NO_REBATE_TEMP

Yes

No

No

No

DEAL_BB_REBATE_PO_TEMP

Yes

No

No

No

DEAL_TRAN_DATA_TEMP

Yes

No

No

No

DEAL_ACTUALS_ITEM_LOC

Yes

Yes

Yes

No


dealinc (Calculate Weekly/Monthly Income Based on Turnover)

Module Name dealinc.pc
Description Calculate Weekly/Monthly Income Based on Turnover
Functional Area Deals
Module Type Business Processing
Module Technology ProC
Catalog ID RMS211
Runtime Parameters NA

Design Overview

This program generates income for each item/location for bill-back deals.

Dealinc.pc retrieves deal attributes and actuals data from the deals tables for complex deals. It then calculates the income and will update the actuals table with the calculated income value. Additionally the program will insert the income value into the TEMP_TRAN_DATA table using the tran types deal sales and deal purchases.

Subsequent programs will run to perform forecast processing for active deals and to roll up TEMP_TRAN_DATA rows inserted by the multiple instances of this module and insert/update DAILY_DATA with the summed values and then insert details from TEMP_TRAN_DATA into TRAN_DATA. Income is calculated by retrieving threshold details for each deal component and determining how to perform the calculation (that is, Linear/Scalar, Actuals Earned/Pro-Rate).

Scheduling Constraints

Table 7-13 Scheduling Constraints

Schedule Information Description

Frequency

Monthly

Scheduling Considerations

Must be run before SALMTH.PC, after DEALACT.PC

Pre-Processing

prepost dealinc pre

Post-Processing

NA

Threading Scheme

Threaded by deal ID


Restart/Recovery

A commit will take place after the number of deals records processed is equal to the commit max counter from the RESTART_CONTROL table.

Key Tables Affected

Table 7-14 Key Tables Affected

Table Select Insert Update Delete

DEAL_HEAD

Yes

No

No

No

DEAL_DETAIL

Yes

No

No

No

DEAL_ACTUALS_FORECAST

Yes

No

No

No

GTT_DEALINC_DEALS

Yes

Yes

No

Yes

DEAL_ACTUALS_ITEM_LOC

Yes

No

Yes

No

ITEM_MASTER

Yes

No

No

No

STORE

Yes

No

No

No

WH

Yes

No

No

No

TEMP_TRAN_DATA

No

Yes

No

No


dealday (Daily Posting of Deal Income to Stock & General Ledgers)

Module Name dealday.pc
Description Daily Posting of Deal Income to Stock & General Ledgers
Functional Area Deals
Module Type Business Processing
Module Technology ProC
Catalog ID RMS208
Runtime Parameters N/A

Design Overview

This batch module posts all the deal income records to the Stock Ledger and the Genera Ledger.

This program extracts data inserted by dealinc.pc. In order to simplify this program, a dealday pre function (in prepost.pc) will sum up the data into a temporary table. A dealday post function (in prepost.pc) will copy data to transaction table and then purge temporary tables.

Scheduling Constraints

Table 7-15 Scheduling Constraints

Schedule Information Description

Frequency

Monthly

Scheduling Considerations

Should be run after DEALINC.PC and before SALMTH

Pre-Processing

Dealinc Prepost dealday pre

Post-Processing

Prepost dealday post salmth

Threading Scheme

Multithreaded on Location


Restart/Recovery

A commit will take place after the number of dept/class/subclass records processed is greater than or equal to the max counter from the RESTART_CONTROL table.

Key Tables Affected

Table 7-16 Key Tables Affected

Table Select Insert Update Delete

TEMP_TRAN_DATA_SUM

Yes

No

No

No

DAILY_DATA

Yes

Yes

Yes

No

MV_LOC_SOB

Yes

No

No

No


dealfct (Calculates/Update Forecasted Values for Deals)

Module Name dealfct.pc
Description Calculates/Update Forecasted Values for Deals
Functional Area Deals
Module Type Business Processing
Module Technology ProC
Catalog ID RMS209
Runtime Parameters N/A

Design Overview

This program aggregates income for each item/location and recalculates forecasted values. It maintains forecast periods, deal component totals and deal totals.

After determining which active deals need to have forecast periods updated with actuals, the program will then sum up all the actuals for the deal reporting period and update the table with the summed values and change the period from a forecast period to a fixed period. The program will also adjust either the deal component totals or the remaining forecast periods to ensure that the deal totals remain correct. For each deal, the program will also maintain values held at header level.

Scheduling Constraints

Table 7-17 Scheduling Constraints

Schedule Information Description

Frequency

Daily

Scheduling Considerations

After DEALINC.PC and before SALMTH.PC

Pre-Processing

prepost dealfct pre – build records in the DEALFCT_TEMP table

Post-Processing

N/A

Threading Scheme

Threaded by deal ID


Restart/Recovery

A commit will take place after the number of deals records processed is equal to the commit max counter from the RESTART_CONTROL table.

Key Tables Affected

Table 7-18 Key Tables Affected

Table Select Insert Update Delete

DEALFCT_TEMP

Yes

No

No

No

DEAL_ACTUALS_FORECAST

Yes

No

Yes

No

DEAL_HEAD

Yes

No

Yes

No

DEAL_DETAIL

Yes

No

Yes

No


Integration Contract

Integration Type NA
File Name NA
Integration Contract NA

vendinvc (Stage Complex Deal Invoice Information)

Module Name vendinvc.pc
Description Stage Complex Deal Invoice Information
Functional Area Deals
Module Type Integration
Module Technology ProC
Catalog ID RMS122
Runtime Parameters N/A

Design Overview

The batch module creates records in invoice match staging tables dealing for complex type deals.

The invoicing logic will be driven from the billing period estimated next invoice date for complex deals. The amount to be invoiced will be the sum of the income accruals of the deal since the previous invoice date (or the deal start date for the first collection).

prepost vendinvc pre - truncates STAGE_COMPLEX_DEAL_HEAD and STAGE_COMPLEX_DEAL_DETAIL tables to remove previous days records.

prepost vendinvc post - calls the process_deal_head() function to update est_next_invoice_date of the deal to NULL.

Scheduling Constraints

Table 7-19 Scheduling Constraints

Schedule Information Description

Frequency

Daily

Scheduling Considerations

Must be run before salmnth.pc, after dealact.pc and before the new programs, which perform forecast processing and DAILY_DATA roll up

Pre-Processing

prepost vendinvc pre

Post-Processing

prepost vendinvc post, salweek (at end of week), salmth (at end of month)

Threading Scheme

Threaded by deal id


Restart/Recovery

When the max commit point is reached, the data is updated.

Key Tables Affected

Table 7-20 Key Tables Affected

Table Select Insert Update Delete

DEAL_HEAD

Yes

No

Yes

No

DEAL_ACTUALS_ITEM_LOC

Yes

No

No

No

DEAL_ACTUALS_FORECAST

Yes

No

No

No

VAT_ITEM

Yes

No

No

No

STORE

Yes

No

No

No

WH

Yes

No

No

No

STAGE_COMPLEX_DEAL_HEAD

No

Yes

No

No

STAGE_COMPLEX_DEAL_DETAIL

No

Yes

No

No

VENDINVC_TEMP

Yes

No

No

No

PERIOD

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

SYSTEM_VARIABLES

Yes

No

No

No

SUPS_IMP_EXP

Yes

No

No

No


Integration Contract

Integration Type Download from RMS
File Name N /A
Integration Contract IntCon000009

Records are written to the stage_complex_deal_head and stage_complex_deal_detail tables.

vendinvf (Stage Fixed Deal Invoice Information

Module Name vendinvc.pc
Description Stage Complex Deal Invoice Information
Functional Area Deals
Module Type Integration
Module Technology ProC
Catalog ID RMS123
Runtime Parameters N/A

Design Overview

The batch module creates records in staging tables dealing for fixed type deals.

The invoicing logic will be driven by the collection dates for fixed deals. The amount to be invoiced will be retrieved directly from fixed deal tables for a given deal date.

prepost vendinvf pre - truncates STAGE_FIXED_DEAL_HEAD and STAGE_FIXED_DEAL_DETAIL tables to remove previous days records.

prepost vendinvf post – calls the process_fixed_deal function to update the status of the fixed deal claim to ’I' (inactive)

Scheduling Constraints

Table 7-21 Scheduling Constraints

Schedule Information Description

Frequency

Daily

Scheduling Considerations

Must be run before salmnth.pc and before the new programs, which perform forecast processing and DAILY_DATA roll up

Pre-Processing

prepost vendinvc pre

Post-Processing

salstage, prepost vendinvf pre

prepost vendinvf post , salweek (at end of week) salmth (at end of week)

Threading Scheme

Threaded by deal id


Restart/Recovery

Data is committed to the database once the number of transactions processed reaches or exceeds the max_commit_ctr.

Key Tables Affected

Table 7-22 Key Tables Affected

Table Select Insert Update Delete

FIXED_DEAL

Yes

No

No

No

FIXED_DEAL_DATES

Yes

No

No

No

FIXED_DEAL_MERCH

Yes

No

No

No

FIXED_DEAL_MERCH_LOC

Yes

No

No

No

SUBCLASS

Yes

No

No

No

STAGE_FIXED_DEAL_HEAD

No

Yes

No

No

STAGE_FIXED_DEAL_DETAIL

No

Yes

No

No

PERIOD

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

SYSTEM_VARIABLES

Yes

No

No

No

WH

Yes

No

No

No


Integration Contract

Integration Type Download from RMS
File Name N /A
Integration Contract IntCon000009

Records are written to the stage_complex_deal_head and stage_complex_deal_detail tables.

dealcls (Close Expired Deals)

Module Name dealcls.pc
Description Close Expired Deals
Functional Area Deals
Module Type Admin
Module Technology ProC
Catalog ID RMS207
Runtime Parameters N/A

Design Overview

The purpose of this module is to close any active deals that have reached their close date. Closed deals are still available in the system for reference and audit purposes, but because the deals are expired, they will not be applied or processed.

Scheduling Constraints

Table 7-23 Scheduling Constraints

Schedule Information Description

Frequency

Daily

Scheduling Considerations

N/A

Pre-Processing

N/A

Post-Processing

prepost dealcls post

Threading Scheme

N/A


Restart/Recovery

N/A

Key Tables Affected

Table 7-24 Key Tables Affected

Table Select Insert Update Delete

DEAL_HEAD

Yes

No

Yes

No

DEAL_QUEUE

Yes

Yes

No

No


dealprg (Purge Closed Deals)

Module Name dealprg.pc
Description Purge Closed Deals
Functional Area Deals
Module Type Admin
Module Technology ProC
Catalog ID RMS212
Runtime Parameters N/A

Design Overview

The purpose of this batch program is to purge deals after they have been held in the system for the specified number of history months after they are closed. The number of months of history is defined in the PURGE_CONFIG_OPTIONS table in the DEAL_HISTORY_MONTHS column.

The batch program will also delete deal performance tables based on the specified number of history months. This program will not cover PO-specific deals, which will be purged with the PO.

Scheduling Constraints

Table 7-25 Scheduling Constraints

Schedule Information Description

Frequency

Monthly

Scheduling Considerations

N/A

Pre-Processing

N/A

Post-Processing

N/A

Threading Scheme

N/A


Restart/Recovery

This program has inherent restart/recovery since records that were processed are deleted from the table. As a result, the driving cursor will never fetch the same records again.

Key Tables Affected

Table 7-26 Key Tables Affected

Table Select Insert Update Delete

DEAL_HEAD

Yes

No

No

Yes

PURGE_HISTORY_MONTHS

Yes

No

No

No

ORDHEAD_DISCOUNT

Yes

No

No

No

ORDLOC_DISCOUNT

Yes

No

No

No

FIXED_DEAL

Yes

No

No

Yes

DEAL_ACTUALS_ITEM_LOC

No

No

No

Yes

DEAL_ITEM_LOC_EXPLODE

No

No

No

Yes

FUTURE_COST

Yes

No

No

Yes

RECLASS_COST_CHG_QUEUE

No

No

No

Yes

DEAL ACTUALS_FORECAST

No

No

No

Yes

DEAL_PROM

No

No

No

Yes

DEAL_THRESHOLD_REV

No

No

No

Yes

DEAL_QUEUE

No

No

No

Yes

DEAL_ITEMLOC

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