Tuesday, 13 October 2020

How to submit request from backend in Oracle Apps

How to submit request from backend in Oracle Apps

Hi friends, we are going to discuss about How to submit request from backend in Oracle Apps. We will share the complete steps with source code to submit request from backend in oracle. In oracle apps, we do submit the concurrent program as an request. To submit the concurrent request request , we need to go to the Requests and then submit request. Some time , In integrations we often encounters some requirements to submit the request from backend in integration itself. In this case , this method is very usefully if we have an requirement to submit the request from custom forms or custom packages in oracle apps. Many standard Oracle Forms and Packages also uses the same API to submit request from backend. In Oracle apps , We have an standard API which helps to submit the concurrent program requests from backend in oracle apps. Here below , we will share the complete detail about How to submit request from backend in Oracle Apps.

How to submit request from backend in Oracle Apps
How to submit request from backend in Oracle Apps


API to Submit the request from backend

FND_REQUEST.SUBMIT_REQUEST

3 Important Points to remember using API to submit the concurrent requests from backend

Here below ,  We will share some of the important points , we need to consider before using the standard API to submit the request in oracle apps.

1.Concurrent Program request short name.
2.Needs to know the Concurrent Program request Parameters , which we also needs to pass while calling the concurrent program from pl/sql package
3. Application Name under which the Concurrent Program request registered .


Sample Source Code to submit request from backend in Oracle Apps

Here below is the sample source code to submit concurrent program request from DB in oracle apps.

DECLARE
v_resp_id NUMBER;
v_appl_id    NUMBER;
v_usr_id            NUMBER;
v_con_req_id            NUMBER;
BEGIN

v_usr_id := -1; -- MANUAL SET THE USER ID IN THE DB PACKAGE--

  SELECT DISTINCT fr.responsibility_id,
    frx.application_id
     INTO v_resp_id,
    v_appl_id
     FROM apps.fnd_responsibility frx,
    apps.fnd_responsibility_tl fr
    WHERE fr.responsibility_id = frx.responsibility_id
  AND fr.responsibility_name LIKE 'Pay%Resp%';
 
  
apps.fnd_global.apps_initialize (v_usr_id ,v_resp_id,v_appl_id);

  
  -- Here below ,  we are calling the concurrent request from Oracle DB--
  
  v_con_req_id := fnd_request.submit_request ( 
                            application   ='XXGL', 
                            program       ='XXTEST_CON_PROG, 
                            description   ='XXTest Concurrent Program', 
                            start_time    =sysdate, 
                            sub_request   =FALSE,
    argument1     ='84','TEST' -- 2 PARAMETERS OF THIS CONCURRENT PROGRAM--
  );
 
COMMIT;

IF v_con_req_id = 0

  THEN
  
     dbms_output.put_line ('Concurrent Program failed to Call from plsql');
 
  ELSE
  
     dbms_output.put_line('Concurrent Program Sucessfully Call from plsql');
 
  END IF;
  
EXCEPTION
WHEN OTHERS THEN
  dbms_output.put_line('Error In Concurrent Program Call Main Procedure 2 '||TO_CHAR(SQLCODE)||'-'||sqlerrm);
END;

How to submit request from backend in Oracle Apps
How to submit request from backend in Oracle Apps


How to submit request from backend in Oracle Apps


0 comments:

Post a Comment

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

Name

Email *

Message *