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.
written by Praveen , April 21, 2008
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.
Please let me know How to Debug standard API's.
Below is the Code Which I have used:
DECLARE
v_user_id NUMBER := &1;
v_responsibility_id NUMBER := &2;
v_application_id NUMBER := &3;
v_concat_segs VARCHAR2(100) := '&4';
v_keyval_status BOOLEAN;
l_coa_id NUMBER;
BEGIN
APPS.FND_GLOBAL.APPS_INITIALIZE(v_user_id, v_responsibility_id, v_application_id);
fnd_profile.put('AFLOG_ENABLED', 'Y');
fnd_profile.put('AFLOG_MODULE', '%');
fnd_profile.put('AFLOG_LEVEL','1');
fnd_log_repository.init;
begin
select chart_of_accounts_id
into l_coa_id
from gl_sets_of_books
where set_of_books_id = fnd_profile.value('GL_SET_OF_BKS_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_COMBINATION',
'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_id,v_responsibility_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;
written by Praveen , April 22, 2008
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 This e-mail address is being protected from spambots. You need JavaScript enabled to view it '> This e-mail address is being protected from spambots. You need JavaScript enabled to view it
Regards,
Praveen
written by kishor nagbhire , December 09, 2008
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
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , September 28, 2009
Cheers
| < Prev |
|---|





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