Hi,
I am going to explain you about the customization of Account Generation Processes/Account generator workflows in various modules in Oracle Applications.
For all modules the basic profile option to run account generator workflow is "Account Generator:Run in Debug Mode". So Set the profile "Account Generator:Run in Debug Mode" to "Yes"
For all modules the basic profile option to run account generator workflow is "Account Generator:Run in Debug Mode". So Set the profile "Account Generator:Run in Debug Mode" to "Yes"
Account Payables:
Workflow Name: Project Supplier Invoice Account Generation Process
Internal Name: PAAPINVW
If the new invoice is created in the AP module (Oracle Payables à Invoice à Entry à Invoices) with the Project details. OR Invoice has interfaced from the other module like i-expense with Project details, we should definitely customize the ‘Project Supplier Invoice Account Generation Process (PAAPINVW.wft)’ workflow to create account in distributions.
What will happen if the workflow is not customized?
You will get the error saying “APP-SQLAP-97734: The system can not generate distribution lines…..”. Please find the screen shot of the error below.
Error comes whenever you click on distributions button.
Solution:
Need to customize the workflow PAAPINVW, create a custom process where in remove all dummy default account generator functions and create/assign your accounting structure using custom functions OR we can use standard functions as well.
Find the below image for the Original Process “Generate default account (DEFAULT_ACCOUNT_GENERATION)”
Steps to customize the workflow:
- Copy the process and create another as it is
- Remove all Dummy default account generator functions
- Say if you have the accounting structure i.e code combination with 5 segments.
You need to assign values 5 times i.e you need to create 5 functions to assign each value.
- You can directly assign each value using “Assign Value to Segment” function in the “Standard Flexfield Workflow (FNDFFWK)”. You usually get the Standard Flexfield Workflow () along with “Standard (WFSTD)” workflow whenever you open the PAAPINVW workflow.
- Assign values in Node attributes of the function “Assign Value to Segement”
- OR if you have a lookup to get the values of segments, then use the function “Segment Lookup Set value” to get the lookup values and then assign the value to segment. Use Node attributes here as well.
- Use the standard function “Validate Code Combination” after assigning all segment values
- Look at the screenshot below for the better understanding
How to set values in ‘Node Attributes’
Double click on each function OR right click – Properties
Click on Node attributes tab and assign the values. If you are going to get values from lookups get lookup name and the source (Expenditure Operating Unit) is the source in the screen shot. Use this lookup value while assigning the value.
Where Expenditure Operating Unit is the standard item attribute, we can use values of standard item attributes to link in lookup value sets.
Node Attributes:
Lookup:
*** You can create your custom activities depends upon the customization
After customizing the workflow assign the custom process in accounting flexfiled processes.
1. Go to General ledger responsibility à Ctrl+L à Account Generation Processes à Find your custom accounting flexfiled structure
Change the Process name to your custom process where the item type is ‘Project Supplier Invoice Account Generation’
2. Set the profile option “PA: Allow Override of PA Distributions in AP/PO” to ‘No’.
To override using the custom account generation process which we have created
Even after all customizations if you still gets the token error, please refer the following notes in Oracle Metalink for support.
R12: APXINWKB: APP-SQLAP-97734 Error Message Displayed At Invoice Distributions Generation Time: Distributions Cannot Be Generated For Line Because &TOKEN2 (Doc ID 850743.1)
Projects Supplier Invoice Account Generation Error: APP-SQLAP-97734: The System Cannot Generate Distributions (Doc ID 823787.1)
R12: APXINWKB: APP-SQLAP-97734 WHEN ENTERING INVOICE DISTRIBUTION (Doc ID 1360580.1)
Projects Supplier Invoice Account Generation Error: APP-SQLAP-97734: The System Cannot Generate Distributions (Doc ID 823787.1)
R12: APXINWKB: APP-SQLAP-97734 WHEN ENTERING INVOICE DISTRIBUTION (Doc ID 1360580.1)
i-Expenses:
Workflow Name: Project Expense Report Account Generator
Internal Name: PAAPWEBX
Follow the same steps as above for customizing the workflow. Change the process in the accounting flexfiled structure in GL.
This workflow is going to fire/trigger whenever the user select the project while raising the expense in i-expenses module. After click on next the workflow triggers and creates the new/custom code combination before submitting the expense report.
Note: After submitting the expense report ‘Expenses (APEXP)’ workflow is going to trigger.
Project, Expenditure Orgainzation and task are going to enable in JSP page whenever we set the OIE profile options.
Ex: OIE:Enable Project Allocations
OIE:Enable Project Expenditure Organization
Note: A profile option OIE: Enable Project Allocations if set to "Yes with account allocations", then the Division and Cost center are enabled in Account Allocations tab of Expense Allocations Page of iExpenses. But with this if we update the Division this is not getting updated in the Expense report tables.
How to Build Accouting structure or Code combination id for Non-Project Expense Reports ?
If the user is not selected the project while raising the expense report, this workflow will not launch/trigger.
Then how will the accounting structure/code combination creates in non project expense reports? With our triggering the accounting generator workflow?
This is different concept altogether. In non project expense reports the accounting structure/code combination is going to build using the standard package (AP_WEB_CUS_ACCTG_PKG) with our customizations.
This package has two main procedure for this customization. Those are
ap_web_cus_acctg_pkg.getiscustombuildonly
If this function returns 1, then your custom code in PL/SQL ap_web_cus_acctg_pkgbuildaccount will be called.
If this function returns 1, then your custom code in PL/SQL ap_web_cus_acctg_pkgbuildaccount will be called.
ap_web_cus_acctg_pkg.buildaccount
This is where you actually build the default account for non-project expense line.
This is where you actually build the default account for non-project expense line.
getiscustombuildonly API this must return 1 if you want your custom logic to kick-off.
If this API does not return 1, then iExpenses will use the person level default accounts from HRMS.
If this API does not return 1, then iExpenses will use the person level default accounts from HRMS.
Sample code you can use is (from apps2fusion). You can find the real time code below.
FUNCTION buildaccount(p_report_header_id IN NUMBER
,p_report_line_id IN NUMBER
,p_employee_id IN NUMBER
,p_cost_center IN VARCHAR2
,p_exp_type_parameter_id IN NUMBER
,p_segments IN ap_oie_kff_segments_t
,p_ccid IN NUMBER
,p_build_mode IN VARCHAR2
,p_new_segments OUT NOCOPY ap_oie_kff_segments_t
,p_new_ccid OUT NOCOPY NUMBER
,p_return_error_message OUT NOCOPY VARCHAR2)
RETURN BOOLEAN IS
l_account_array fnd_flex_ext.segmentarray;
BEGIN
p_new_ccid := 240694; --do not hard code in realiy, this is just sample
l_account_array(1) := 'FOCUST';
l_account_array(2) := 'CONSULTANCY';
l_account_array(3) := 'R12';
l_account_array(4) := '165122';
l_account_array(5) := '0';
l_account_array(6) := '0';
l_account_array(7) := '0';
p_new_segments := ap_oie_kff_segments_t('');
p_new_segments.EXTEND(l_account_array.COUNT);
FOR n_ctr IN 1 .. l_account_array.COUNT LOOP
p_new_segments(n_ctr) := l_account_array(n_ctr);
END LOOP;
RETURN TRUE;
END buildaccount;
,p_report_line_id IN NUMBER
,p_employee_id IN NUMBER
,p_cost_center IN VARCHAR2
,p_exp_type_parameter_id IN NUMBER
,p_segments IN ap_oie_kff_segments_t
,p_ccid IN NUMBER
,p_build_mode IN VARCHAR2
,p_new_segments OUT NOCOPY ap_oie_kff_segments_t
,p_new_ccid OUT NOCOPY NUMBER
,p_return_error_message OUT NOCOPY VARCHAR2)
RETURN BOOLEAN IS
l_account_array fnd_flex_ext.segmentarray;
BEGIN
p_new_ccid := 240694; --do not hard code in realiy, this is just sample
l_account_array(1) := 'FOCUST';
l_account_array(2) := 'CONSULTANCY';
l_account_array(3) := 'R12';
l_account_array(4) := '165122';
l_account_array(5) := '0';
l_account_array(6) := '0';
l_account_array(7) := '0';
p_new_segments := ap_oie_kff_segments_t('');
p_new_segments.EXTEND(l_account_array.COUNT);
FOR n_ctr IN 1 .. l_account_array.COUNT LOOP
p_new_segments(n_ctr) := l_account_array(n_ctr);
END LOOP;
RETURN TRUE;
END buildaccount;
No comments:
Post a Comment
Please review my topic and update your comments
Note: only a member of this blog may post a comment.