FA genrerator

22
Oracle Workflow™ Specs FAFLEXWF.wft – FA Account Generator Version 11.510, 115468 29-May--2009 Revision History Date (DD-MON- YY) Author Issue # Description 15-Apr- 2008 M. Fatchaline 96066 Produce this specification in support of current documentation requirements. Modify workflow to override cost center for selected Fixed Assets accounts. 29-May- 2009 Abhijit Apte 115468 Modify workflow to override cost center for selected Fixed Assets accounts for COLORCON US and COLORCON PR Books PL/SQL Specification Template 1.0Page 1 of 22 document.doc

Transcript of FA genrerator

Page 1: FA genrerator

Oracle Workflow™ SpecsFAFLEXWF.wft – FA Account GeneratorVersion 11.510, 115468 29-May--2009

Revision History

Date (DD-MON-YY)

Author Issue # Description

15-Apr-2008 M. Fatchaline 96066 Produce this specification in support of current documentation requirements. Modify workflow to override cost center for selected Fixed Assets accounts.

29-May-2009 Abhijit Apte 115468 Modify workflow to override cost center for selected Fixed Assets accounts for COLORCON US and COLORCON PR Books

PL/SQL Specification Template 1.0 Page 1 of 17 document.doc

Page 2: FA genrerator

Distribution

System Owners Oracle Applications - Fixed Assets

IT Review Manager, Business Applications Analysts Manager, Business Application Development

Purpose

OverviewOracle Fixed Assets generates accounts using a workflow process called FA Account Generator. This process will be called by the application to generate an asset related account when the account is needed to complete a transaction. Oracle Fixed Assets can generate 25 different account types for a particular asset.

Oracle Fixed Assets also has a concurrent process called Generate Accounts, short name FAGDA (Fixed Assets Generate Distribution Accounts) that will generate and store from 14 to 23 of the 25 accounts that may be needed by an asset in it’s lifetime. The FAGDA concurrent process generates the accounts by calling the FA Account Generator process for each active distribution for the asset book for the process was run.

FA Account Generator is referred to as the workflow process for generating accounts in Oracle Fixed Assets. FA Account Generator is in fact the workflow type, which in turn points to the actual workflow process. The Generate Accounts concurrent process (FAGDA) pre-generates individual code combinations for each distribution. The ccids generated are stored in the FA_DISTRIBUTION_ACCOUNTS table.

When a process or transaction needs an account, if the account is one of the pre-generated accounts, it first checks this table and uses the pre-generated ccid if it is populated therein. If the account is not present, then a call to workflow is made and the account generated.

Generate Accounts is primarily a performance enhancement feature. Multiple calls to workflow to generate a large number of accounts, such as in a depreciation run, can cause a performance bottleneck. This can be avoided by generating the needed accounts in advance using the FAGDA process. The FAGDA process is submitted automatically when the Depreciation process is run. This is the only time the process is submitted unless the user also submits it as a standalone process. The name of the standalone request is “Generate Accounts”.

NarrativeThis document is concerned with the actual workflow process and not the Account Generator (FAGDA) concurrent process. As mentioned above the FAGDA process and associated workflow is simply a performance enhancement process for Depreciation and other asset processes. These processes can complete successfully even if FAGDA has completed in error. However, if FAGDA fails to generate an account that is needed by a process, then the process will also fail when it attempts to generate the account in question. As mentioned, the Generate Accounts process and associated workflow can generate 23 of the 25 possible accounts needed during the lifetime of an asset. These accounts can be grouped into three account type levels: Asset Level, Book Level and Category Level.

Workflow Specification Template 1.0 Page 2 of 17 document.doc

Page 3: FA genrerator

The Account Generator is used to perform one of these five processes:

1. Generate Default Account2. Generate Asset Level Account3. Generate Book Level Account4. Generate Category Level Account5. Generate Account using Flexbuilder rules

The Generate Default Account process incorporates three other processes:1. Generate Asset Level Account2. Generate Book Level Account3. Generate Category Level Account

The type of account you want to build determines which process you need to modify. If you want to modify an account driven by the category level (i.e. defined in the asset categories form), you must use the Generate Category Level account process. The following table lists all the Account Generator processes and the names of the accounts that each process generates.

The Asset Level accounts include only the Depreciation Expense account. The default workflow for the asset level account simply uses all the segments for the expense account that was assigned to the asset in the Assignments form.

The following example is for the DEPRECIATION_EXPENSE_ACCOUNT.

Workflow Specification Template 1.0 Page 3 of 17 document.doc

Page 4: FA genrerator

The default workflow for the Category Level accounts pulls the required segments from three different account combinations:

Expense account (DISTRIBUTION_CCID) Default account (DEFAULT_CCID) Various accounts from the category definition

The following example is for the ASSET_COST_ACCOUNT.

The default workflow for the book level accounts is identical to the category level except that the natural account segment comes from the Book Controls rather than from the category.

The following example is for the NBV_RETIRED_LOSS_ACCOUNT.

Workflow Specification Template 1.0 Page 4 of 17 document.doc

Page 5: FA genrerator

Each of these named accounts is defined in different areas within Fixed Assets and depends on the Account Type. The Asset Level account is simply the depreciation expense account and is assigned to the asset at time of creation. This is done on the Asset Assignments form. The Book Level accounts are defined in the Book Controls form and the Category Level accounts are defined in the set-up categories form. For a further explanation of how these accounts are defined within the application see Appendix B.

After obtaining and modifying the workflow definition per requirements the modified workflow needs to be tested.

ITG 96066; Begin.Modifications are required to the default workflow used by the FA Account Generator process. The modification is for the workflow to perform an override for segment3 (Cost Center) of the accounting flexfield for certain Book Level accounts and set the value to ‘900’ for these selected accounts. This is an override of the default cost center segment and is a common change to the workflow and therefore much Oracle documentation exists. The default workflow is currently obtaining the segment3 value for ALL Book and Category Level accounts from the Account Generator Defaults section on the Book Controls form. This override of segment3 should occur with the following restrictions: Book Class is Corporate; Book is COLORCON UK or MICRON TECH UK or COLORCON IN; Account Type is Book Level Accounts; Book Level Accounts are Net Book Value Retired Gain, Net Book Value Retired Loss, Proceeds of Sale Gain and Proceeds of Sale Loss. All other paths of this workflow definition should use the defaults. Please note that the Micron book will be found on a separate database instance and the required workflow changes will also need to be applied to that environment.ITG 96066; End.

ITG 115468; Begin.Modifications are required to the default workflow used by the FA Account Generator process. The modification is for the workflow to perform an override for segment3 (Cost Center) of the accounting flexfield for certain Book Level accounts and set the value to ‘900’ for these selected accounts. Currently this change has been implemented for COLRCON UK for below Book Level Accounts .1.Net Book Value Retired Gain2.Net Book Value Retired Loss3.Proceeds of Sale Gain 4.Proceeds of Sale Loss.

We Need same change for COLORCON US and COLORCON PR. Workflow Specification Template 1.0 Page 5 of 17 document.doc

Page 6: FA genrerator

ITG 115468; End.

Modifications to FA Account Generator Workflow .

Process : Generate Book Level Accounts(OLD)

Process : Generate Book Level Accounts(NEW)

Process : Generate Book Level Accounts(ITG115468)

Workflow Specification Template 1.0 Page 6 of 17 document.doc

Page 7: FA genrerator

Use the below code , by creating pl/sql code to gwet custom value

CREATE OR REPLACE PACKAGE BODY APPS.fa_acct_generator IS/* ******************************************************************************************** $Header: crpkb_fa_acct_generator.sql 25-JUN-09 K. Lies 11.5.10 115468 pkm ship$ Purpose : This package is used for custom functions in FA accoount generator worklflow Modification History: Modified By Modified On Reference# Comments =============== ============== ============== ============================================== Kenny Lies 25-JUN-09 115468 Branch based on FA BOOKS lookup Amit S 08-SEP-08 96066 Reoved condition for colorcon IN book Amit S 07-AUG-08 96066 Added conditin for colorcon IN Book Amit S 21-MAY-08 96066 Creation of package************************************************************************************************/ PROCEDURE check_book_type( itemtype IN VARCHAR2, itemkey IN VARCHAR2, actid IN NUMBER, funcmode IN VARCHAR2, RESULT OUT VARCHAR2) IS

CURSOR cur_fa_books ( p_lookup_code VARCHAR2 )IS SELECT flv.lookup_code FROM apps.fnd_lookup_values flv WHERE flv.lookup_type = 'FA BOOKS' AND flv.lookup_code = p_lookup_code AND flv.LANGUAGE = 'US' AND flv.enabled_flag = 'Y'

Workflow Specification Template 1.0 Page 7 of 17 document.doc

Page 8: FA genrerator

AND SYSDATE BETWEEN NVL(START_DATE_ACTIVE,SYSDATE) AND NVL(END_DATE_ACTIVE,'31-DEC-4712');

l_book_name VARCHAR2(200); l_default_ccid NUMBER;-- l_uk_book VARCHAR2(20) := 'UK_BOOK';-- l_in_book VARCHAR2(20) :='IN_BOOK' ; l_custom VARCHAR2(20) := 'CUSTOM'; l_book_type_code1 apps.fnd_lookup_values.lookup_code%TYPE; l_book_type_code2 apps.fnd_lookup_values.lookup_code%TYPE; BEGIN IF (funcmode = 'RUN') THEN l_book_type_code1 := wf_engine.getitemattrtext(itemtype, itemkey, 'BOOK_TYPE_CODE'); l_default_ccid := wf_engine.getitemattrnumber(itemtype, itemkey, 'DEFAULT_CCID');

IF cur_fa_books%ISOPEN THEN CLOSE cur_fa_books; END IF;

OPEN cur_fa_books (l_book_type_code1); FETCH cur_fa_books INTO l_book_type_code2; CLOSE cur_fa_books;

IF l_book_type_code2 = l_book_type_code1 THEN RESULT := 'COMPLETE:' || l_custom; RETURN; --ELSIF l_book_name ='COLORCON IN' THEN

-- RESULT := 'COMPLETE:'||l_in_book; ELSE RESULT := 'COMPLETE:'; RETURN; END IF;

ELSIF(funcmode = 'CANCEL') THEN RESULT := 'COMPLETE:'; RETURN; ELSE RESULT := ''; RETURN; END IF; END;END fa_acct_generator;/

Workflow Specification Template 1.0 Page 8 of 17 document.doc

Page 9: FA genrerator

Process : Generate Book Level Accounts(NEW)

Process : Generate CCID (NEW)

Workflow Specification Template 1.0 Page 9 of 17 document.doc

Page 10: FA genrerator

Primary Test Case(s)

Create a New Asset

Make sure you are in a UK responsibility. Create a new asset in the Colorcon UK book using the Asset Workbench forms. Navigation is > Fixed Assets >Assets > Assets Workbench. On the Find Assets form click the Quick Additions button located on the lower right hand side. The Quick Additions form will be presented and you should complete the following fields:

Asset Number = My initials + TEST + sequence. (I.E. MFTEST001) Description = Same as Asset number Category = 020.030.000

Navigate to the Book section of the form Book = COLORCON UK Cost = $10,000

Before navigating to the Assignments section of the form make sure the Depreciate flag is checked. Units = 1 Expense Account = 220.000.600.77027.000.000 Location = 220.200.220.600.000

Hit the done button to commit the addition. For the next part of the test you will need the asset Id and Book Type Code. From the form toolbar select > help > diagnostics > examine. Change the field value from asset_number to asset_id and note the value for the id. The Book Type Code is Colorcon UK.

Obtain Parameters for Testing.

Oracle provides a script to test Account Generator modifications which is called FAXAGTST.sql. Before running this test script a pre-requisite script needs to be run to obtain the necessary parameters for the test. The specifics of this pre-requisite script are documented in Metalink and can be found using Doc ID: Note: 432971.1 See reference in Appendix A of this document.

When you obtain the necessary parameters for testing you can run the account generator test which is located in the $FA_TOP/admin/sql directory and is called faxagtst.sql. There are seven input parameters for this test: account_type, book, flex_structure, distribution_ccid, account_segment, default_ccid and account_ccid. The specifics regarding this test are documented in Metalink and can be found using Doc ID: Note:131483.1. See reference in Appendix A of this document.

User Interface

Execution Method The Concurrent Program that uses this workflow is called Generate Accounts.

Code Structure

1. Package Function: Not Applicable

Workflow Specification Template 1.0 Page 10 of 17 document.doc

Page 11: FA genrerator

Pseudo code<N/A>

ParametersParameter Name Required Description Desired Effect Default

N/A N/A N/A N/A N/A

** End of functional requirements **

Workflow Specification Template 1.0 Page 11 of 17 document.doc

Page 12: FA genrerator

Key Dependencies

Concurrent Program SetupSee Also Concurrent Program standards

Workflow DefinitionFilename faflxgrp.wftLocation $FND_TOP/bin/Description Workflow used exclusively by the FA Account Generator processItem Type “FA Account Generator” within App or ”FAFLEXWF” from command prompt

Program: XXXX

DescriptionFormatStyleUse in SRSOther (Non-standard settings)

ParametersSEQ

Prompt Parameter/Token Required Display

Value Set Default Type Default Value

N/A N/A N/A N/A N/A N/A N/A N/A

Request Group(s) XXXX

Tables/Views(All objects assumed to be visible to APPS user)

Object Name Alias Description

Workflow Specification Template 1.0 Page 12 of 17 document.doc

Page 13: FA genrerator

Technical Comments

96066, 07-Oct-2008 by Abhijit

Modified the FA Account Generator (FA_ACCOUNT_GENERATOR.wft) workflow t.

Modified Generate Book Level Accounts Process to have new function ‘Check Book Type Code ‘ . This function does validation and take a route to custom flow for UK book . For the other books Original standard flow is followed . Function ‘Check Book Type Code ‘ uses databas package procedure fa_acct_generator.check_Book_type .

Added the Below new process

Generate Book Level Account Generate CCID

Workflow Specification Template 1.0 Page 13 of 17 document.doc

Page 14: FA genrerator

Appendix A -- Metalink References

Note:131483.1 Information You Will Need to Run an Account Generator Test with FAXAGTSTThis document is a pre-requisite testing script that must be run in the database and uses as input an asset_id and book_type_code. The output of this script is called acctflexgenval_trc.html and will identify the parameter values of all the accounts needed to run the Account Generator test FAXAGTST.sql.

Note:432971.1 How to Get the FA Account Generator Workflow Definition Stored in the DB?This document explains the three ways to retrieve workflow definition FAFLEXWF from the database.

Note:145413.1 FAQ: Workflow in Fixed AssetsThis document explains how to use Workflow builder to customize Account Generator.

Note:147347.1 Generate Accounts Frequency Asked Questions (FAQ)Various explanations of the Account Generator processing.

Note:115322.1 White Paper: Account Generator and WorkflowA good document for the novice which explains each of these processes and the relationship to each other.

Workflow Specification Template 1.0 Page 14 of 17 document.doc

Page 15: FA genrerator

Appendix B – Application Set-ups for Asset, Category and Book Level Accounts.

>Asset Workbench >Assignments

Workflow Specification Template 1.0 Page 15 of 17 document.doc

Page 16: FA genrerator

Setup>Asset System>Categories

The natural account (segment4) defined on this Categories form will be used by the default work flow to complete the accounting flexfield for all the Category Level accounts.

Workflow Specification Template 1.0 Page 16 of 17 document.doc

Page 17: FA genrerator

Setup>Asset System>Book Controls

The natural account (segment4) defined on this Book Controls form will be used by the default work flow to complete the accounting flexfield for all the Book Level accounts. The natural accounts depicted on this screenshot are located within the red box.

The Region (segment2), Cost Center (segment3), Project Code (segment5) and extra segment (segment6) values defined in the Account Generator Defaults section of this form will be used by the default workflow process to complete the accounting flexfield for all Book Level accounts. The default accounts are located at the bottom of this form within the red circle.

Workflow Specification Template 1.0 Page 17 of 17 document.doc