Invoke a BI-published concurrent program from PL/SQL

DECLARE

v_layout     BOOLEAN;
v_notif      BOOLEAN;
v_request_id NUMBER;

BEGIN

— define which rtf template to use
v_layout := fnd_request.add_layout
(template_appl_name => ‘XXERP’
,template_code => ‘XXERPIAP02REP’
,template_language => ‘EN’
,template_territory => ’00’
,output_format => ‘PDF’
);

— who to send a completion notification to
— (this command can be used multiple times per submit)
v_notif := fnd_request.add_notification
(user => ‘DTAYLOR’
,on_normal => ‘Y’
,on_warning => ‘N’
,on_error => ‘N’
);

— submit the concurrent program
v_request_id := fnd_request.submit_request
(application => ‘XXERP’
,program => ‘XXERPIAP02REP’
,argument1 => ‘3074763’
,argument2 => ‘Y’
);

dbms_output.put_line(‘Request ID = ‘v_request_id);

END;