FND_REQUEST.SUBMIT_REQUEST
declare
v_request_id number(15);
v_user_id fnd_user.user_id%TYPE := 40827;
v_responsibility_id fnd_responsibility.responsibility_id%TYPE;
l_boolean boolean
begin
select name into l_db
from v$database;
SELECT responsibility_id
INTO v_responsibility_id
FROM fnd_responsibility_vl
WHERE responsibility_name = 'AR Receivables';
-- set environment context
fnd_global.apps_initialize (v_user_id,
v_responsibility_id,
v_application_id
);
l_boolean := fnd_request.set_mode (TRUE);
v_request_id :=
fnd_request.submit_request ( 'XXAPP', -- Application Short Name
'XXSHORTNAME', -- Program Name
'DESCRIPTION', -- Description
SYSDATE, -- Start_time
FALSE, --Sub_request
Arguement1,
'','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','' );
-- ,chr(0)); -- end of arguements
-- use null for remaining arguements or you can use chr(0); to end the arguements list
COMMIT;
DBMS_OUTPUT.put_line ('REQUEST_ID= ' || v_request_id);
IF v_request_id = 0
THEN
dbms_output.put_line ('Concurrent request failed to submit');
ELSE
dbms_output.put_line('Successfully Submitted the Concurrent Request');
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Request set submission failed - unknown error: ' ||
sqlerrm);
end;
v_request_id number(15);
v_user_id fnd_user.user_id%TYPE := 40827;
v_responsibility_id fnd_responsibility.responsibility_id%TYPE;
l_boolean boolean
begin
select name into l_db
from v$database;
SELECT responsibility_id
INTO v_responsibility_id
FROM fnd_responsibility_vl
WHERE responsibility_name = 'AR Receivables';
-- set environment context
fnd_global.apps_initialize (v_user_id,
v_responsibility_id,
v_application_id
);
l_boolean := fnd_request.set_mode (TRUE);
v_request_id :=
fnd_request.submit_request ( 'XXAPP', -- Application Short Name
'XXSHORTNAME', -- Program Name
'DESCRIPTION', -- Description
SYSDATE, -- Start_time
FALSE, --Sub_request
Arguement1,
'','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','' );
-- ,chr(0)); -- end of arguements
-- use null for remaining arguements or you can use chr(0); to end the arguements list
COMMIT;
DBMS_OUTPUT.put_line ('REQUEST_ID= ' || v_request_id);
IF v_request_id = 0
THEN
dbms_output.put_line ('Concurrent request failed to submit');
ELSE
dbms_output.put_line('Successfully Submitted the Concurrent Request');
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Request set submission failed - unknown error: ' ||
sqlerrm);
end;
Comments
Post a Comment