<-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
Skip to content



Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color

Related Items

Home arrow Technical Articles arrow Oracle Workflows arrow Oracle Account Generator Workflow Example
This website has now moved to http://apps2fusion.com

Oracle Account Generator Workflow Example | Print |  E-mail
Written by Anil Passi   
Sunday, 17 September 2006
This article illustrates the steps one needs to implement to build an Account Generator Oracle Workflow for eBusiness Suite.

For this exercise I am using iProcurement & core Purchasing Account generation workflows. However, the concepts remain the same for all the account generator workflows, regardless of the module.

Assume that we have two Accounting Flexfield segments in Oracle General Ledger:-
1.            Company Account
2.            Cost Centre

Important: In real life, you will have more than mere two segments in the GL Accounting Flexfield. These pseudo Two GL Segments are for demo purposes only.

Assuming that you have implemented Oracle Projects Accounting, the Requisition or a Purchase Order can either be Project based or can be Non Project based. For this exercise, for simplicity, lets restrict ourselves to Project Based Requisition.

Lets assume that the business requirement for Project Based Requisitions is:-
Company Segment for Projects based Requisition
Company Account Segment will be Defaulted to a constant value of GO4GOLD

Cost Centre Segment for Projects based Requisition
This will be defaulted from the Attribute1 against Primary Organization for Project Task .

OK, here we go with all the steps that are required to build such an Account Generator Workflow.

Step 1
Open the account generator Workflow

Step 2.
Assign default value to Company segment.

Double click to open the process “Build Expense Project Charge Account”
After the Start Icon, Right Click to create a new Function.
As in screenshot below, in “Item Type” field, select “Standard Flexfield Workflow” from the drop down list. In the Display Name select “Assign Value to Segment” and click on OK.

By doing the above step, we have just created a workflow Function that is capable of assigning a desired value to GL Flexfield Segment. Now we need to configure this Function further, so that it knows the Segment upon which it operates, and also the default value that is assigned to the segment.
As per our business requirement, we need to default a constant value of GO4GOLD for our Segment1 ( Company Segment ) . For this, click on the function created above, and click on the Node Attributes.
Do the steps, as in above screenshot.

Step 3 ( Part a).
Default the cost centre from Attribute1 against Primary Organization for Project Task.

In the Part-a of this step, we will assign the Cost Centre to an Attribute Named “TEMP_CC_VALUE”.

For this, we can define a new function named “Assign Cost Centre to Attribute”, by right clicking on the process.

This function calls PL/SQL XX_account_generator_pkg.set_cost_centre_attribute
PROCEDURE set_cost_centre_attribute
  itemtype IN VARCHAR2
 ,itemkey  IN VARCHAR2
 ,actid    IN NUMBER
 ,funcmode IN VARCHAR2
) AS
  CURSOR c_get_cc(p_org_id IN NUMBER) IS
    SELECT attribute1 org_cc
    FROM   hr_all_organization_units hrou
    WHERE  hrou.organization_id = p_org_id;
  rec_get_cc c_get_cc%ROWTYPE;
  IF NOT (funcmode = 'RUN')
--First nullify the value, so that accidentaly it does not get used in the next step.
    wf_engine.setitemattrtext(itemtype, itemkey, 'TEMP_CC_VALUE', '');
    OPEN c_get_cc(wf_engine.getactivityattrnumber(itemtype
    FETCH c_get_cc
      INTO rec_get_cc;
    IF c_get_cc%NOTFOUND
    END IF;
    CLOSE c_get_cc;
    -- Record error using generic error message routine for debugging and
    -- raise it
    wf_core.CONTEXT(pkg_name  => 'ic_account_generator_pkg'
                   ,proc_name => 'GMS_GET_CC'
                   ,arg5      => NULL);
END set_cost_centre_attribute;

In the above function, we are fetching the Attribute1 against the Organization Record. The organization_id is being passed as a parameter to the Newly defined Function( as in screenshot below).

Step 3 ( Part b).
In this part of the step, we will assign the value in Attribute “TEMP_CC_VALUE” to the  Segment2 ( i.e. the Cost Centre). This is done as per the screenshot below.

Step 4. Check to see if the Code Combination is Complete
Right click to create a function. From Item Type dropdown list, select “Standard Flexfield Workflow”. In the Display Name dropdown list, select “Is Code Combination Complete?”

Next, click on Node Attributes, and assign a value of TRUE to “Check only required Segments”.

Step 5. By implementing the above steps, we have been able to complete the Account Generation of our two-segment Flexfield using Oracle Workflow Account Generator.

The last and final step will already be there within the Pre-Installed Account Generation. This workflow step validates the Code Combination Id, for the Oracle’s Security Rules that are defined in General Ledger, against users responsibility. For reference purposes this is pasted below.

A final note, for debugging the Account Generator workflow. Account Generator workflows are designed to run efficiently and quickly, hence they always in synchronous mode. This means that no inserts are made into the Oracle Workflow tables when generating the accounting.
Hence by default it is not possible to debug the Account Generator workflow using Status Monitor screen in Oracle Workflow.
However, Oracle delivers a profile option named “Account Generator:Run in Debug Mode”. Setting this profile to Yes, will make Account Genration processes insert records in workflow tables. Hence by setting this profile to Yes, you will be able to debug your account generation workflow. Further debugging of FND_FLEX API’s is made possible by enabling the FND Logging.

Comments (8)add
written by Manish , April 25, 2007
Hi Anil,
This really helped me.. Thanks a lot.
I just had one question. In a isupplier seeded workflow , the processes are locked for update. (see a red lock sign on the process). How do I unlock the process?
written by Anil Passi , April 26, 2007
Hi Manish

This is because your access level is higher than that of the object.

go to help menu in WF Builder, and set your access level to be a lower than that for the process.

For example, set the access level to 0, then you will be able to modify the process.

written by Prativa , May 10, 2007
Hi Anil, Thanks for the wonderful document. it really helped me.
I have one question.
I am trying to create step 3, part a, I can not able to type an internal name. I can not see the internal name- GET_COST_CENTER_FROM_ORG either.

Please let me know.

Thanks and regards,
written by bhanu_Kamal , September 09, 2007
Hi Anil,
I have a problem related to po requisition workflow customization. i am describing my requirement through an example.

1. Log on as SACHORN create and submit requisition for approval. $300,000
2. Review approval list: BBAKER,DMcIlvin, JSWIFT, JBARRYHAMILTON
3. Log on as BBAKER, approve
4. Log on as DMcIlvin, approve
5. Log on as JSWIFT, change the account number
a. open the requisition via wf notification, select edit requisition
b. select approver checkout
c. continue until you reach Review Charge Accounts, select the account number
d. change the natural account number to 670203
e. continue and approve requisition
6. Log in as SACHORN and review status requisition
a. it is now at BBAKER waiting for approval.

>>> This is where we don't want it going back to the approver for approval. It should
have continued to JBARRYHAMILTON
There is a validation somewhere during the approver checkout process that determines
that the req needs to get reapproved.

How i can customize this workflow REQAPPRV.wft. which package i have to customize and how?
please describe in detail.

Thanks & Regards

written by santhosh k s , September 19, 2007
Hi Anil,
Thank u very much for the info in detail .
written by AK , October 08, 2007
Hi Anil,
Is it possible for the user to initiate the invoice approval process(kicking of Invoice Approval workflow)even if the invoices are on hold ?
Thanks for your help
FA Account Generator Worflow - Customization
written by Venkanna Mittakanti , December 11, 2007
Accounting flexfield structure - Divisionsmilies/cheesy.gifepartment:Account:Membersmilies/tongue.gifroduct:Region:Intercompany:Future

Currently the retirement accounts picks up the value for member and region from the default Book Controls in our current business scenario. Business needs to modify this, as there is a commitment of this asset to a particular member and region. So at the time of retirement the associated accounts for proceeds of sale on Gain or Loss account should have the values relevent to where the asset was assigned just prior to retirement. The Account generator needs to be modified so as to pick up the values of both Member and Region from the Asset Assignments.

I have customized FA Account Generator workflow as below.
FA Account Generator Workflow -> Generate Default Account Process.

1. Modified the "Generate Book Level Account" process to fetch the Member and Region Segments from Distribution CCID for the corresponding account types.
2. Modified the "Generate Category Level Account" process to fetch the Member and Region Segments from Distribution CCID for the corresponding account types.

Tested the scenario after implementing the custom workflow, But there was some mismatch with the expected results.
- Select and Retire one Asset
- Executed depreciatin without closing the period
- Ran "Create Journal Entries" Process.

Queried the journal transfered from Assets using the period and source. The Account Code combination for the retired assets is not correct. Still it shows account code combination
for the retired asset as old logic.

Infacg FA Account Generator Workflow processed and generated new code combination, But it does not reflect in the journal transfer.

Could you please help me to resolve this issue or am i missing some steps in the workflow customization.

I highly appreciate your help.

FA Account Generator Worflow - Customization
written by Venkanna , February 12, 2008
I have customized the FA Account Generator workflow as per my requirement.Thank you for all your help.

You must be logged in to a comment. Please register if you do not have an account yet.