CREATE OR REPLACE PROCEDURE APPS."XXX_LOG" (pmessage VARCHAR2)
AS
BEGIN
-- This Procedure is used to write on Log file
DBMS_OUTPUT.put_line (pmessage);
fnd_file.put_line (fnd_file.LOG, pmessage);
EXCEPTION
WHEN OTHERS
THEN
NULL;
END XXX_LOG;
PROCEDURE apps_initialize (p_org_id IN NUMBER)
IS
v_user_id NUMBER := fnd_profile.VALUE ('USER_ID');
v_resp_id NUMBER := fnd_profile.VALUE ('RESP_ID');
v_resp_appl_id NUMBER := fnd_profile.VALUE ('RESP_APPL_ID');
lv_request_id NUMBER;
lv_org_id NUMBER := fnd_profile.VALUE ('ORG_ID');
--
BEGIN
--
lv_org_id := p_org_id;
--
IF (lv_org_id = 777)
THEN
v_user_id := 888;
v_resp_id := 53223;
v_resp_appl_id := 200;
ELSIF (lv_org_id = 9874)
THEN
v_user_id := 99;
v_resp_id := 53345;
v_resp_appl_id := 200;
ELSIF (lv_org_id = 3657)
THEN
v_user_id := 666;
v_resp_id := 53885;
v_resp_appl_id := 200;
ELSE
v_user_id := 33;
v_resp_id := 50645;
v_resp_appl_id := 200;
END IF;
fnd_global.apps_initialize (user_id => v_user_id,
resp_id => v_resp_id,
resp_appl_id => v_resp_appl_id);
mo_global.init ('SQLAP');
fnd_client_info.set_org_context (lv_org_id);
END apps_initialize;
No comments:
Post a Comment