Monday, October 15, 2018

Oracle Workflow – Account Generator Process In Oracle Apps

Oracle Workflow – Account Generator Process

What does the Account Generator process do?The Account Generator process builds charge, budget, accrual, and variance accounts for each purchase order, release, and requisition distribution based on the distribution’s destination type. It is a synchronous Workflow process.
What are the Pre-requisites to use Account Generator?Before using the Account Generator you must:
– Define your Accounting flexfield structure for each set of books.
– Define flexfield segment values and validation rules.
– Set up Oracle Workflow.
– Decide whether you want to use the Account Generator processes as seeded in Oracle Purchasing, or you need to customize them to meet your accounting needs
What are the steps to generate the WFSTAT output for Account Generator?
A: 1. Set the following profiles:
– Account Generator: Run in Debug Mode=> Yes
– Account Generator: Purge Runtime Data=> No
PO: Set Debug Workflow On => Yes
2. Make sure that the concurrent program “Purge Workflow Obsolete Runtime Data” is NOT running.
3. Open Purchase Order/Requisitions form, go to the distributions window, enter necessary fields and click on charge account field to start generating the charge account. After the account generator has done building the account, or errors out, do the following from the toolbar (DO NOT exit the form or navigate to any other block or record, otherwise this information would be lost):
Help=> Diagnostics => Examine
Enter in 1st field => parameter
Enter in 2nd field => charge_acc_wf_itemkey
Then tab out. The Item key will appear in the third field.
4. Now save the purchase order/requisition. If you are not able to save, then clear the distribution record and navigate back to the shipment window and save the form. Saving the form is must, because a commit is required to save the workflow information in tables, for generating the wfstat output.
5. If step#3 could not give you an item key, then use the following query to identify the relevant item key:
Select item_key, item_type, begin_date
from wf_items
where item_type = ‘&item_type’
order by begin_date desc;
For PO, use ‘POWFPOAG’ item type in above query, and for requisition, use ‘POWFRQAG’.
6. To generate the WFSTAT output,
Run the sql in $FND_TOP/sql/wfstat.sql with above item_type and item_key. Spool the output.
7. To get the wf debug information, run the following query:
SELECT item_key, item_type, debug_message
FROM po_wf_debug
WHERE item_key = ‘&Item_key’
ORDER BY execution sequence;
How do you determine the WF Item Key value to run wfstatus.sql for Account Generator workflows?The item key is required in order to run wfstatus.sql for account generator. The wfstatus.sql gives important debug messages, including error messages for processes that are erroring out. This provides the same information that the Workflow Monitor does, if the Workflow Monitor is setup.
Steps to determine the WF Item Key value:
The item key can be found in the Workflow–>Status form in Projects (Querying by item type and dates) or, more generally, via SQL*Plus from the table WF_ITEMS. A sample script for getting the key is below:
Select item_key, begin_date, end_date
from wf_items
where item_type = ‘PAAPINVW’
and begin_date between ‘&low_start’ and ‘&high_start’;
If this does not definitively identify your item you can query on the various items in the Workflow status form to give you more information about the activities associated with them.
How do I save my workflow definition to the database?There are three options to use when saving your workflow definition to the database:
Option #1
If you have the file open in workflow builder select File -> SaveAs -> Database. Enter the apps username and password and provide the connection string (from the tnsnames.ora in the %ORACLE_HOME%\network\admin directory).
Option #2
The WFLOAD utility is used for loading and extracting workflow definition files to and from the database.
Command Line Syntax:
WFLOAD 0 Y {UPLOAD | DOWNLOAD | UPGRADE | FORCE}
[filepatch [item type]]</APPS pwd>
NOTE: The item type parameter is used only for the DOWNLOAD mode.
Option #3
Run the concurrent program, Workflow Definitions Loader. The system administrator will need to add this concurrent program to a request security group for the responsibility that you want to run this program from.

How do I trace errors in my Workflow processes?A: If a customized workflow process errors you should check the error stack (using the Workflow Monitor and/or wfstatus.sql script), if the procedure in error does NOT begin with WF_.. OR _… then you need to debug your own pl/sql procedures.
If standards in the Workflow Guide for exception handling have not been followed, you can still tell whether the problem is with your code, because Oracle Workflow traps external exceptions and reports these as
Activity Status: ERROR
Activity Result: #EXCEPTION
This is what would show up in the workflow monitor or any status report or form inquiry for the failing activity.

How do I customize the Account Generator Workflow process for my company?A: Customers are expected to customize the Account Generator process. You can do this by editing the existing process or creating your own process, but this MUST be within the seeded ‘Item Type’. You should NOT create a NEW ‘Item Type’ as this would NEVER be run by Account Generator.
If you create a new process, you must ensure it is “Runnable.”
You must then assign the appropriate process to the Accounting Flexfield structure in the Account Generator Process window in Oracle Applications (login as System Administrator, Application -> Flexfields -> Key -> Accounts and query up the required Accounting flexfield structure).

No comments:

Post a Comment

SQL Important Queries

  How to delete rows with no where clause The following example deletes  all rows  from the  Person.Person  the table in the AdventureWork...