Previous  Next          Contents  Index  Navigation    Library

Indirect Mapping at the Header Level Using a Foreign Key

This example shows how you can define an indirect mapping at the Header level from a column in an Oracle Receivables table to the Oracle Sales Compensation table CN_TRX by using an existing column in the CN_TRX table as a foreign key for the selected Oracle Receivables table. Like the other methods of mapping, information is first moved into the intermediate table CN_TRX. The information is finally moved into the CN_COMMISSION_LINES table.

Suppose that you want to keep track of several pieces of information about a customer. Your customer is identified by a customer number in the Oracle Receivables table RA_CUSTOMERS. You use the indirect mapping method to move the data in CUSTOMER_NUMBER in table RA_CUSTOMERS into the ATTRIBUTE2 column in table CN_TRX. In the table CN_TRX, the column SOLD_TO_CUSTOMER_ID can be used as a foreign key for the table RA_CUSTOMERS to select information about the customer identified by the column SOLD_TO_CUSTOMER_ID. The final destination column for the data is ATTRIBUTE4 in table CN_COMMISSION_LINES. Table 4 shows you the source and destination tables for the transaction data.

Table 4: Source and Destination Tables and Columns for Indirect Mappingfrom Oracle Receivables to Oracle Sales Compensation at the Header Levelusing a Foreign Key

Receivables Source Table Receivables Source Column Name Receivables Source Table Primary Key Receivables Source Table Dimension
RA_CUSTOMERS CUSTOMER_NUMBER CUSTOMER_ID CUSTOMERS
Intermediate Sales Compensation Table Intermediate Sales Compensation Table Column Intermediate Sales Compensation Table Foreign Key Intermediate Sales Compensation Table User Name Column
CN_TRX (Header level) ATTRIBUTE2 SOLD_TO_CUSTOMER_ID CUST_NUMBER

Destination Sales Compensation Table Destination Sales Compensation Table Column Name Destination Sales Compensation Table User Name Column
CN_COMMISSION_LINES ATTRIBUTE4 CUST_NUMBER

Defining an indirect mapping using a foreign key consists of two main tasks:

   To define a dimension to link the foreign key:

To be able to define the indirect mapping, you need to define a dimension. The dimension is a link between the primary key column in the Oracle Receivables source table and its foreign key column in the Oracle Sales Compensation table. Before setting up the foreign key column mapping in the AR Mapping window, you must first define the dimension in the Dimensions window if it has not been defined yet; you must then enter the dimension name as the linking dimension in the Tables and Columns form.

In the AR Mapping window, select an Oracle Receivables table, and select Foreign Key and Expression from the alternate region to see the list of valid foreign keys for that table. These keys are linked to the primary keys by the Dimension name. By default, Oracle Sales Compensation gives you two dimensions: Salespeople and Revenue Class. If you are not using a predefined dimension, you must define the dimension first before you define the Receivables mapping.

Let us suppose we want to define the dimension called CUSTOMERS for the table RA_CUSTOMERS. This dimension will define the link between SOLD_TO_CUSTOMER_ID brought into the CN_TRX table and the record that it corresponds to in the table RA_CUSTOMERS. Follow the steps in Defining a Dimension to define a dimension. The dimension value is CUSTOMER_NUMBER.

   To define the indirect mapping using the defined foreign key:

Defining the mapping consists of several steps that you take to ensure that your dimension is defined and the primary and foreign key flags on different tables are selected.

   To define indirect mapping at the header level using a foreign key:

Attention: The name you type in the User Column Name field is your name for the column, and this name must NOT be the same as the system name for the column. If you are bringing in transaction information into the ATTRIBUTE1 field, then the name in the User Column Name field must NOT be ATTRIBUTE1.

   To collect the transaction data according to the mappings you just defined:

Note: For more information on running the Concurrent Manager, see the Oracle Applications User's Guide.


         Previous  Next          Contents  Index  Navigation    Library