Using the Account Generator in Oracle Order Entry / Shipping
The Account Generator in Oracle Order Entry/Shipping utilizes Oracle Workflow. You can view and customize Account Generator processes through the Oracle Workflow Builder. See: .
Oracle Order Entry / Shipping inserts a Cost of Goods Sold Accounting Flexfield combination (COGS Account) for each inventory transaction line into Oracle Inventory via the Inventory Interface program. You can use the COGS Account as a basis for cost of goods sold analysis in Oracle Inventory.
The Account Generator dynamically creates a COGS Account to transfer from Order Entry / Shipping to Oracle Inventory for each order and return line when it completes the Inventory Interface cycle action. You can customize the default process to make your cost of goods sold analysis more meaningful.
You can customize the use of the Account Generator in Order Entry / Shipping, or you can use the default. The default process does not require any set up. The Account Generator default process for Order Entry/Shipping builds the COGS Account using the Cost of Sales Account for the item and organization for each inventory transaction line and inserts the COGS Account into Oracle Inventory via the Inventory Interface program.
Attention: If your organization does not use the Inventory Interface, you do not need to use this feature.
See Also
Decide How to Use the Account Generator
In Release 10, several Oracle Applications products used FlexBuilder to derive account code combinations for certain account transactions. In Release 11, FlexBuilder is replaced by the Account Generator to provide implementation teams with even greater flexibility and a better user interface with Oracle Workflow.
If you are upgrading from Release 10 and used FlexBuilder, then you should perform the equivalent of this setup step as part of your upgrade. See the FlexBuilder chapter of the Oracle Applications Upgrade Preparation Manual for more information.
If you are implementing Oracle Order Entry/Shipping for the first time, you need to review how Order Entry/Shipping uses the Account Generator to build Accounting Flexfield code combinations. Consider whether the default Account Generator process is appropriate for each set of books that uses a unique Accounting Flexfield structure. For each structure and set of books, you can choose one of the following:
- Use the default Account Generator process
- Customize the default Account Generator process
This decision determines which setup steps your implementation team needs to perform.
Prerequisites to Using the Account Generator
Before using the Account Generator on a production database in Order Entry/Shipping to create a COGS Account, you must:
Define your Accounting Flexfield structure for each set of books.
Define flexfield segment values and validation rules.
Choose whether you want to use the default Account Generator process, or if you need to customize it to meet your accounting needs.
Then do one of the following for each set of books:
- Choose to use the default Account Generator process.
- Customize the default Account Generator process, test your customizations, and choose the process for a flexfield structure, if necessary.
See Also
The Default Account Generator Process for Oracle Order Entry/Shipping
Customizing the Account Generator for Oracle Order Entry/Shipping
The Default Account Generator Process for Oracle Order Entry/Shipping
Evaluate whether the default Account Generator process meets your accounting requirements. No setup steps are required to use the default. The default process can also be updated later as your needs change. You can make minor changes to the default process without changing the name.
Note: If you used FlexBuilder in Release 10 but did not customize the default configuration, you can use the default Account Generator process in Release 11, which gives you the same result as the default assignments in FlexBuilder.
Each Account Generator workflow is called an item type. Order Entry/Shipping comes with the following Account Generator item type:
- Generate Cost of Goods Sold Account
The Generate Cost of Goods Sold Account contains the following workflow processes:
- Generate Account Using FlexBuilder Rules
Generate Default Account Process
The Generate Default Account Process consists of six unique activities to comprise the six activity nodes that appear in the workflow diagram.
In the workflow diagram shown below, the process activity nodes are numbered for reference in the descriptions that follow. (The numbers are not part of the process diagram.)

Start Generating Code Combination (Node 1)
This is a standard activity that marks the start of the process.
Get CCID for a Line (Node 2)
Step 2 determines a value that is used by node 3 and node 6 to derive the Account CCID. The derivation of this value cannot be achieved using Oracle Workflow functions. Instead, a SQL procedure is used to derive the COGS Account CCID for a line regardless of the option flag.
If the function executes successfully (gets a CCID), the process branches to node 3. If an error is encountered during execution of the function, the function branches to node 6.
Copy Values from Code Combinations (Node3)
This is a standard function that copies all the segment values from a given code combination to the combination that is being generated. This function has two attributes:
- Code Combination ID: The CCID generated in node 2.
- Replace Existing Value: Set to `True' to always copy the segment values.
Validate Code Combination (Node 4)
This is a standard function which executes after node 3. This function validates the code combination that has been generated and has two attributes:
- Validation Type: Set to `Generate Code Combination ID' to do a full validation and generate a code combination ID.
- New Code Combinations are Allowed: Set to `True' so that if the key flexfield structure has dynamic insert allowed, then the validation will not generate an error if the combination does not exist in the code combination table.
End Generating Code Combination (Node 5)
This standard function is called to end the Generate Default Account process. This function is marked as the End activity.
Abort Generating Code Combination (Node 6)
This standard function is invoked when a fatal error occurs. This function has one attribute:
- Error Message: Returns the error message for the failure condition.
Generate Account Using FlexBuilder Rules Process
If you used FlexBuilder in a previous release to generate account combinations, you can use the Generate Account Using FlexBuilder Rules process to replicate your FlexBuilder setup automatically, without changing any of your predefined FlexBuilder Rules, and without customizing the Account Generator. The Generate Account Using FlexBuilder Rules process includes a function generated during your upgrade from Release 10 to Release 11.
If you are upgrading from Release 10, follow the guidelines in the FlexBuilder chapter of the Oracle Applications Upgrade Preparation Manual.
See Also
Customizing the Account Generator for Oracle Order Entry/Shipping
Oracle Order Entry/Shipping provides default Account Generator processes for you to use. If the defaults do not satisfy your accounting requirements, you can use the Oracle Workflow Builder to customize the default processes or create a new one.
If you want to create a new process to meet your company's needs, use the Oracle Workflow Builder to create a new process, or copy the existing default and change the name before making extensive changes to it.
For more information on the generic features and functions of the Account Generator, see the Customizing the Account Generator section of the Oracle Applications Flexfields Guide.
For more information on how to use the Oracle Workflow Builder, see the Oracle Workflow Guide.
See Also
Customizing the Account Generator
Customization Example
In Order Entry/Shipping you can modify the Default Account Generator process. You can use the default Functions or you can define your own Functions, Lookup Types, and Lookup Codes if required.
You must test any modified Account Generator process before using it on a production database.
A Sample Customization to the Default Process
Suppose you want the COGS Account to use many of the segment values from the COGS Account that you have defined for each inventory item. You have several order types, but the majority of your orders use the Domestic and International order types. In the case of domestic orders, you want the COGS Account to convey some information about the primary salesperson for the line. Occasionally, your company processes international orders, in which case you want to include some different account segment values for the COGS Account. For any other order types, you simply want all segments to come from the COGS Account for each order line inventory item.
In this example, suppose you have a COGS Account with a five-segment structure.
|
1
| Company
| COGS account for the Line OR
Salesrep revenue account OR
International company segment
|
2
| Cost Center
| COGS account for the Line OR
Salesrep revenue account OR
International cost center segment
|
3
| Account
| COGS account for the Line
|
4
| Product
| COGS account for the Line
|
5
| Sub-Account
| COGS account for the Line
|
The first two segments of the COGS Account structure are for the company and the cost center. You need to create a Workflow function that states under which circumstances the Account Generator should generate the first two segments based on the other segments. If the order type is Domestic, then fill in values from the sales representative's Revenue Account in the first two segments. In the case of International Orders, fill in the values from the COGS Account for the International order type.
1. Create a Lookup Type for the order type (for example, `Order Type').
Create Lookup Code: DOMESTIC, INTERNATIONAL
2. Create a database procedure which returns the order type.
3. Create a new Workflow function (for example, `Get Order Type'), assign the procedure created in step 2 to the function, and assign the Order Type created in step 1 to the Result Type in the function properties window.
4. In the process window, the first activity should be `Start Generating Code Combination'.
5. Drag and drop the activity `Get Order Type' (created in step 3).
This procedure returns DOMESTIC, INTERNATIONAL, or others (default) depending on the `Order Type'.
6. If the `Get Order Type' function returns DOMESTIC (Domestic Order Type) in step 5, then:
a. Call the function `Get Salesrep's ID'. If it returns `Success', then call `Get CCID from Salesreps's revenue segment'. If it returns `Failure', call `Abort Generating Code Combination.'
b. If `Get CCID from Salesrep's revenue segment' returns `Success,' call `Copy Segment Value from Code Combination.' If it returns `Failure,' call `Abort Generating Code Combination.'
The `Copy Segment Value from Code Combination' function has four attributes:
--'Code Combination ID' attribute: enter `Generated CCID from the Item Attribute.'
--'Segment Identifier' attribute: enter either `Name' or `Qualifier.'
--'Segment' attribute: use `Company' if `Name' is used for the previous attribute. Otherwise, use the qualifier name.
--'Replace Existing Value' attribute: set to `True' or `False' as required.
c. Call `Copy Segment Value from Code Combination' again for the next segment (for example, Cost Center). Define the four attributes the same as in step b above, except use `Cost Center' for the segment attribute if `Name' is used for the `Segment Identifier.' If `Qualifier' is used for the `Segment Identifier,' use the qualifier name.
d. Call the `Get CCID for a line' function to get the COGS Account for a line regardless of the option flag. If it returns `Success,' then call `Copy Values from Code Combination.' If it returns `Failure,' then call `Abort Generating Code Combination.'
Assign `Generated CCID' to the attribute `Code Combination ID' and set the `Replace existing value' attribute to `False.' The remaining three segments are automatically filled. The first two segments will not be overwritten if they are already filled since the `Replace existing value' attribute is set to `False.'
7. If the `Get Order Type' function returns INTERNATIONAL (International Order Type) in step 5, then:
a. Call the `Get CCID from the Order Type ID' function. If this function returns `Failure,' call `Abort Generating Code Combination.' If the `Get CCID from the Order Type ID' function returns `Success,' call `Copy Segment Value from Code Combination.'
The `Copy Segment Value from Code Combination' function has four attributes:
--'Code Combination ID' attribute: enter `Generated CCID from the Item Attribute.'
--'Segment Identifier' attribute: enter either `Name' or `Qualifier.'
--'Segment' attribute: use `Company' if `Name' is used for the previous attribute. Otherwise, use the qualifier name.
--'Replace Existing Value' attribute: set to `True' or `False' as required.
8. If the `Get Order Type' function returns `default' (Order Type other than DOMESTIC or INTERNATIONAL) in step 5, then:
9. Call the `Validate Code Combination' function.
10. Call the `End Generating Code Combination' function.
The Account Generator takes the combination of segments for an order or return line and passes it to Oracle Inventory through the Inventory Interface program.