Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

Arun Sista
  • 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

Search Courses

In some rare circumstances, for example, if you are debugging an issue, you may need to manually initialize the PL/SQL layer logging for the current session. From the SQL*Prompt, you could do this by calling:

FND_GLOBAL.APPS_INITIALIZE(fnd_user_id, fnd_resp_id, fnd_appl_id);
fnd_profile.put('AFLOG_ENABLED', 'Y');
fnd_profile.put('AFLOG_MODULE', '%');
fnd_profile.put('AFLOG_LEVEL','1');
fnd_log_repository.init;


Profile Option Name User Specified Name Sample Value
AFLOG_ENABLED FND: Debug Log Enabled "Y"
AFLOG_MODULE FND: Debug Log Module "%"
AFLOG_LEVEL FND: Debug Log Level "ERROR"
-- Use the following values:
-- 1 - STATEMENT
-- 2 - PROCEDURE
-- 3 - EVENT
-- 4 - EXCEPTION
-- 5 - ERROR
-- 6 - UNEXPECTED

If you want to enable the FND Logging for a given procedure or function. Do the following:

 

1. Set the user profile options for FND:Debug Log enabled to "N". This ensures that apps itself would not do any sort of logging.

2. Go ahead and put the code above in the procedure that you want to log(ideally at the beginning of the procedure).

3. After the procedure call the same code while setting the profile option AFLOG_ENABLED to "N".

 

This way you can get specific log for just one procedure and saves you the effort of going through tons of log messages.


Arun Sista

Comments   

0 #1 Vaishnavi 2008-04-18 15:15
Hi Arun,

Thanks For the Info.

Can you Please Give me sample Example as soon as Possible as I am trying to Debug a Standard GL API. And unable to do that.

Do we need to use FND_LOG.string in the code.

Regards,
Praveen
Quote
0 #2 Arun Sista 2008-04-20 11:28
Hi Praveen,

Can you please tell me what you have done so far?

Thanks,
A run.
Quote
0 #3 Vaishnavi 2008-04-21 15:10
Hi Arun,

Thanks for the response.

I am Trying to Dynamically Create a Code Combination. Some of the Combinations were getting Created and some not. So wanted to use
Debugging So that it will be easier at what point of code the Process is failing to create combination.

P lease let me know How to Debug standard API's.

Below is the Code Which I have used:

DECLARE
v_user_id NUMBER := &1;
v_responsibilit y_id NUMBER := &2;
v_application_i d NUMBER := &3;
v_concat_segs VARCHAR2(100) := '&4';
v_keyval_status BOOLEAN;
l_coa_id NUMBER;
BEGIN
APPS.FND_GLOBAL .APPS_INITIALIZ E(v_user_id, v_responsibilit y_id, v_application_i d);
fnd_profile.put ('AFLOG_ENABLED ', 'Y');
fnd_profile.put ('AFLOG_MODULE' , '%');
fnd_profile.put ('AFLOG_LEVEL', '1');
fnd_log_reposit ory.init;

begin
select chart_of_accoun ts_id
into l_coa_id
from gl_sets_of_book s
where set_of_books_id = fnd_profile.val ue('GL_SET_OF_B KS_ID');
exception
when OTHERS then
DBMS_OUTPUT.PUT _LINE('Error: Chart of Accounts ID not found' || SUBSTR(SQLERRM, 1,200));
end;

BEGIN
v_keyval_status := fnd_flex_keyval .validate_segs(
'CREATE_COMBINA TION',
'SQLGL',
'GL#',
l_coa_id,
v_concat_segs, -- Concatenated Segment which has to be created
'V',
sysdate,
'ALL', NULL, NULL, NULL, NULL,
FALSE,FALSE,v_application_i d,v_responsibilit y_id,v_user_id,
NULL,NULL,NULL) ;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT _LINE('Error: Unable to Create Code Combination: ' || SUBSTR(SQLERRM, 1,200));
END;

EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT _LINE('Main Error: ' || SUBSTR(SQLERRM, 1,200));
END;
Quote
0 #4 Arun Sista 2008-04-21 16:03
Ha... i'm not sure if there is a shortcut to it. However what you can try is :

Take the value of selct max(log_sequenc e) from fnd_log_message s

before running ur code. Make a not of this value call it val1.

Then run your code.

And again take the value of selct max(log_sequenc e) from fnd_log_message s
after running ur code.

Call this val2.

Now select * from fnd_log_message s where log_sequence between val1 and val2.

If this gives u a hint (provided there is logging in the flexfield api's) you'd figure out.

Or else you might need to take a trace and try to debug using that.

Hope this helps.

Arun.
Quote
0 #5 Vaishnavi 2008-04-22 14:08
There is a logging in API. But none got inserted into fnd_log_message s.

Can you Please let me know if I need to set any more Profile options.

If you have any sample Code Can you please send it to

Regards,
Prav een
Quote
+1 #6 kishor nagbhire 2008-12-09 06:22
hi SHIVA
i'm a new user of ur site
can u help me on that topic
i want record in GL

'''''' undefined accounting periods in the current accounting calendar '''''''''''

help me
thanks
Quote
0 #7 Arun@oraclehrms.co.uk 2009-09-28 18:53
how about tkprof to debug API's... I'm not sure, but it works fine with HRMS APIs

Cheers
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  May 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
    1  2  3  4  5
  6  7  8  9101112
13141516171819
20212223242526
2728293031  

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner