Search Results gen_sca_rules_onln_dyn




Overview

The APPS.CN_SCA_RULES_ONLINE_GEN_PVT package is a private (PVT classification) PL/SQL API within the Oracle E-Business Suite Incentive Compensation module. Its central business function is the generation and resolution of Sales Compensation Analyst (SCA) rules at runtime. Specifically, the package builds and evaluates the dynamic rule set that determines how transactions are credited, classified, or attributed to payees during the compensation calculation cycle.

The package was last modified under header revision 120.3 (dated 2011/08/11), consistent with the 12.1.1 and 12.2.2 code lines, and is declared AUTHID CURRENT_USER, meaning it executes with the privileges of the calling session rather than the package owner. The _PVT suffix indicates that it is an internal implementation package, not a public API exposed for customer or third-party extension. It is referenced by one other package, which typically invokes it as part of a larger processing flow.

Key Procedures and Functions

The package exposes three documented program units:

  • GEN_SCA_RULES_ONLN_DYN — The primary driver procedure. It generates SCA rules in an online (runtime) context using dynamic SQL. It accepts the standard Oracle EBS API parameter set (p_api_version, p_init_msg_list, p_commit, p_validation_level, p_org_id) and returns the standard x_return_status, x_msg_count, and x_msg_data outputs, plus an x_transaction_source output. This conforms to the Oracle Applications API error-handling convention.
  • GET_WINNING_RULE — The procedure matching the user's search term. It resolves which single rule "wins" among the candidate SCA rules that apply to a given transaction. The spec_code and body_code parameters are both IN OUT NOCOPY, indicating the procedure refines those codes as it evaluates applicability; the transaction source governs which rule family is consulted. This is the core rule-precedence resolution logic.
  • CREATE_SCA_RULES_ONLINE_DYN — A boolean-returning function that constructs the dynamic rule set for a specified transaction source. The TRUE/FALSE return signals success or failure of the online rule creation operation.

Tables Accessed

Through APPS synonyms, the package reads and writes the following documented tables:

Usage Notes

Because this is a PVT package, it is not intended for direct invocation by customers or third-party integrations. It is ordinarily called by the parent compensation processing package (the single documented referencing package) during online credit-rule evaluation, typically triggered from Incentive Compensation forms or a compensation calculation concurrent program.

Any custom code that needs rule resolution should use the corresponding public API rather than calling GET_WINNING_RULE or the generator procedures directly, since the dynamic SQL and NOCOPY parameter semantics assume a controlled calling context. Its reliance on DBMS_SQL and PLITBLM also means runtime behavior depends on the state of the caller's session and the p_org_id supplied.