What is concurrent Program Exceution?
what is its use?
How to define the concurrent program?
How to execute it from the Toad?
We need to authenticate first, using (FND_GLOBAL.APPS_INITIALIZE)
Syntax:
procedure APPS_INITIALIZE(user_id in number,resp_id in number, resp_appl_id in number security_group_id in number);
Arguments (input)
USER_ID - The User ID number.
RESP_ID - The ID number of the responsibility.
RESP_APPL_ID - The ID number of the application to which the responsibility belongs.
SECURITY_GROUP_ID - The ID number of the security group. This argument is automatically defaulted by the API. The caller should not pass a value for it.
Example
fnd_global.APPS_INITIALIZE (1010,20417,201);
>> How to get the User Id ?
Select user_id from fnd_user where user_name like 'SO and so';
>> How to get the Application ID ?
Select * from fnd_application_tl where application_name like 'Purchasing';
>> How to get the Resp_appl_id ?
select * from fnd_responsibility_tl where application_id=201;
Next thing is how to use the concurrent program?
CREATE OR REPLACE PROCEDURE xxpd_FPOC
AS
l_conc_id NUMBER;
BEGIN
fnd_global.apps_initialize (1115, 50241, 201);
l_conc_id :=
fnd_request.submit_request (application => 'XXCUST',
program => 'XXPDFPOC_SHORTNAME',
description => NULL,
start_time => NULL,
sub_request => FALSE,
argument1 => sysdate,
argument2 => sysdate
);
DBMS_OUTPUT.put_line (l_conc_id);
COMMIT;
EXCEPTION
WHEN OTHERS then
DBMs_OUTPUT.PUT_LINE(SQLCODE || ' ' || SQLERRM);
END;
>> How to get application name ? (XXCUST)
select application_id from fnd_application_tl where application_name like '%Custom%'
select * from fnd_application where application_id=511 ( application short name)
>> how to get program name ? (here it is concurrent program short name)
select *
from fnd_concurrent_programs
where 1=1
and concurrent_program_name like '%XXPDFPOC%'
No comments:
Post a Comment