Using an Oracle Sequence to Generate a Batch Identifier
Using an Oracle Sequence to Generate a Batch Identifier
An Oracle sequence is an Oracle database object that produces values in sequence. It starts with an initial value and increments by a given value. When Oracle E-Business Suite provides an Oracle sequence for the open interface, use the Oracle sequence to generate a batch identifier. When Oracle E-Business Suite does not provide an Oracle sequence, you can create a sequence in Oracle and add it to a source qualifier for an Oracle source definition.
This sample mapping writes data to the General Ledger Journal Entry open interface. The open interface contains a Group_ID column for the batch identifier. The sequence gl_journal_import_s generates the value for this column. The open interface includes a sequence, so you generate a batch identifier for this open interface from the sequence.
The following figure shows an example of a mapping that uses an Oracle sequence to generate a batch identifier:
The mapping contains the following objects:
CUSTOMER_INTERFACE. Source for the Open Interface Parameter Group that contains the required start time for the target, Journal_Import.
gl_journal_import_s. Source for an Oracle sequence. It contains a column representing the input value for the batch identifier column of the Open Interface Parameter group in the target.
SQ_gl_journal_import_s. Source Qualifier transformation that generates a batch identifier and passes the group ID to the Joiner transformations.
The following SELECT statement creates a unique value for each batch identifier:
select <sequence name>.nextval from dual
This sequence passes the group ID to the Joiner transformations.
Source1. Source that contains the data that you want to insert into the target definition. This source definition passes the columns to the target definition.
JNRTRANS1. Joiner transformation that joins data from the Open Interface Parameter group source and the Oracle sequence source. The Joiner transformation has manually created ports, “master” and “detail,” and uses the following join condition:
master port_name = detail port_name
JNRTRANS2. Joins data from the Oracle sequence source and the source containing data to insert in the target. The JNRTRANS2 Joiner transformation joins the data from Source1 and gl_journal_import_s. The Joiner transformation has manually created ports, “master” and “detail,” and uses the following join condition:
master port_name = detail port_name
Journal_Import. Oracle E-Business Suite target. The target definition that represents the open interface you want to write data to.
The manually created ports, “master” and “detail,” allow you to join sources that do not have matching columns.