You are on page 1of 12

FORMS PERSONALIZATION Launching a Report Output from Tools Menu.

Step 1: Create a Seq - Calling report(test)- Enable Menu as shown below, In Condition tab,

In Actions tab,

Step 2: Create a Seq - Calling report(test) as shown below, In Condition tab,

In Actions tab,

Step 3: Click on the menu Test_Conc_Prog created as Shown below,

Request Id of the report is generated.

URL of the Output is displayed.

Concurrent Request Output is generated as below,

Code Attachments: Package XX_TEST_FP.SUB_PROG_FN

Function XX_GET_URL_PUB

CREATE OR REPLACE PACKAGE APPS.xx_test_fp AS FUNCTION sub_prog_fn RETURN NUMBER;

PROCEDURE sub_prog_pr (req_id OUT NUMBER); END;

CREATE OR REPLACE PACKAGE BODY APPS.xx_test_fp AS FUNCTION sub_prog_fn RETURN NUMBER IS l_req_id NUMBER; BEGIN sub_prog_pr (l_req_id);

RETURN (l_req_id); END;

PROCEDURE sub_prog_pr (req_id OUT NUMBER) AS PRAGMA AUTONOMOUS_TRANSACTION; V_SUCCESS BOOLEAN; v_phase VARCHAR2(30); v_status VARCHAR2(30); v_dev_phase VARCHAR2(30); v_dev_status VARCHAR2(30); v_message VARCHAR2(240);

BEGIN fnd_global.apps_initialize (user_id => 15064, resp_id => 51605, resp_appl_id => 275); req_id := fnd_request.submit_request ( 'MSCPA', 'MSCPRJTRAEXP', 'MSC Projects Travel Expense Invoice Lines - CSV Report', SYSDATE, FALSE, 'JAN-13', 'FEB-13'); COMMIT; IF req_id = 0

THEN DBMS_OUTPUT.PUT_LINE('Standard Program is Not Submitted'); ELSE WHILE NVL (v_dev_phase, 'A') != 'COMPLETE' LOOP v_success := FND_CONCURRENT.WAIT_FOR_REQUEST (req_id, 05, 05, v_phase, v_status, v_dev_phase, v_dev_status, v_message); END LOOP; END IF; END; END; /

CREATE OR REPLACE FUNCTION APPS.xx_get_url_pub(P_request_id number) RETURN VARCHAR2 AS

l_request_id NUMBER := P_request_id; l_two_task l_gwyuid l_url BEGIN DBMS_LOCK.sleep(30); VARCHAR2 (256); VARCHAR2 (256); VARCHAR2 (1024);

-- The request id

-- Get the value of the profile option named, Gateway User ID (GWYUID) l_gwyuid := fnd_profile.VALUE ('GWYUID'); /* Alternate SQL to get the value 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) l_two_task := fnd_profile.VALUE ('TWO_TASK'); /* Alternate SQL to get the value 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 output file ID gwyuid two_task => fnd_webfile.request_out, -- for log file. Use request_out to view

=> l_request_id, => l_gwyuid, => l_two_task, -- minutes, security!.

expire_time => 500 );

RETURN (l_url); END; /

You might also like