Results for “cn_sca_credits_batch_pub”

50+ results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

CN_SCA_CREDITS_BATCH_PUB is a public PL/SQL package in the Oracle EBS Incentive Compensation (formerly Sales Compensation) module. Its purpose, as declared in the package body header, is to process Sales Credit Allocations (SCA) in batch. The package was created on 06/26/2003 by Rao Chenna and carries the file name cnpscabb.pls, with the last-referenced revision header dated 2010/10/29. It belongs to the APPS schema and is classified as a PUB (public) API, indicating that it is intended to be called from outside the package rather than treated as an internal implementation detail.

The package orchestrates the batch flow that takes transaction data, evaluates territory and sales credit assignment rules, processes winners, and records the resulting sales credit allocation output. It maintains its own processing batch tables (the CN_SCA family) to track the state of each run and to denormalize the rules used during evaluation. Debugging output is controlled by the CN_DEBUG profile option, and concurrent context values (login ID, program ID, user ID, request ID) are captured from FND_GLOBAL at package initialization.

Key Procedures and Functions

  • CONC_SUBMIT — Submits the batch processing work as a concurrent request. The package history notes that a call to fnd_request.set_org_id was added here, and that org_id was added to the insert into CN_SCA_PROCESS_BATCHES.
  • CONC_DISPATCH — Dispatches the submitted concurrent request and manages the concurrent program execution context.
  • SPLIT_BATCHES — Divides the population of transactions into logical batches, populating CN_SCA_LOGICAL_BATCHES_S, so that processing can be performed in manageable units.
  • GET_SALES_CREDITS — Retrieves the sales credit information and drives the assignment of credit to sales representatives.
  • GET_ASSIGNMENTS — Resolves the territory and resource assignments (from JTF_TERR_ALL and JTF_TERR_RSC_ALL) that determine how credit is allocated.
  • BATCH_PROCESS_TXNS — Processes the transactions within each logical batch, coordinating the evaluation of winners against the assignment rules.
  • BATCH_COLLECT_TXNS — Collects and consolidates the transaction results for the batch.
  • BATCH_PROCESS_WINNERS — Processes the territory winners (JTF_TAE_1001_SC_WINNERS) and produces the final sales credit allocation output.
  • CONVERT_TO_TABLE — Converts the internal collection types into relational table form for storage and downstream use.

Tables Accessed

The package reads and writes several categories of tables via APPS synonyms. Transaction and credit line data resides in CN_COMM_LINES_API, CN_COMM_LINES_API_ALL, and CN_COMM_LINES_API_S, with header information in CN_COMMISSION_HEADERS and CN_COMMISSION_HEADERS_ALL. Assignment and winning logic references JTF_TAE_1001_SC_WINNERS, JTF_TERR_ALL, and JTF_TERR_RSC_ALL. The package's own processing state and results are held in CN_SCA_DENORM_RULES, CN_SCA_HEADERS_INTERFACE, CN_SCA_LINES_OUTPUT, CN_SCA_LOGICAL_BATCHES_S, CN_SCA_PROCESS_BATCHES, and CN_SCA_PROCESS_BATCHES_S. Concurrent request information is read from JTY_CONC_REQ_SUMM. The denormalized rules table caches the rule configuration used during a run, while the output and interface tables capture the resulting allocations.

Usage Notes

CN_SCA_CREDITS_BATCH_PUB is invoked through the concurrent manager, typically via CONC_SUBMIT and CONC_DISPATCH, when a user runs the Sales Credit Allocations batch process in a pre-production or production environment. The CS_DEBUG profile setting governs diagnostic trace output. Because the package is classified as PUB and is referenced by zero other packages per the ETRM metadata, it is intended to be called directly by concurrent programs or external custom code rather than being embedded as a dependency of other packaged APIs. In a pre-production ("SCA PREPROD") context, it is commonly used to validate batch configuration, territory assignment rules, and expected credit output before promoting the setup to production.