Contact Us

Oracle Workflows - All Articles
  • Register

Oracle Gold Partners, training schedule is listed here designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
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.

Anil Passi


0 #1 Manish 2007-04-25 00:00
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?
0 #2 Anil Passi 2007-04-26 00:00
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.

Tha nks
0 #3 Prativa 2007-05-10 00:00
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.

Plea se let me know.

Thanks and regards,
Prati va.
0 #4 bhanu_Kamal 2007-09-09 16:15
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.

Thank s & Regards

0 #5 santhosh k s 2007-09-19 07:53
Hi Anil,
Thank u very much for the info in detail .
0 #6 AK 2007-10-08 07:31
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
0 #7 Ashok 2007-12-11 22:12
Accounting flexfield structure - Division:Depart ment:Account:Me mber:Product:Re gion:Intercompa ny:Future

Curr ently 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.

Queri ed 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.

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

I highly appreciate your help.

0 #8 Venkanna 2008-02-12 20:57
I have customized the FA Account Generator workflow as per my requirement.Tha nk you for all your help.

0 #9 dileepr 2008-09-22 12:10
we are creating security rules to display only few charge accounts on the check out page.

but when we do that the default charge account is shown null or it is blank,so user has to press edit button and select a charge account from the list.

is there a way we can populate a default gl charge account on the checkout page.does this need a customization to the workflow or can it be achieved by
personalizatio n.
0 #10 KrishnaKishoreT 2009-07-20 15:34

I have a requirement wherein I need to customize the 'PO Requisition Account Generator' to generate the charge accounts based on Requisition Header DFF values selected. I modified the 'Generate Default Charge Account' process and am able to verify that the process is completing successfully.

But the account is not being defaulted on the requisition lines as the 'Generate Default Accrual Account' is completing with Failure. Should all 'Generate Default Charge Account', 'Generate Default Accrual Account' and 'Generate Default Variance Account' complete successfully for the charge account to be defaulted?

Tha nks,
0 #11 Siddhi Dwivedi 2010-05-05 21:36
Hi Anil,

We have a requirement in a customized workflow to rewind the workflow and then move it forward from one previous process after making changes.

Do we have such flexibility in workflow to move it to one previous process?

Thank s & Regards,
0 #12 Dayanand Pachanouri 2010-11-19 05:06
Hi Anil,

Thank you so much for the info in detail.

Regard s, Dayanand Pachanouri
0 #13 Bhushan 2014-10-19 09:00
Hi Anil,
Thanks for the wonderful Document. I am required to customize the PO Requisition Account Generator.
Now, the Project Number and Expenditure Type details will be entered on the Requisition line DFFs and my Cost center and Nominal value are dependent on these DFFs.
How can I derive the values for thes, as this are not standard columns in requisitions which could be mapped with the supplied attributes. Also, I am not able to find the attributes for Req Line Id or Req dist line id attributes. If I create these, whether I will be able to fetch the values for these based on itemkey?

Thanks & Regards

Add comment

Security code

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Nov 2015  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  2  3  4  5  6  7  8

Enquire For Training

Related Items


About Apps2Fusion

Apps2Fusion are passionate about training. Training is our core business and we have been doing this for many many years. We thrive to meet expectations of our trainees and we are Oracle Gold Partners. We work hard to advise trainees with right career paths. We have published various five star rated Oracle Press Books each was best sellers in its category. We have helped many and could help you as well.