How to get Concurrent Program Out file and Log file from Database ?
Today we will guide you how to get concurrent program log files and output files from database. As you aware whenever you submit concurrent program , after successful completion of it, Two files will be generated which are nothing but LOG files and OUTPUT files. We can get those files by calling function FND_WEBFILE.GET_URL
This function will return output value which is nothing but the Link for the Log file or Output File , So only thing we need to do is to just paste the link in browser to view Log File or Output file. During this activity you don't need to be login on to the Oracle Application Window
Below code will help you out in Generating Log file , Pass request id as input parameter
/*-----------------------------------------------------------
Code for Log File Generation
http://oracleerplearning.blogspot.in/
Author : Pranay Tiwari
----------------------------------------------------------*/
SET SERVEROUTPUT ON
DECLARE
l_request_id NUMBER := :P_REQ_ID; -- The request id
l_two_task VARCHAR2 (256);
l_gwyuid VARCHAR2 (256);
l_url VARCHAR2 (1024);
BEGIN
-- Get the value of the profile option named, Gateway User ID (GWYUID)
--- l_gwyuid := fnd_profile.VALUE ('APPLSYSPUB/PUB');
SELECT profile_option_value
INTO l_gwyuid
FROM fnd_profile_options o, fnd_profile_option_values ov
WHERE profile_option_name = 'GWYUID'
AND o.application_id = ov.application_id
AND o.profile_option_id = ov.profile_option_id;
-- Get the value of the profile option named, Two Task(TWO_TASK)
SELECT profile_option_value
INTO l_two_task
FROM fnd_profile_options o, fnd_profile_option_values ov
WHERE profile_option_name = 'TWO_TASK'
AND o.application_id = ov.application_id
AND o.profile_option_id = ov.profile_option_id;
l_url :=
fnd_webfile.get_url (file_type => fnd_webfile.request_log, -- for log file. Use request_out to view output file
ID => l_request_id,
gwyuid => l_gwyuid,
two_task => l_two_task,
expire_time => 500-- minutes, security!.
);
DBMS_OUTPUT.put_line (l_url);
END;
Output will be one link , Just paste the output in Browser and you will be able to view Log file output.
----------------------------------------------------------------------------------------------------------------------
Below code will help you out in Generating Out file for the specific Concurrent request , Pass request id as input parameter
/*-----------------------------------------------------------
Code for Output File Generation
http://oracleerplearning.blogspot.in/
Author : Pranay Tiwari
----------------------------------------------------------*/
SET SERVEROUTPUT ON
DECLARE
l_request_id NUMBER := :P_REQ_ID; -- The request id
l_two_task VARCHAR2 (256);
l_gwyuid VARCHAR2 (256);
l_url VARCHAR2 (1024);
BEGIN
-- Get the value of the profile option named, Gateway User ID (GWYUID)
--- l_gwyuid := fnd_profile.VALUE ('APPLSYSPUB/PUB');
SELECT profile_option_value
INTO l_gwyuid
FROM fnd_profile_options o, fnd_profile_option_values ov
WHERE profile_option_name = 'GWYUID'
AND o.application_id = ov.application_id
AND o.profile_option_id = ov.profile_option_id;
-- Get the value of the profile option named, Two Task(TWO_TASK)
SELECT profile_option_value
INTO l_two_task
FROM fnd_profile_options o, fnd_profile_option_values ov
WHERE profile_option_name = 'TWO_TASK'
AND o.application_id = ov.application_id
AND o.profile_option_id = ov.profile_option_id;
l_url :=
fnd_webfile.get_url (file_type => fnd_webfile.request_out, -- for out file
ID => l_request_id,
gwyuid => l_gwyuid,
two_task => l_two_task,
expire_time => 500-- minutes, security!.
);
DBMS_OUTPUT.put_line (l_url);
END;
Output will be one link , Just paste the output in Browser and you will be able to view output file
I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site. As a result of checking through the net and meeting techniques that were not productive, Same as your blog I found another one Oracle Cloud Applications .Actually I was looking for the same information on internet for Oracle Cloud Applications Consultant and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for all the details.
ReplyDelete