Search Results batch_collect_txns
Overview
CN_SCA_CREDITS_BATCH_PUB is a public PL/SQL application program interface owned by APPS in Oracle E-Business Suite, registered under product CN (Sales Credits / Commission and Incentive Compensation). Its declared display name is "Get Sales Credits Public Application Program Interface," and its documented lifecycle is active with compatibility status S (supported). The package is defined with AUTHID CURRENT_USER, meaning that name resolution for the referenced objects is performed against the invoking schema's privileges rather than the package owner's.
The business purpose of the package is to process Credit Rules and their associated allocation percentages for the Sales Credit Allocation module. It accepts a start date, an end date, and a transaction source as input, processes the transaction records staged in the interface tables, and writes the resulting allocations to the output interface tables. In this way it functions as the batch engine that converts raw transaction input into sales credit assignments. The source header identifies the file as cnpscabs.pls and records an original creation date of 06/26/03, with the most recent shipped revision documented at version 120.3.12010000.10 dated 2009/05/26.
Key Procedures and Functions
The documented API surface consists of nine procedures listed in the ETRM 12.2.2 metadata. Two of these operate as concurrent program plumbing. CONC_SUBMIT assembles the concurrent request, accepting the concurrent program name, parent process audit identifier, physical batch identifier, date range, transaction source, and organization identifier, and returning the request identifier through an IN OUT parameter. CONC_DISPATCH operates on the parent process audit identifier, date range, logical batch identifier, transaction source, and organization identifier to route work to the appropriate processing path. SPLIT_BATCHES divides a logical batch into processable units based on a logical batch identifier, date range, and transaction source.
The remaining documented procedures perform the substantive credit computation. GET_SALES_CREDITS derives the sales credit results, while GET_ASSIGNMENTS determines the assignment of credits to the applicable recipients or resources. BATCH_PROCESS_TXNS, BATCH_COLLECT_TXNS, and BATCH_PROCESS_WINNERS carry out the batch-level processing, collection, and winner determination against the staged transaction data. CONVERT_TO_TABLE transforms the internally collected results into the tabular output form consumed by the downstream interface tables. The package also declares a PL/SQL collection type, sub_program_id_type, as a table of NUMBER.
Tables Accessed
The package references its tables through APPS synonyms. The interface and staging tables are CN_SCA_HEADERS_INTERFACE and CN_SCA_LINES_OUTPUT, which hold the input records and receive the processed credit results respectively. Batch orchestration uses CN_SCA_LOGICAL_BATCHES_S, CN_SCA_PROCESS_BATCHES, and CN_SCA_PROCESS_BATCHES_S. Allocation logic draws on CN_SCA_DENORM_RULES, the denormalized rules table. Territory and resource context comes from JTF_TERR_ALL, JTF_TERR_RSC_ALL, and the winners table JTF_TAE_1001_SC_WINNERS. Commission and credit line structures are read from and written to CN_COMMISSION_HEADERS, CN_COMMISSION_HEADERS_ALL, CN_COMM_LINES_API, CN_COMM_LINES_API_ALL, and CN_COMM_LINES_API_S. Concurrent request information is obtained from JTY_CONC_REQ_SUMM.
Usage Notes
The package is documented as being accessed by users of the Sales Credit Allocation module through a concurrent program, which is the primary supported invocation path; the CONC_SUBMIT and CONC_DISPATCH procedures exist specifically to support that pattern, including submission type and organization scoping. Custom code may call the public procedures directly where a programmatic credit allocation run is required, provided the calling schema has suitable privileges because of the AUTHID CURRENT_USER declaration. The package is a standalone public API and is not documented as being referenced by any other package. The global variable g_num_workers, which appears in the package specification at line 32 immediately after the sub_program_id_type declaration, is not documented with a behavioral description in the available metadata; based on its position and naming it is a module-level counter or degree-of-parallelism indicator whose value is not exposed through any documented parameter of the nine listed procedures.