PAAPINVW - Steps to Customize Project Supplier Invoice Account Generator Workflow [ID 1344854.1] | |||||
| |||||
修改时间 12-AUG-2011 类型 HOWTO 状态 MODERATED |
In this Document
Goal
Solution
References
This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review. |
Applies to:
Oracle Project Costing - Version: 11.5.10.2 to 12.1.3 - Release: 11.5.10 to 12.1Information in this document applies to any platform.
Goal
Steps to Customize Project Supplier Invoice Account Generator Workflow (PAAPINVW)Solution
Customizing Supplier invoice account generator is one of the mandatory steps to generate an account for the project related invoice created in Payables.Without customizing workflow system will not allow you to create a project related supplier invoice.
If we do not customize the PAAPINVW workflow, when we save the project related invoice distribution following error is raised.
"The default workflow for the Oracle Payables Account function Project Supplier Invoice Charge Account has not been customized.
Please replace the dummy function in the default process for account generation by your own account generation method"
Sample examples on how to customize PAAPINVW workflow.
Example 1 - Customizing the workflow with all the constant segment Values.
Example 2 - Customizing the workflow with one segment value derived from Lookup Set and rest are constant values.
Example 3 - Customizing the workflow to use user-entered account in the invoice distributions screen.
Note - Even if users manually enter the account segments in the invoice distribution screen the workflow has to be customized.
Workflow file related to Project Supplier Invoice Account Generator which we need to customize is :- PAAPINVW.wft
Following Points to be noted while customizing the workflow.
1. Process must have result type of "Flexfield Result"
2. First node should be "Start Generating Code Combinations"
Must be the a "Start" Node
3. Use "Validate Code Combination" activity before ending workflow with Success result.
4. End generating Code Combination
Must be an "End" node
Should have result set to "Success"
5. Abort generating Code Combination
Should be an "End" node
Should have result set to "Failure"
Before we start customizing the workflow we should know the number of segments to use in the workflow file. To determine number of segments goto Applications.
Setup-->Flexfields-->Key-->Segments
Search Application :- General Ledger
Flexfield Title :- Accounting Flexfield
Select the Accounting Structure that you are using and click on Segments
Example 1 - Customizing the workflow with all the constant segment Values.
1. Open the workflow file PAAPINVW.wft using Oracle Workflow Builder.
Goto Node PAAPINVW-->Processes
2. Right Click on Processes Node and select "New Process"
Input following details
-->Internal Name
-->Display Name
-->Result Type - Flexfield Result
-->Click ok
3. Open the process that you have defined.
It will open a blank page, right click on the page and select "New Function"
First we need to define the Start Node.
In the "Function" Tab, select following details
Item Type - Standard Flexifield Workflow
Internal Name - FND_FLEX_START_GENERATION
Next goto the "Node" Tab
For Start/End - select "Start" since this is the start node.
Click ok, it will create a Start Node.
4. Next step is to define other nodes and assign values to the segments.
Since in the above example we have 4 Segments.
-->Services Company
-->Services Department
-->Services Account
-->Services Product
To assign values to the above segments, right click on the page and select "New Function"
In the "Function" Tab, select as below
Item Type - Standard Flexifield Workflow
Internal Name - FND_FLEX_ASSIGN_TO_SEGMENT
Next goto the "Node Attributes" Tab
Here we have four attributes.
-->Segment Identifier - whether segment is identified by "Qualifier" (like Balancing Segment) or "Name"
-->Segment - either the specific qualifier or specific name
-->Value - value to be assigned
-->Replace existing value - use "True" to copy value regardless of existing value,"False" to only copy value if current value is null
We will consider Segment Identifier as --> Name
For the "Segment" attribute input the value of the fisrt segment i,e "Services Company"
Since we are identifying segment using Name, segment value would be the internal name of the Segment.
For Value input a constant value to be assigned to the "Services Company" segment.
Replace existing value - use "True" to copy value regardless of existing value,"False" to only copy value if current value is null
Once done click ok.
Similarly assign values to other 3 segments.
i,e Services Department
Services Account
Services Product
5. Once values are assigned to the segments, next step is to add the activity "Validate Code Combination"
Right click on the page and select "New Function"
In the "Function" Tab, select as below
Item Type - Standard Flexfield Workflow
Internal Name - FND_FLEX_VALIDATE_COMBINATION
Next goto the "Node Attributes" and Input the required values
Validate Code Combination
Validation Type set to "Generate Code Combination ID" to do full validation and return ccID, set to "Validate Segments with Values only" to validate that value in each segment is a valid value
Note: Does not do insert into GL_CODE_COMBINATIONS, returns -1 if can be inserted and combo is otherwise valid.
6. Creating the end note
Right click on the page and select "New Function"
In the "Function" Tab, select as below
Item Type - Standard Flexfield Workflow
Internal Name - FND_FLEX_END_GENERATION
Next goto the "Node" Tab
For Start/End - select "END" since this is the end node.
Result - Success
Click ok, it will create a End Node.
7. Once all the nodes are created we need to link all the nodes to derive the flow
8. Once the Customization is done, we need load the workflow file to the data base.
Use the below command to load a workflow file to the database.
WFLOAD apps/apps 0 Y UPLOAD PAAPINVW.wft
9. Sign into applications, Setup | Flexfields | Key | Accounts
Search Application :- General Ledger
Flexfiled Title :- Accounting Flexfield
Select the Accounting Structure that you are using
Select appropriate account generator i,e "Supplier Invoice Account Generator", Change process to new custom process that you defined.
10. Once above steps are done, when we create a project related supplier invoice the process will create a supplier charge account using the workflow customization.
Example 2 - Customizing the workflow with one segment value derived from Lookup Set and rest are constant values.
In the above example we have seen that all the values assigned to the segments are constant values.
Instead we can also get the values for the segments from Lookup sets defined in the Applications.
For the above example, let us consider value for Segemt2 i,e "Services Department" to be dervied from Lookup set, other values remain the same.
First we need to define a lookup set in the Application.
Goto Setup-->AutoAccounting-->Lookup sets
Define a Lookup set name.
Intermediate Value and segment Value.
Open the Workflow and goto the process that we have defined.
Right click on the page and select "New Function"
In the "Function" Tab, select as below
Item Type - Project Supplier Invoice Account Generation
Internal Name - SEGMENT_LOOKUP_SET
Next goto the "Node Attributes" Tab
Input Lookup Set Name - Here input the lookup set which is defined in the applications and that you wish to use.
![article?cmd=show&type=ATT&id=1344854.1:22](https://i-blog.csdnimg.cn/blog_migrate/f4625048b2b685bba563cf642f54bfec.png)
Intermediate value depends on your business requirement and the way lookup set is defined.
For example if we have a requirement to get the segment values based on Expenditure type.
Select Type - Item Attribute
Value - Expenditure Type from the Lov.
![article?cmd=show&type=ATT&id=1344854.1:23](https://i-blog.csdnimg.cn/blog_migrate/3276bf69ad9c7778e024e0a46813778a.png)
When the workflow is called, system will pass the expenditure type to the above lookup set.
And it will verify if the expenditure type passed exists in the lookup set that we have defined.
If yes then it will fetch the corresponding segment value and assign it to the segment.
In our example, let us consider the invoice has an Expenditure Type as "Clerical"
Since Clerical exist in the Lookup set, corresponding segment value i,e 02 will be returned.
Else it will return error if the value "Clerical" is not found in the lookup set.
Based on the outcome we should link the node in the following manner.
--> If Success, Assign the value to segment.
Right click on the page and select "New Function"
In the "Function" Tab, select as below
Item Type - Standard Flexifield Workflow
Internal Name - FND_FLEX_ASSIGN_TO_SEGMENT
For the "Segment" attribute input the value of the segment for which the lookupset value needs to be assigned i,e "Services Department"
Since we are identifying segment using Name, segment value would be the internal name of the Segment.
For Value section
Select Type - Item Attribute
Value -> Lookup Set Value
![article?cmd=show&type=ATT&id=1344854.1:24](https://i-blog.csdnimg.cn/blog_migrate/d7664c9cd7248065fd1992842c6d597a.png)
--> If Error, Abort the process
Right click on the page and select "New Function"
In the "Function" Tab, select as below
Item Type - Standard Flexifield Workflow
Internal Name - FND_FLEX_ABORT_GENERATION
![article?cmd=show&type=ATT&id=1344854.1:25](https://i-blog.csdnimg.cn/blog_migrate/ca939c1444004fa6a63b5ca82df3b10e.png)
Next goto "Node" tab
Start/End - End
Result - Failure
![article?cmd=show&type=ATT&id=1344854.1:26](https://i-blog.csdnimg.cn/blog_migrate/8103dde29d26fa61ba23e7b1270fa105.png)
Once all the nodes are defined link all the nodes to complete the workflow setup
![article?cmd=show&type=ATT&id=1344854.1:27](https://i-blog.csdnimg.cn/blog_migrate/c2fb299e1be1eb4ab38d55e0a74077ac.png)
Example 3 - Customizing the workflow to use user-entered account in the invoice distributions screen.
In the invoice work bench we have an option to manually enter the supplier invoice account, to retain this account we need to customize the workflow as follows.
Set the Profile option : PA: Allow Override of PA Distributions in AP/PO to Yes
To override the account in the workflow we need to make use of the function "Comparenumber" in the workflow.
Below are the steps to customize.
Open the workflow file and goto the process that we have defined.
Right click on the page and select "New Function"
In the "Function" Tab, select as below
Item Type - Standard
Internal Name - Compare Number
![article?cmd=show&type=ATT&id=1344854.1:30](https://i-blog.csdnimg.cn/blog_migrate/1078a46536104c417688f6933cac6090.png)
Next goto "Node Attributes" tab.
For Attribute "Test Value" Input the following details.
Type - Attribute
Value - Supplier Invoice Account Ccid
![article?cmd=show&type=ATT&id=1344854.1:31](https://i-blog.csdnimg.cn/blog_migrate/3a16b491eaa59eaa7c015f34f5c29614.png)
For attribute "Reference Value" input the following details
Type - Constant
Value - 0
![article?cmd=show&type=ATT&id=1344854.1:32](https://i-blog.csdnimg.cn/blog_migrate/6c850d147ed93e2366a077bfa62350f5.png)
Since we are entering account manually in the invoice screen, the ccid will be already populated and will get assigned to "Supplier Invoice Account Ccid"
Here using the "Compare number" we are validating the following cases.
As we can see above that for Attribute "Test Value" Value is Supplier Invoice Account Ccid
And for "Reference Value" value assigned is 0.
--> If we have not entered an account manually in the invoice screen "Supplier Invoice Account Ccid" will have value as 0 assigned to it by the system,
We are comparing this value with 0.
--> If it is equal that means that users have not entered any account manually, so we will follow the normal workflow path and generate the account.
If an account has been entered manually in invoice screen "Supplier Invoice Account Ccid" will have value some value assigned to it by the system. In this case it will not be equal to zero.
Hence we follow path to just copy the values and exit.
Below are the steps.
Once the "Compare Number" is defined as per the above steps. This node should placed after the start node.
Then define another node to copy the values based on ccid. (for the case where account is entered manually)
Right click on the page and select "New Function"
In the "Function" Tab, select as below
Item Type - Standard Flexfield Workflow
Internal Name - FND_FLEX_COPY_FROM_COMB
![article?cmd=show&type=ATT&id=1344854.1:33](https://i-blog.csdnimg.cn/blog_migrate/1fc9205bedd321f7bb66d28fae04d34e.png)
Next goto "Node Attributes" tab.
For Attribute "Code Combination ID" Input the following details.
Type - Attribute
Value - Supplier Invoice Account Ccid
![article?cmd=show&type=ATT&id=1344854.1:34](https://i-blog.csdnimg.cn/blog_migrate/8dfb334217e08cf6511dcd03939e7091.png)
For Attribute "Replace existing value" Input the following details.
Type - Constant
Value - True
![article?cmd=show&type=ATT&id=1344854.1:35](https://i-blog.csdnimg.cn/blog_migrate/13441a383f61464061f2963bbe7c2a60.png)
Once done link the nodes as shown in the below screen shot.
It has two paths. 1) To generate account using the workflow customization
2) To retain the manually entered account in the invoice screen.
![article?cmd=show&type=ATT&id=1344854.1:36](https://i-blog.csdnimg.cn/blog_migrate/f3ab5e1d7e5a339fed3eeaf4dc20db28.png)
Note - Please note that all the above are sample examples and we are considering some dummy values assigned to the segments. Based on your requirement values and number of segments differ and you have to customize according to your requirement.
References
产品
|
Copyright (c) 2007, 2010, Oracle. All rights reserved. Legal Notices and Terms of Use | Privacy Statement
文章评级
|
注释
提供此文章的反馈。如有其他反馈, 请使用 '与我们联系'。 重要说明: 在由 Oracle 技术支持处理之前, 其他客户可以按匿名方式查看此反馈。 | |||||||||||||||
|
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/86584/viewspace-712939/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/86584/viewspace-712939/