Skip to main content

ORACLE WORKFLOWS

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
Image

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.
Image
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.
Image
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.
Image
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
 ,RESULT   OUT 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;
BEGIN
  IF NOT (funcmode = 'RUN')
  THEN
    RETURN;
  END IF;
  BEGIN
--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
                                                 ,itemkey
                                                 ,actid
                                                 ,'EXPENDITURE_ORGANIZATION_ID'));
    FETCH c_get_cc
      INTO rec_get_cc;
    IF c_get_cc%NOTFOUND
    THEN
      RESULT := 'COMPLETE:FAILURE';
    ELSE
      wf_engine.setitemattrtext(itemtype
                               ,itemkey
                               ,'TEMP_CC_VALUE'
                               ,rec_get_cc.org_cc);
      RESULT := 'COMPLETE:SUCCESS';
    END IF;
    CLOSE c_get_cc;
    RETURN;
  END;
EXCEPTION
  WHEN OTHERS THEN
    -- 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);
    RAISE;
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).
Image
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.
Image
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?”
Image

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

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.
Image

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.
Image
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

Popular posts from this blog

R12 Oracle E-Business Tax Configuration Guide

Applies to: Oracle E-Business Tax - Version: 12.0 to 12.2 Information in this document applies to any platform. Abstract R12 Oracle E-Business Tax Configuration Guide Document History R12 Oracle E-Business Tax Configuration 1. Tax Basic Tax Configuration Tax Definition: comprises the tax data that you set up for each tax regime and tax that your company or institution is subject to. The Tax Authority designates the regulations and rates that apply to the tax regime. Required Task List a) External Dependencies Create First Party: Legal Entity and Establishments Create Reporting and Collecting Tax Authorities b) Tax Configuration Create Tax Authorities Party Tax Profiles Create Tax Regimes Create First Party Legal Entity Party Tax Profile Create Tax Create Tax Status Create Tax Jurisdictions Tax Rate Responsibility: Tax Manager Path: Tax Managers -> Tax Managers -> Home Complete the following setup tasks: -Legal Entities and Establishments -Reporting and Collecting Tax Authorities ...

Create Accounting for a Payment generates errors 95333 and 95359

Create Accounting for a Payment generates errors 95333 and 95359 Error: 95333: A conversion rate does not exist to convert USD to AUD for the conversion type Corporate and conversion date 20-MAR-09 for line -25. Please use the Daily Rates form in General Ledger to enter a conversion rate for these currencies, conversion date and conversion type. 95359: There is no accounted amount for the subledger journal entry line. Please inform your system administrator or support representative that: The source assigned to the accounting attribute Accounted Amount has no value for extract line number 88547. Please make sure the source assigned to the accounting attribute Accounted Amount has a valid value, or assign a different source to this accounting attribute. Solution: 1. Specify a conversion rate for the currencies and conversion date mentioned in the error message 95333 Navigation under the General Ledger responsibility: Setup > Currencies > Currency Rates Manager > Daily Rates ...

R12: Payables Holds Explained – Why They are Applied and How to Remove

Invoice Validation checks the matching, tax, period status, exchange rate, and distribution information for invoices you enter. If an invoice has a hold, you can release the hold by correcting the exception that caused Invoice Validation to apply the hold by updating the invoice or the purchase order, or changing the invoice tolerances. Then resubmit Invoice Validation to release the hold. In the Invoice Holds tab, you can manually release certain invoice holds, even if you have not resolved the matching error condition. Here are some of the regular holds and explanation Account Holds Payables uses holds with this type to identify invoices with invalid or incorrect accounts. An invalid account prevents payment of an invoice and prevents Payables from creating accounting entries for an invoice or payment. Dist Acct Invalid:  Invoice distribution distributed to invalid account. To release the holds you must correct account and resubmit invoice validation. ERV Acct Invalid: ...