Beruflich Dokumente
Kultur Dokumente
In this Document
Goal
Solution
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 the account entered manually in the Invoice
Workbench distributions screen.
References
APPLIES TO:
GOAL
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"
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.
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 1/23
11/14/2014 Document 1344854.1
The workflow file related to Project Supplier Invoice Account Generator which we need to customize is: PAAPINVW.wft
Before we start customizing the workflow we should know the number of segments to use in the workflow file. To
determine number of segments go to the applications.
Select the Accounting Structure that you are using and click on Segments
Example 1 - Customizing the workflow with all the constant segment Values.
Right Click on Processes Node and select "New Process" and input the following details
Internal Name
Display Name
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 2/23
11/14/2014 Document 1344854.1
Click Ok.
Open the process that you have defined. It will open a blank page
Right click on the page and select "New Function". In the "Function" Tab, select following details
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 3/23
11/14/2014 Document 1344854.1
Next go to the "Node" tab. For Start/End - select "Start" since this is the start node.
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 4/23
11/14/2014 Document 1344854.1
4. Next define other nodes and assign values to the segments. In this example we have 4 segments to which we must
assign values.
Services Company
Services Department
Services Account
Services Product
To assign values to the above segments, right click on the page and select "New Function"
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 5/23
11/14/2014 Document 1344854.1
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 the value if no value is currently assigned to the segment
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 6/23
11/14/2014 Document 1344854.1
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 the value if no value
is currently assigned to the segment
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 7/23
11/14/2014 Document 1344854.1
Services Department
Services Account
Services Product
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 8/23
11/14/2014 Document 1344854.1
6. Once values are assigned to the segments, add the activity "Validate Code Combination"
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 9/23
11/14/2014 Document 1344854.1
Validation Type: Set to "Generate Code Combination ID" to do full validation and return the CCID, set to
"Validate Segments with Values only" to validate the individual segment values that have values assigned
New code combinations are allowed: Set to "True" if you have dynamic inserts enabled for your accounting
flexfield and wish for new combinations to be created. Set to "False" otherwise.
Note: Even if new combinations are allowed, this node does not insert the combination into
GL_CODE_COMBINATIONS or create the new CCID. Rather it validates the combination and returns -1 as the
CCID to the calling module if the combination is otherwise valid.
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 10/23
11/14/2014 Document 1344854.1
Right click on the page and select "New Function". In the "Function" tab, select the values below:
Go to the "Node" tab. For "Start/End" select "End" since this is the end node.
For "Result" select "Success".
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 11/23
11/14/2014 Document 1344854.1
8. Link all the nodes we have created to derive the process flow
9. Once the Customization is complete, we need load the workflow file to the data base.
This can be done directly in workflow builder by saving the workflow to the database, or you can save the workflow to
a file and use the below command to load the workflow file to the database.
10. Assign our account generator process to the appropriate account generation function in the application.
In Projects: Setup > Flexfields > Key > Accounts, search using the following
Select appropriate account generator i.e., "Project Supplier Invoice Account Generator", and assign the new custom
process that you defined.
11. Now when we create a project related supplier invoice the process will create a supplier charge account using the
workflow customization we have created and assigned.
Example 2 - Customizing the workflow with one segment value derived from Lookup Set and rest are
constant values.
In the above example all values assigned to the segments were constant values. In this example, we will show how
we can also get the values for the segments from lookup sets defined in Projects.
In this example, we will show how the value for segment2 ("Services Department") can be dervied from a lookup set,
with the other values remaining the same.
Define a lookup set, providing the lookup set name and optionally a description.
Define at least one intermediate value and segment value. These values will map application related information to an
accounting segment value
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 13/23
11/14/2014 Document 1344854.1
2. Create a new node which uses the lookup set to determine the segment value
Open the Workflow and goto the process that we have defined. Right click on the page and select "New Function"
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 14/23
11/14/2014 Document 1344854.1
Go to the "Node Attributes" tab and input "Lookup Set Name". Here input the lookup set which is defined in the
previous step (or any well defined lookup set).
The intermediate value you select depends on your business requirement and the way lookup set is defined. This will
be the value you are using to map to the segment values. For example, if we need to get the segment values based
on Expenditure type we would use the following:
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 15/23
11/14/2014 Document 1344854.1
When the workflow is called, the expenditure type attribute for the current transaction will be compared against the
assigned lookup set, and if a corresponding intermediate value is found there, it will return the mapped segment value.
In our example, if the invoice distribution being processed has an assigned expenditure type of "Clerical", then the
corresponding segment value "02" will be returned.
If the intermediate value (in this case expenditure type) is not found in the lookup set, the process will return an error.
3. Create branches to handle the return values based on success or failure results
If the value has been found, we will create a node to assign the value to segment.
Right click on the page and select "New Function". In the "Function" Tab, select the values below
For the "Segment" attribute input the value of the segment for which the lookupset value needs to be assigned. Since
we are using the segment name to identify our segments this would be "Services Department".
For the "Value" section the type would be "Item Attribute" and the value would be "Lookup Set Value"
Note: The "Assign Value to Segment" node should immediately follow the "Segment Lookup Set value" node in the
flow, or at least should occur prior to any subsequent "Segment Lookup Set value" nodes.
When the value is not found or there is an error we should abort the process.
Right click on the page and select "New Function" and in the "Function" Tab, select the values below
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 16/23
11/14/2014 Document 1344854.1
Start/End: End
Result: Failure
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 17/23
11/14/2014 Document 1344854.1
Once all the nodes are defined link all the nodes to complete the workflow setup
Example 3 - Customizing the workflow to use the account entered manually in the Invoice Workbench
distributions screen.
In the Invoice Workbench we have an option to manually enter the supplier invoice account, to retain this account we
need to customize the workflow as follows.
Note: On 11i, you may need to apply periodic patch 5847631 in order for this example to work correctly
1. Set the value of the profile option "PA: Allow Override of PA Distributions in AP/PO" to "Yes".
2. Create a branching node which will use the function "Comparenumber" to determine the appropriate branch of the
workflow based on the existence of a passed in code combination id (CCID). This node should be placed after the
"Start" node of the process.
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 the values below
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 18/23
11/14/2014 Document 1344854.1
Type: Attribute
Value: Supplier Invoice Account Ccid
Type: Constant
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 19/23
11/14/2014 Document 1344854.1
Value: 0
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" when the workflow is called.
Here by using the "Compare number" we are validating whether or not an account has already been entered.
Because the "Test Value" is "Supplier Invoice Account Ccid" and the "Reference Value" is 0 the comparison will be a
match when the "Supplier Invoice Account Ccid" value is 0. This will be the value if no CCID has been passed in,
meaning that no account was entered manually.
In this case we need to follow a path that will generate a valid account.
If, on the other hand, the value of "Supplier Invoice Account Ccid" is not 0, this implies that an account has been
entered manually in invoice screen. In this case we will branch to a path that will accept the values from the passed in
CCID and exit.
3. Define a node to copy the passed in CCID when this is available from manual entry of the account.
Right click on the page and select "New Function" and in the "Function" tab, select the values below
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 20/23
11/14/2014 Document 1344854.1
Go to the "Node Attributes" tab and for attribute "Code Combination ID" input the following details:
Type: Attribute
Value: Supplier Invoice Account Ccid
Type: Constant
Value: True
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 21/23
11/14/2014 Document 1344854.1
Link the nodes as shown in the below screen shot below which has 2 paths:
1. To generate account using the standard workflow customization logic when no account combination is passed in
2. To retain the account entered manually in the invoice screen when this is passed in
Note - Please note that all the above are merely examples using dummy values assigned to the segments. Based
on your business requirements the values you use and number of segments will obviously differ. Your actual
customizations will have to be created in accordance with your requirements.
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 22/23
11/14/2014 Document 1344854.1
REFERENCES
NOTE:360757.1 - Overriding Project Supplier Invoice Account Generation Workflow CCID With User Entered Account
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11fkrbjbuc_1109&id=1344854.1 23/23