Friday, 9 October 2020

Submit Concurrent Request set from pl/sql

Submit Concurrent Request set from pl/sql

Hi friends, we are going to discuss about the Submit Concurrent Request set from pl/sql. We will share the detail pl/sql code which helps to call/submit the concurrent request set from backend. Using this PLSQL code , we can submit any oracle apps concurrent request set. We don't need to submit the concurrent request set from application using this plsql code , but we can directly submit/execute any concurrent request in oracle apps. In oracle apps r12 application, we have the standard given oracle package 'FND_SUBMIT.SUBMIT_SET' which helps to submit the concurrent request set from pl/sql. We just need to use this standard API in our plsql code. Before using this API we should have some of the details about concurrent request set. Here below we will discuss in more detail about the complete process to Submit Concurrent Request set from pl/sql.

Submit Concurrent Request set from pl/sql
Submit Concurrent Request set from pl/sql

2 Oracle Standard API to Submit Concurrent Request set from pl/sql

Here below is the oracle shared standard api to call or submit any concurrent request set from pl/sql or backend.

1.FND_SUBMIT.SUBMIT_SET
2.FND_SUBMIT.SUBMIT_PROGRAM

4 Important Points needs to Consider Using Submit Concurrent Request set from pl/sql

1. We should have the Short Name of the Request Set.
2.We should have the Complete details about the Stages in the Request set.
3. We should have the short name of the concurrent Program submit inside each concurrent request set stages.
4. We should have the complete idea of the concurrent Program Parameters which we need to submit under the concurrent Request set.

Complete PL/SQL Code to submit the Concurrent Request set

Here below is the complete plsql code which we can use to submit the concurrent request set.
In this example , We are using the one concurrent Request set and under the request set , we have four concurrent program stages to execute in single concurrent request set in oracle apps .




DECLARE 
srs_failed            EXCEPTION;
submitprog_failed     EXCEPTION; 
submitset_failed      EXCEPTION;
l_start_date          VARCHAR2(250);
V_REQUEST_SET_EXIST   BOOLEAN := FALSE;
req_id                INTEGER := 0;
l_CONC_PROG_SUBMIT    BOOLEAN := FALSE;
BEGIN

V_REQUEST_SET_EXIST :=
FND_SUBMIT.set_request_set (application   => 'XXGL',
request_set   => 'XXPLSQLSET');

IF (NOT V_REQUEST_SET_EXIST)
THEN
RAISE srs_failed;
END IF;

fnd_file.put_line (fnd_file.LOG, 'Submitting the REQUEST SET for first stage');

l_CONC_PROG_SUBMIT :=
fnd_submit.submit_program ('XXGL',
'FIRST_PROGRAM',
'STAGE10',
'ARGUMENT1');

IF (NOT l_CONC_PROG_SUBMIT)
THEN
RAISE submitprog_failed;
END IF;

fnd_file.put_line (fnd_file.LOG, 'Submitting the REQUEST SET for Second stage');

l_CONC_PROG_SUBMIT :=

fnd_submit.submit_program ('XXGL',
'SECOND_PROGRAM',
'STAGE20');

IF (NOT l_CONC_PROG_SUBMIT)
THEN
RAISE submitprog_failed;
END IF;

fnd_file.put_line (fnd_file.LOG, 'Submitting the REQUEST SET for Third stage');

l_CONC_PROG_SUBMIT :=
fnd_submit.submit_program ('XXGL',
'THIRD_PROGRAM',
'STAGE30');

IF (NOT l_CONC_PROG_SUBMIT)
THEN
RAISE submitprog_failed;
END IF;

fnd_file.put_line (fnd_file.LOG, 'Submitting the REQUEST SET for Fourth stage');

l_CONC_PROG_SUBMIT :=
fnd_submit.submit_program ('XXGL',
'FOURTH_PROGRAM',
'STAGE40');

IF (NOT l_CONC_PROG_SUBMIT)
THEN
RAISE submitprog_failed;
END IF;

fnd_file.put_line (fnd_file.LOG, 'Submitting the Request Set from PLSQL');

select to_char(sysdate,'DD-MON-YYYY HH24:MI:SS')
into l_start_date
from dual;

req_id :=
FND_SUBMIT.submit_set (start_time    => l_start_date,
sub_request   => FALSE);

IF (req_id = 0)
THEN
RAISE submitset_failed;
END IF;
EXCEPTION
WHEN srs_failed
THEN
p_errbuf := 'Submission of request set failed: ' || fnd_message.get;
p_retcode := 2;
fnd_file.put_line (fnd_file.LOG, p_errbuf);
WHEN submitprog_failed
THEN
p_errbuf := 'Call to concurrent program failed: ' || fnd_message.get;
p_retcode := 2;
fnd_file.put_line (fnd_file.LOG, p_errbuf);
WHEN submitset_failed
THEN
p_errbuf := 'Call to concurrent program failed: ' || fnd_message.get;
p_retcode := 2;
fnd_file.put_line (fnd_file.LOG, p_errbuf);
WHEN OTHERS
THEN
p_errbuf := 'Request set submission from pl/sql has been failed – unknown error: ' || SQLERRM;
p_retcode := 2;
fnd_file.put_line (fnd_file.LOG, p_errbuf);
END;


Submit Concurrent Request set from pl/sql
Submit Concurrent Request set from pl/sql


Submit Concurrent Request set from pl/sql

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *