Apps To Fusion

.......Our Journey from Apps To Fusion

 
  • Increase font size
  • Default font size
  • Decrease font size



Account Generation in Oracle iExpenses

E-mail
User Rating: / 0
PoorBest 

When you enter an expense claim in iExpenses, one of the key fields that you select a value for is “Expense Type field” at the time of data entry..

Expense type value will dictate whether the Expense Line is of type Project or Non-Project.

Every implementation of Oracle iExpenses requires account codes to be defaulted differently for projects based and non-projects transactions, lets see how this can be achieved.

Almost all the businesses will require Default Accounts to be generated, to assist user with data entry.
However businesses will also require a different Account Code Combination to be generated for Expense with Project Line and the Expense for non-Project Line.
Surely, this means that logic for costing/accounting is usually different for expenses and revenues against Project Accounting transactions.


How do I generate a default account using custom logic, for a non-Project line?
Do I use an account generation workflow?

For a non-project expense line, Oracle provides a PL/SQL API Hook into which you can write your custom logic to build a default GL Account Combination.
There is no need of development of Workflow in this case.
Note:- This default account can be overridden by the end user in the screen [Subject to certain OIE Profile Options].

Workflow for Project Account Generation in iExpenses


How do I generate a default account using custom logic, for a Project based line?
In this case, Oracle provides a Workflow named "Project Expense Report Account Generator"
The item key of this workflow is PAAPWEBX.
Depending upon your business requirements, you will have to customize your workflow to generate a GL Code Combination for project based expense lines.
For Project Expenses, iExpense screen actually calls PL/SQL API pa_acc_gen_wf_pkg.ap_er_generate_account which in turn calls the Workflow PAAPWEBX for account generation.
Note:- This default account can be overridden by the end user in the screen [Subject to certain OIE Profile Options].

 


But for a project based expense line, how will the Workflow get a handle to the Project/Task/Expenditure Organization etc?
When iExpenses OA Framework screen will calls workflow account generation process, the screen also initializes various WF Attribute Columns.
Your custom logic can read those attribute values and build a default account.



 

What is the API for building a custom GL Account Code Combination?
The name of PL/SQL Package is ap_web_cus_acctg_pkg
This has two main API’s
    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.

    ap_web_cus_acctg_pkg.buildaccount
        This is where you actually build the default account for non-project expense line.

 



What do I write into these pl/sql API’s, any sample Code
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.
Sample code you can use is
  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;



Comments (27)add
IExpense Issue
written by Manav , April 15, 2008
Thank you very muh for the information.However, i am struggling with different issue in I Expense.
Here's the Detail:

We have recently upgraded to OIE.K and the issue is
In OIE.K, when a delegate tries to enter an expense report for an employee following error message pops up "Approver: The specified approver is not defined as a user of the application. Please enter another approver, or select one from the list of values."

This occurs when the supervisor of an employee for whom expense report is entered either has an end dated User Record in Oracle or does not exists as an Oracle User (they are only entered as an employee).

At this point OIE, the validation occurs online and not in the WorkFlow.

So i need to bypass this validation as we are not using Oracle's seeded workflow approval process and it has nothing to do with WorkFlow

Can you please advice where exactly i have to update the code (like which .java file)

Thanks
Manav



report abuse
vote down
vote up
Votes: -1
...
written by Anil Passi , April 16, 2008
Hi Manav

This error comes from $JAVA_TOP/oracle/apps/ap/oie/server/ApproversVOImpl.java
You can extend method validateUserAccount() in this VO to overcome the error, as this is public method.
NOTE:- Such customization is not recommended though

public OAException validateUserAccount(Number number)
{
boolean flag = true;
flag = hasValidFNDUserAndWfAccount(number);
if(!flag)
return new OAException("SQLAP", "OIE_ENTRY_APPROVER_NOT_USER");
else
return null;
}


Thanks,
Anil Passi
report abuse
vote down
vote up
Votes: +0
...
written by Manav , April 16, 2008
Hi Anil,

Thank you very much for your Support,I'll try and let you know the results
I really appreciate! Thanks once again

Manav
report abuse
vote down
vote up
Votes: +0
...
written by Manav , April 16, 2008
Hi Anil

I just have one question regarding above issue as you mentioned ""you can extend method validateUserAccount() in this VO to overcome the error, as this is public method.

so should i simply change the code in this .Java file or do i need to substitute the existing file with the changed file

Actually, i don't have much experience with OA framework , whatever i have learnt is from your Tutorials only
I'd really appreciate if you can please elaborate the above solution for me

Thanks
Manav


report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , April 17, 2008
Hi manav

You will have to extend that view object and then substitute the standard by the custom.

Thanks
report abuse
vote down
vote up
Votes: -1
Question regarding Account generation in I Expenses
written by Manav , April 17, 2008
Hi Anil:

Thanks for your Help! I'll try and let you know.

I have one question regarding this Topic :Account generation in Iexpense" ,i have one Expense report and when i am importing it to AP
i run "Expense Import Report" process, it gives Exception for this expense report" Invalid Expense Account"

i have checked code combination for my expense lines and start date and end date and everything is fine
i checked default expense account for the user for whom the report is created , it's fine too

i ran this query to check code combinations:
selectcode_combination_id, account_type, end_date_active, start_date_active, enabled_flag
fromapps.gl_code_combinations
wherecode_combination_id in (select distinct code_combination_id
fromapps.AP_EXP_REPORT_DISTS_ALL
where report_header_id = '157535')

Unable to figure out, from where the error is coming

Please advice !

Thanks
Manav
report abuse
vote down
vote up
Votes: -1
...
written by Anil Passi , April 18, 2008
Hi Manav

There are various possible causes for this, i.e. Account is disabled, cross validation rules failure, value set security etc.
Please enable fnd logging for ap% and fnd% and then debug using fnd_log_messages.

Cheers
Anil
report abuse
vote down
vote up
Votes: +0
...
written by Manav , April 20, 2008
Hi Anil,

I am not able to find the right cause . As you mentioned :
For Project Expenses, iExpense screen actually calls PL/SQL API pa_acc_gen_wf_pkg.ap_er_generate_account which in turn calls the Workflow PAAPWEBX for account generation.
so ,once accounts are generated then where exactly it stores. i mean how can i find what account string generated for all expense line for my expense report
is there any query , please advice

Thanks
Manav

report abuse
vote down
vote up
Votes: +0
Running account generator in debug mode
written by Anil Passi- , April 20, 2008
Hi Manav

Account generator workflows are always run in Forced Sync mode, which means they are executed in the memory.
Hence there is no audit trail in wf_ tables

If you wish to debug account generation workflow itself, then set profile "Account Generator:Run in Debug Mode" to Yes.
Also, keep the fnd logging enabled for the user session that initates the WF.
These both combined will give you insight into debugging.

Thanks,
Anil Passi


report abuse
vote down
vote up
Votes: +0
...
written by Manav , April 25, 2008
Hi Anil

Thanks for all your Support ! I have one more issue .

We are currently using Remittance Advice to email notifications to vendors regarding paid invoices. The email notification goes out to a single recipient (only one email add***s is entered).However, for one of our vendor, they received same notification 540 times

Please advice how to fix this issue

Thanks
report abuse
vote down
vote up
Votes: +0
iExpenses WorkFlow Issue
written by Subodh , May 15, 2008
Hi
Anil

I need to know How does WorkFlows get triggered ? For Example I need to know How does the 'AP_STANDARD_EXPENSE_REPORT_PROCESS' in Expenses workflow get triggered ,I need the Java code.How can I setup a WorkFlow to trigger for a particular event.In case of iExpenses I think it triggers when we press submitt button ,I need the exact code.

Please help me .

Thanks,
Subodh
report abuse
vote down
vote up
Votes: +0
...
written by Manav , May 16, 2008
HI Anil

This is related to Iexpense Error which which i was getting. As mentioned by you to change the code and then substitute the class file.
i have made the changes as u said but i am unable to test it as i have to first deploy it to some directory first . Can you please guide what next steps should i follow
report abuse
vote down
vote up
Votes: +1
...
written by Shilpesh , May 21, 2008
Hi Anil,
I have customized account generator for iexpense (project based) workflow to generate a CCId. Our client has dynamic insertdisabled so I need to generate an error if the generated segments results in to null CCID. How do I handle (code) this situation so that user gets a custom error if the ccid is null?

Thanks for your response.
report abuse
vote down
vote up
Votes: +0
...
written by ag , May 26, 2008
Hi Anil,

Your site is a really good source of information.
Do you have any experience on FA Account generator and Custom package modification that you could share?

See, we have a requirements to modify the accounts during asset disposal / retirements. Seems like workflow could not handle this account generation and we need to modify the custom package.

We would to share our experience and all pains and gains for any workflow customization, especially in the area of FA and PA. But right now, we just can't seem to get this working. Do you have any ideas?

Requirements: When we perform FA Retirements, system will create this entry:

Standard entries:
Dr. Accumulated Depreciation
Cr. Asset Cost

What we need in our customization:
Dr. Retirement Account - Cost
Cr. Retirement Account - Accumulated Depreciation


report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi- , May 26, 2008
Hi Ag

I haven't worked on FA Account Gen workflow in specific, and hence I am unabe to advice on this specific issue. Having said so, other account gen workflows I have worked upon, it has always been possible to achieve varying set of logics via workflow, as you should be able to override any account segment/combination generated.

Thanks,
Anil
report abuse
vote down
vote up
Votes: +0
...
written by Manav , June 04, 2008
Hi Anil:

Thank you very much! i was able to bypass that validation error as instructed by you.

I have now one more question. I have developed an JSP page and i want to incorporate that into std. OA framework
Could you please provide me the steps or give any idea. Any info. will be very helpful as it's urgent for me

Thanks
Manav
report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , June 05, 2008
Hi Manav

Simply google on
embed page in oa framework

The above is valid for embedding OA Fwk region into another page.
For jsp, I doubt if it is possible, but you can try using URL Include in Persoanlization.
Usually URL include will embed custom html pages into OAF

Thanks
Anil Passi
report abuse
vote down
vote up
Votes: +1
...
written by Jyotsna , December 08, 2008
Hi Anil,

We have a requirement to generate a new CCID for an Project Related Expense report, when the Division and Cost Center are updated in Account Allocations tabe of Expense Allocations Page.
For a Project Related Expense Report line, the Divison and Costs center fields are disabled in OIE K patch . But we have 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.

Could you please suggest me any method for this.

And I have one more question...

Could you please tell me any link for the PAAPWEBX and APEXP workflow. For the project related, the item key generated
is different for both of these. Any mapping between the workflow attributes of theses Workflows.

Your suggestions are valuable for us to proceed further on this.
report abuse
vote down
vote up
Votes: +0
How to show charge accounts in the expense report itself?
written by appsprakash , March 10, 2010
Hi Manav..may be my question is not exactly related to the above discussion.
The issue I'm having is, users want to "see" the expense accounts (Code combinations) after they submit the expense report.
Can this be possible via personalization or any other way?
report abuse
vote down
vote up
Votes: +0
i expenses
written by mohanguru , April 20, 2010
hi

we have a requirement from the client which is as below :

There is no interface to Inventory or Purchase order module from Iexpense. So user should process double entries to account purchased goods:
- Enter info about purchased goods in iExpense
- Create Purchase order or inventory transaction to increase inventory
User is not able to define Supplier and inventory items in expense report as well;

and what is "organization liability" in i expnese report.

can you throw some light on the above points.

regards
mohan


report abuse
vote down
vote up
Votes: +0
Requirement of cost centre to be grayed out in i exp
written by PravinP , April 20, 2010
Hi,

My client needs that cost centre to be grayed out when employee will raise an expense report. Please advise how i can achieve this.

Thanks,
Pravin
report abuse
vote down
vote up
Votes: +0
java error when creating expense report in iexpense
written by Arun Minnasandran , November 09, 2010
Hi
I am getting the below error when I try to create an expense report in iexpense. any ideas how I can fix this. metalink does not have any information that helps me.
java.lang.IllegalArgumentException: peerExceptions list should only contain OAException elements

Thanks
Arun
report abuse
vote down
vote up
Votes: +0
java.lang.IllegalArgumentException: peerExceptions list should only contain OAException elements.
written by Shashank Senan , December 21, 2010
Hi,

I am getting the same error as Arun while creating an expense report. Cannot go beyond the first step while creating the expense report. Can any one help?

Thanks,
Shashank.

report abuse
vote down
vote up
Votes: +1
java.lang.IllegalArgumentException: peerExceptions list should only contain OAException elements
written by NitinT , January 07, 2011
Hello

I am getting the same error on mt 12.1.3 EBS system while creating an expense I have gone thru all metalink notes on this tpic and all setu mentioned in these notes seem to be OK

Please help!!!!!

Nitin
report abuse
vote down
vote up
Votes: +0
Functional Consultant
written by Wissam , May 05, 2011
Try the solution below:

- Navigate to Global HRMS Manager
- Query the Employee you are using
- Click on Assignment button
- Purchase Order Informatin Tab
- Assign a Ledger and a Default Expense Account
- Save your work

Regards,
Wissam
report abuse
vote down
vote up
Votes: +0
Tested on 12.1.3 - java.lang.IllegalArgumentException: peerExceptions list should only contain OAException elements
written by Wissam , May 05, 2011
Try the solution below:

- Navigate to Global HRMS Manager
- Query the Employee you are using
- Click on Assignment button
- Purchase Order Informatin Tab
- Assign a Ledger and a Default Expense Account
- Save your work.

Thank you,
Wissam
report abuse
vote down
vote up
Votes: +1
AHMED LOTFY
written by WELL DONE , November 29, 2011
WELL DONE WISSAM smilies/wink.gif
report abuse
vote down
vote up
Votes: +0
Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security image
Write the displayed characters


busy