DECLARE
ln_request_id NUMBER;
lv_user_name VARCHAR2(100) := 'RANREDDY';
ln_user_id NUMBER;
lv_resp_name VARCHAR2(100) := 'SYSADMIN';
lv_cp_short_name VARCHAR2(100) := 'FNDWFBG';
lv_appl VARCHAR2(100) := 'FND';
ln_resp_id NUMBER;
ln_appl_id NUMBER;
BEGIN
BEGIN
SELECT user_id
INTO ln_user_id
FROM FND_USER
WHERE user_name = lv_user_name;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
BEGIN
SELECT responsibility_id,application_id
INTO ln_resp_id,ln_appl_id
FROM fnd_responsibility_tl
WHERE responsibility_name = 'System Administrator';
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
fnd_global.apps_initialize(ln_user_id,ln_resp_id,ln_appl_id);
ln_request_id := fnd_request.submit_request (application => lv_appl
,program => lv_cp_short_name
,description => NULL
,start_time => SYSDATE
,sub_request => FALSE
,argument1 => 'POAPPRV'
,argument2 => NULL
,argument3 => NULL
,argument4 => 'Y'
,argument5 => 'Y'
,argument6 => NULL
,argument7 => NULL);
COMMIT;
dbms_output.put_line('Request Id'|| ln_request_id);
END;
ln_request_id NUMBER;
lv_user_name VARCHAR2(100) := 'RANREDDY';
ln_user_id NUMBER;
lv_resp_name VARCHAR2(100) := 'SYSADMIN';
lv_cp_short_name VARCHAR2(100) := 'FNDWFBG';
lv_appl VARCHAR2(100) := 'FND';
ln_resp_id NUMBER;
ln_appl_id NUMBER;
BEGIN
BEGIN
SELECT user_id
INTO ln_user_id
FROM FND_USER
WHERE user_name = lv_user_name;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
BEGIN
SELECT responsibility_id,application_id
INTO ln_resp_id,ln_appl_id
FROM fnd_responsibility_tl
WHERE responsibility_name = 'System Administrator';
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
fnd_global.apps_initialize(ln_user_id,ln_resp_id,ln_appl_id);
ln_request_id := fnd_request.submit_request (application => lv_appl
,program => lv_cp_short_name
,description => NULL
,start_time => SYSDATE
,sub_request => FALSE
,argument1 => 'POAPPRV'
,argument2 => NULL
,argument3 => NULL
,argument4 => 'Y'
,argument5 => 'Y'
,argument6 => NULL
,argument7 => NULL);
COMMIT;
dbms_output.put_line('Request Id'|| ln_request_id);
END;
No comments:
Post a Comment