Oracle Cost Management Workflows

Account Generation Extension Workflow

The Account Generation Extension workflow is called from the Account Generator Client Extension. The workflow is designed to provide a graphical user interface to the Client Extension, as well as additional features such as drag and drop functionality. The workflow, like the Client Extension, allows you to specify the accounts for distribution based on the type of transaction or to define your own business functions to generate the desired accounts.

Note: Although these accounts are provided as default accounts, it is not recommended to write new extensions. You should use Subledger Accounting (SLA) to derive custom accounts. See: Oracle Subledger Accounting Implementation Guide.

You may choose to continue using the Account Generator Client Extension without using the workflow, by turning off the call to the workflow within the client extension.

If you choose to use the workflow, then modify the workflow rather than the Client Extension.

The Account Generation Extension workflow has two item types: the Standard Costing Workflow Item Type and Average Costing Workflow Item Type. Each of these workflow item types has 19 processes, one for each accounting line type. Line types identify which accounts are used, for example, inventory valuation or WIP variance accounts. Each process can be initiated from the Account Generation Client Extension, based on the costing method and the accounting line type. For standard costing transactions, the std_get_account_id package function is called. For average costing transactions the get_account_id package function is called. See: Account Generation Extension.

Related Topics

Customizing the Account Generation Process

The Workflow Item Type

Summary of the Account Generation Process

Account Generation Workflow Process Activities

Customizing the Account Generation Extension Processes

You can customize the use of the Account Generation Extension workflow processes, or you can use the default. When the processes are executed, they end by returning a user–defined account number which by default returns (–1). This default causes the distribution processor to perform distributions using the system–defined accounts.

You can view a workflow process in a Process window using Oracle Workflow Builder.

the picture is described in the document text

Displaying the Process in Oracle Workflow Builder

You can displaying the process in Oracle Workflow Builder in three steps:

  1. Choose Open from the File menu, and connect to the database.

  2. Expand the data source, then the item type branch within that data source.

  3. Expand the Processes branch within your item type, then double-click on a process activity to display the diagram of the process in a Process window.

Required Modifications

There are no required modifications.

Customization Examples

Although you can use the Account Generation Extension workflow processes as is, you may wish to customize them to accommodate your organization’s specific needs. For example, you can:

Turning Off the Account Generation Extension Workflow

You can turn off the workflow, for example, if you find that it is using too much overhead. You do this in the client extension that calls the workflow, by commenting out lines of code and substituting this line.

return –1;

For Standard Costing

Comment out these lines in the function std_get_account_id() of CSTSCHKB.pls.

SELECT 	transaction_type_id,
				transaction_action_id,
				transaction_source_type_id,
				inventory_item_id
INTO 		l_txn_type_id,
				l_txn_act_id,
				l_txn_src_type_id,
				l_item_id
FROM 		MTL_MATERIAL_TRANSACTIONS
WHERE 		transaction_id = I_TXN_ID;

l_account_num := CSTPSCWF.START_STD_WF(i_txn_id,
		l_txn_type_id,l_txn_act_id,
		l_txn_src_type_id, i_org_id,
		l_item_id, i_cost_element_id,
		i_acct_line_type, i_subinv,i_cg_id,i_resource_id,
		wf_err_num, wf_err_code, wf_err_msg);
o_err_num := NVL(wf_err_num, 0);
o_err_code := NVL(wf_err_code, ’No Error in
		CSTPSWF.START_STD_WF’);
o_err_msg := NVL(wf_err_msg, ’No Error in
		CSTPSWF.START_STD_WF’);
return l_account_num;

For Average Costing

Comment out these lines in the function get_account_id() of CSTACHKB.pls.

SELECT 	transaction_type_id,
				transaction_action_id,
				transaction_source_type_id,
				inventory_item_id,
				nvl(cost_group_id, –1)
INTO 		l_txn_type_id,
				l_txn_act_id,
				l_txn_src_type_id,
				l_item_id,
				l_cg_id
FROM 		MTL_MATERIAL_TRANSACTIONS
WHERE 		transaction_id = I_TXN_ID;
l_account_num := CSTPACWF.START_AVG_WF(i_txn_id,
		l_txn_type_id,l_txn_act_id,
		l_txn_src_type_id,i_org_id, l_item_id,
		i_cost_element_id,i_acct_line_type,
		l_cg_id,i_resource_id, wf_err_num,
		wf_err_code, wf_err_msg);
o_err_num := NVL(wf_err_num, 0);
o_err_code := NVL(wf_err_code, ’No Error in
		CSTPAWF.START_AVG_WF’);
o_err_msg := NVL(wf_err_msg, ’No Error in
		CSTPAWF.START_AVG_WF’);
–– if –1 then use default account, else use this account for
distribution
return l_account_num;

Creating a New Custom Process

You can create a new custom process and use it as a subprocess within one of the 19 processes provided.

Related Topics

Account Generation Workflow Processes

The Account Generation Workflow Item Types

Summary of the Account Generation Process

The Account Generation Extension Workflow Item Types

The Account Generation Extension workflows are associated with two item types:

These item types identify all account generation workflow processes available.

The Account Generation Extension workflow item types also have several attributes associated with them. These attributes reference information in the demonstration application tables. The attributes are used and maintained by function activities throughout the process, as presented in the following tables.

Standard Costing Account Generation Item Type Attributes

Display Name Description Type
Org ID Organization Number
Item ID Inventory Item ID Number
Subinventory Code Subinventory Code Test
Transaction ID Transaction ID Number
Account Generated Account Generated Number
Cost Element ID Cost Element ID Number
Cost Group ID Cost Group ID Number
Error Number Error number is –1 for errors, 0 for no errors Number
Error Message System error message Test
Resource ID Resource ID Number
Error Code System Error code Test
Transaction Type ID Transaction Type ID Number
Transaction Action ID Transaction Action ID Number
Transaction Source Type ID Transaction Source Type ID Number

Average Costing Account Generation Item Type Attributes

Display Name Description Type
Org ID Organization Number
Item ID Inventory Item ID Number
Transaction ID Transaction ID Number
Account Generated Account Generated Number
Cost Element ID Cost Element ID Number
Cost Group ID Cost Group ID Number
Error Number Error number is –1 for errors, 0 for no errors Number
Error Message System error message Test
Resource ID Resource ID Number
Error Code System Error code Test
Transaction Type ID Transaction Type ID Number
Transaction Action ID Transaction Action ID Number
Transaction Source Type ID Transaction Source Type ID Number

Summary of the Account Generation Extension Workflow

To view the properties of any of the processes, select the process in the navigator tree, then choose Properties from the Edit menu.

When you display the Process window for an Account Generation Extension process, you see that the process consists of three unique activities, several of which are reused to comprise the three activity nodes that appear in each workflow process diagram. The nodes are numbered for referencing below, but the numbers are not part of the process diagram.

As illustrated in the following diagram, all of the processes in the Account Generation Extension workflow have the same structure and therefore only one is shown in this document.

the picture is described in the document text

Each of the workflows processes is launched from the Account Generation Client Extension. The exact workflow process called is dependent on the costing method (standard or average) and the accounting line type.

The workflow begins at node 1 with the Start activity. At node 2, the default account (–1) is returned. Node 3 is the end activity.

Account Generation Workflow Extension Process Activities

This section provides a description of each activity listed by the activity’s display name. You can create all the components for an activity in the graphical Oracle Workflow Builder except for the PL/SQL stored procedures that the function activities call. All function activities execute PL/SQL stored procedures which you must create and store in the Oracle RDBMS. The naming convention for the PL/SQL stored procedures used in the Account Generation Extension workflow processes are:

CSTPSCWF.<PROCEDURE> (for standard costing)
CSTPACWF.<PROCEDURE> (for average costing)

CSTPSCWF or CSTPACWF are the names of the packages that group the procedures used by each process for standard and average costing respectively. <PROCEDURE> represents the name of the procedure.

STANDARD COSTING

CSTPSCWF is the name of the package.

Standard Costing Procedures

The following procedures are used:

The following procedures are seeded to return product line accounts but are not used:

AVERAGE COSTING

CSTPACWF is the name of the package.

Average Costing Procedures

The following procedures are used:

The following procedures are seeded but not used:

Start (Node 1)

This is a Standard function activity that simply marks the start of the process.

Get Default Account (Node 2)

This function activity returns (–1) to indicate that the extension has not been used.

End (Node 3)

This is a Standard function activity that simply marks the end of the process.