Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

Contact Us

Oracle Workflows - All Articles
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new Click here to raise Support Ticket. Get reply within 48 hours.

Search Courses

User Rating: 4 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Inactive
 

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;




Anil Passi

Comments   

0 #1 krishna.roshan 2008-04-15 18:39
Thank you very muh for the information.How ever, 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
Quote
0 #2 Anil Passi 2008-04-16 13:14
Hi Manav

This error comes from $JAVA_TOP/oracl e/apps/ap/oie/s erver/Approvers VOImpl.java
You can extend method validateUserAcc ount() in this VO to overcome the error, as this is public method.
NOTE:- Such customization is not recommended though

public OAException validateUserAcc ount(Number number)
{
boolean flag = true;
flag = hasValidFNDUser AndWfAccount(nu mber);
if(!flag)
return new OAException("SQ LAP", "OIE_ENTRY_APPR OVER_NOT_USER") ;
else
return null;
}


Thanks,
Ani l Passi
Quote
0 #3 krishna.roshan 2008-04-16 21:27
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
Quote
0 #4 krishna.roshan 2008-04-16 22:27
Hi Anil

I just have one question regarding above issue as you mentioned ""you can extend method validateUserAcc ount() 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
Quote
0 #5 Anil Passi 2008-04-17 01:10
Hi manav

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

Thanks
Quote
0 #6 krishna.roshan 2008-04-17 17:06
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:
s electcode_combi nation_id, account_type, end_date_active , start_date_acti ve, enabled_flag
fr omapps.gl_code_ combinations
wh erecode_combina tion_id in (select distinct code_combinatio n_id
fromapps.A P_EXP_REPORT_DI STS_ALL
where report_header_i d = '157535')

Unab le to figure out, from where the error is coming

Please advice !

Thanks
Manav
Quote
0 #7 Anil Passi 2008-04-18 06:05
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_message s.

Cheers
Anil
Quote
0 #8 krishna.roshan 2008-04-20 16:59
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_p kg.ap_er_genera te_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
Quote
0 #9 Anil Passi- 2008-04-20 17:33
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.

Tha nks,
Anil Passi
Quote
0 #10 krishna.roshan 2008-04-25 13:42
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 address is entered).Howeve r, for one of our vendor, they received same notification 540 times

Please advice how to fix this issue

Thanks
Quote
0 #11 Saquib Azmal 2008-05-15 05:43
Hi
Anil

I need to know How does WorkFlows get triggered ? For Example I need to know How does the 'AP_STANDARD_EX PENSE_REPORT_PR OCESS' 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
Quote
0 #12 krishna.roshan 2008-05-16 11:31
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
Quote
0 #13 Shilpesh 2008-05-21 23:40
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.
Quote
0 #14 ag 2008-05-26 01:20
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?

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

Standar d entries:
Dr. Accumulated Depreciation
Cr . Asset Cost

What we need in our customization:
Dr. Retirement Account - Cost
Cr. Retirement Account - Accumulated Depreciation
Quote
0 #15 Anil Passi- 2008-05-26 03:41
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/combina tion generated.

Tha nks,
Anil
Quote
0 #16 krishna.roshan 2008-06-04 21:11
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
Quote
0 #17 Anil Passi 2008-06-05 02:34
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
Ani l Passi
Quote
0 #18 Jyotsna 2008-12-08 08:29
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...

Co uld 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.

You r suggestions are valuable for us to proceed further on this.
Quote
0 #19 appsprakash 2010-03-10 14:05
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?
Quote
0 #20 mohanguru 2010-04-20 00:14
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.

regard s
mohan
Quote
0 #21 PravinP 2010-04-20 09:01
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
Quote
0 #22 Arun Minnasandran 2010-11-09 16:06
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.Ille galArgumentExce ption: peerExceptions list should only contain OAException elements

Thank s
Arun
Quote
0 #23 Shashank Senan 2010-12-21 10:31
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.
Quote
0 #24 NitinT 2011-01-07 06:27
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!!!!!

Niti n
Quote
0 #25 Wissam 2011-05-05 09:25
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
Quote
0 #26 Wissam 2011-05-05 09:28
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
Quote
0 #27 WELL DONE 2011-11-29 08:43
WELL DONE WISSAM ;)
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Jun 2021  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
   1  2  3  4  5  6
  7  8  910111213
14151617181920
21222324252627
282930    

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner