AP_ALLOCATION_RULES

AP_ALLOCATION_RULES contains records establishing how charge lines (Freight and Miscellaneous) should be allocated to Item lines. Each record in this table indicates the type of allocation rule that will be generated. The available rule types are Percentage Based, Amount Based, and Fully Prorated. Such rule types simply determine the type of data that will be provided by the user vs. generated by the system. In a Fully Prorated Rule, the user does not select Item lines to allocate the charge across. Instead, the system will prorate across all Item lines during execution of the allocation rule. In Percentage Based, the user selects the Item lines and the percentage of the charge to be allocated to each line selected. The system then calculates the corresponding amount. In Amount Based, the user selects the Item lines and the amount of the charge to be allocated to each line selected. The Item lines selected during Percentage Based or Amount Based rule type creation, along with the percentage or amount to be allocated, is stored in the AP_ALLOCATION_RULE_LINES table. Allocation rules contain a status that determines whether the allocation rule has been executed and thus, it will no longer be used by the invoice that created it, or if it is pending execution and thus, still updateable.

Details

  • Schema: FUSION

  • Object owner: AP

  • Object type: TABLE

  • Tablespace: APPS_TS_TX_DATA

Primary Key

Name Columns

AP_ALLOCATION_RULES_PK

INVOICE_ID, CHRG_INVOICE_LINE_NUMBER

Columns

Name Datatype Length Precision Not-null Comments
INVOICE_ID NUMBER 18 Yes Invoice identifier for rule owner
CHRG_INVOICE_LINE_NUMBER NUMBER 18 Yes Invoice line number for charge being allocated
RULE_TYPE VARCHAR2 30 Yes Indicates the type of allocation. Possible choices are Percentage based, Amount based or Fully prorated. Validated against AP_LOOKUP_CODES with lookup_type ALLOCATION RULE TYPE
RULE_GENERATION_TYPE VARCHAR2 30 Yes Indicates whether the rule was generated by the system or by the user. Validated against AP_LOOKUP_CODES with lookup_type ALLOCATION GENERATION TYPE
STATUS VARCHAR2 30 Indicates whether the Allocation Rule has been executed. The possible values are PENDING or EXECUTED. Lookup type is ALLOCATION STATUS
CREATION_DATE TIMESTAMP Yes Who column: indicates the date and time of the creation of the row.
CREATED_BY VARCHAR2 64 Yes Who column: indicates the user who created the row.
LAST_UPDATED_BY VARCHAR2 64 Yes Who column: indicates the user who last updated the row.
LAST_UPDATE_DATE TIMESTAMP Yes Who column: indicates the date and time of the last update of the row.
LAST_UPDATE_LOGIN VARCHAR2 32 Who column: indicates the session login associated to the user who last updated the row.
PROGRAM_APPLICATION_ID NUMBER 18 Who column: indicates the application identifier of the row.
PROGRAM_ID NUMBER 18 Who column: indicates the identifier of the row.
PROGRAM_UPDATE_DATE DATE Who column: indicates the date and time of the creation of the row.
REQUEST_ID NUMBER 18 Enterprise Service Scheduler: indicates the request ID of the job that created or last updated the row.
OBJECT_VERSION_NUMBER NUMBER 9 Yes Used to implement optimistic locking. This number is incremented every time that the row is updated. The number is compared at the start and end of a transaction to detect whether another session has updated the row since it was queried.
JOB_DEFINITION_NAME VARCHAR2 100 Enterprise Service Scheduler: indicates the name of the job that created or last updated the row.
JOB_DEFINITION_PACKAGE VARCHAR2 900 Enterprise Service Scheduler: indicates the package name of the job that created or last updated the row.

Foreign Keys

Table Foreign Table Foreign Key Column
AP_ALLOCATION_RULES ap_invoice_lines_all INVOICE_ID, CHRG_INVOICE_LINE_NUMBER
ap_allocation_rule_lines ap_allocation_rules INVOICE_ID, CHRG_INVOICE_LINE_NUMBER

Indexes

Index Uniqueness Tablespace Columns
AP_ALLOCATION_RULES_U1 Unique Default INVOICE_ID, CHRG_INVOICE_LINE_NUMBER