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.

7

Contracts

Contract batch modules create purchase orders from contracts and purge obsolete contracts. There are four types of supplier contracts in Merchandising: A, B, C, and D.

  • Type A (Plan/Availability): The contract contains a plan of manufacturing quantity by ready date. Supplier availability is matched to the ready date. Orders are raised against the plan as suggested by replenishment requirements, provided there is sufficient supplier availability. You can also raise manual orders.

  • Type B (Plan/No Availability): The contract contains a plan of manufacturing quantity by ready date and dispatch-to location or locations. There are one or more ready dates, which is the date that the items are due at the dispatch-to location. Supplier availability is not required. Orders are raised automatically from the contract based on ready dates.

  • Type C (No Plan/No Availability): The contract is an open contract with no production schedule and no supplier availability declared. The contract lists the items that are used to satisfy a total commitment cost. Orders are raised against the contract based on replenishment requirements. The retailer can also raise manual orders.

  • Type D (No Plan/Availability): The contract is an open contract with no production schedule. The supplier declares availability as stock is ready. The contract lists the items that are used to satisfy a total commitment cost. Orders are raised against the contract, based on replenishment requirements and supplier availability. The retailer can raise manual orders.

Program Summary

The following batch designs are included in this functional area:

  • Apply Type A, C and D Contracts to Orders Created by Replenishment (cntrprss)

  • Contract Maintenance and Purging (cntrmain)

  • Contract Maintenance and Purging (contract_purge_job) - background process

  • Create Replenishment Orders for Item/Locations on Type B Contracts (cntrordb)

See also the Merchandising Operations Guide Volume 2 for the following batch-based integrations related to contracts:

  • Upload Item Availability for Type A & D Contracts from Suppliers (ediupavl)

  • Download Contracts to Suppliers (edidlcon)

Apply Type A, C and D Contracts to Orders Created by Replenishment (cntrprss)

Module Name cntrprss.pc Description Apply Type A, C & D Contracts to Orders Created by Replenishment Functional Area Contracts

Module Type Business Processing Module Technology ProC Catalog ID RMS202 Wrapper Script rmswrap_multi.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This module evaluates contracts of type A, C, and D to determine whether an order should be created from the contract. Contracts are ranked so that orders are created off the best contracts first, based on lead-time, cost, contract status (such as, closed preferred over open), and contract type (such as,. type C are preferred over D). This updates the temporary orders created by the item replenishment extract (rplext) module with the contract and supplier information of the best available contract for each item and populates the repl_results table.

Restart/Recovery

As the item requirements can span across different locations, the logical unit of work varies for each item requirement. For each item requirement, records are committed to the database.

Design Assumptions

  • This module should only be run if contracting is turned on in the system.

Contract Maintenance and Purging (cntrmain)

Module Name cntrmain.pc Description Contract Maintenance and Purging Functional Area Contracts Module Type Admin Module Technology ProC Catalog ID RMS231 Wrapper Script rmswrap.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This program is used to mark contracts that have reached their end date to completed (for types A and B) or review status (for types C and D). This module also purges contracts that have remained in cancelled, worksheet, submitted, or complete status for a user-defined

number of months without any orders and contacts marked for deletion. The number of months is determined by the system parameter for order history months.

Restart/Recovery

This batch program has two processing functions, one for purging and another for updating contracts. The purge function (delete_contracts) deletes and commits records via arrays whose size is defined in commit max counter while the update function (reset_inactive) updates records in bulk based on the update criteria. The program as a whole is inherently restartable.

Design Assumptions

  • This module should only be run if contracting is turned on in the system.

Contract Maintenance and Purging (contract_purge_job)

Module Name contract_purge_job Description Contract Maintenance and Purging Functional Area Contracts 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-step processing. It will have a threading assignment and a business logic processing.

Thread assignment program will filter eligible records from contract header table based on its purge criteria from system parameter settings. The Order History Months parameter will determine number of months a contract elapsed in the system comparing current date and contract’s status date. Contracts are also considered for deletion when they remained in cancelled, worksheet, submitted, or complete status for a user-defined number of months without any orders and contacts marked for deletion. 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 mark contracts that have reached their end date to completed (for types A and B) or review status (for types C and D). 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 7-1 Key Tables Affected

TableSelectInsertUpdateDelete
PURGE_CONFIG_OPTIONSYesNoNoNo
RMS_BATCH_STATUSYesNoNoNo
B8D_PROCESS_CONFIGYesNoNoNo
JOB_AUDIT_LOGSNoYesNoNo
B8D_CONTRACT_MAIN_PURG
E_STG
YesYesNoYes
CONTRACT_HEADERYesNoYesYes
CONTRACT_DETAILNoNoNoYes
CONTRACT_COSTNoNoNoYes
ORDHEADYesNoNoNo

Design Assumptions

N/A

Create Replenishment Orders for Item/Locations on Type B Contracts (cntrordb)

cntrordb.pc

Module Name cntrordb.pc Description Create Replenishment Orders for Item/Locations on Type B Contracts Functional Area Contracts Module Type Business Processing Module Technology ProC Catalog ID RMS232 Wrapper Script rmswrap_multi.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This module automatically creates replenishment orders for items on an approved, orderable type ‘B’ contract based on production dates.

Type B (Plan/No Availability) contracts contain a plan of manufacturing quantity by ready date and dispatch-to location or locations. There are one or more ready dates, which is the date that the items are due at the dispatch-to location. Supplier availability is not required. This program automatically writes POs from the contract based on ready dates.

Create Replenishment Orders for Item/Locations on Type B Contracts (cntrordb)

Prepost cntrordb post – updates the system level variable last_cont_order_date to the current vdate

Restart/Recovery

The logical unit of work is contract no. Records are committed to the database when no of records processed reaches commit_max_counter maintained in RESTART_CONTROL table.

Design Assumptions

  • This module should only be run if contracting is turned on in the system.

In this guide

  • 15 Sales HistoryBatch Operations Guide · shares PURGE_CONFIG_OPTIONS, RESTART_CONTROL
  • 6 DealsBatch Operations Guide · shares PURGE_CONFIG_OPTIONS, RESTART_CONTROL