Skip to content
Home / Apps / How to Submit Concurrent Program from back-end using fnd_request in Oracle Apps

How to Submit Concurrent Program from back-end using fnd_request in Oracle Apps

fnd_request.submit_request Oracle Apps PL/SQL API helps to submit the concurrent program from the backend. backend means from the Database.

fnd_request.submit_request

Below is the signature of fnd_request.submit_request  API. This function submits a concurrent request for processing by concurrent Manager and returns,

  • request id – if the request is submitted successfully
  • 0 – if the request is not submitted successfully
FUNCTION fnd_request.submit_request (application IN VARCHAR2 DEFAULT NULL,
                                     program     IN VARCHAR2 DEFAULT NULL,
                                     description IN VARCHAR2 DEFAULT NULL,
                                     start_time  IN VARCHAR2 DEFAULT NULL,
                                     sub_request IN BOOLEAN DEFAULT FALSE argument1,
                                     argument2,
                                     ...,
                                     argument99,
                                     argument100)
  RETURN NUMBER;

Use API  FND_MESSAGE.RETRIEVE and FND_MESSAGE.ERROR or FND_MESSAGE.GET to retrieve any error message

This is how you can use fnd_request.submit_request to submit a concurrent request using PLSQL. Please Note, it is necessary to use fnd_global.apps_initialize API to set the context of the Oracle Apps session.

DECLARE
   l_request_id NUMBER;
BEGIN
   fnd_global.apps_initialize (user_id=>1121
                              ,resp_id=>20634
                              ,resp_appl_id=>401);

   l_request_id := fnd_request.submit_request ( application => 'INV'
                                              , program => 'CONC_DEMO'
                                              , description => 'Concurrent Program Demo'
                                              , start_time => sysdate
                                              , sub_request => FALSE
                                              , argument1 => 'fnd_request demo' );
   COMMIT;
   
   IF l_request_id = 0 THEN
      dbms_output.put_line('Request not submitted error '|| fnd_message.get);
   ELSE
      dbms_output.put_line('Request submitted successfully request id ' || l_request_id);
   END IF;
EXCEPTION
   WHEN OTHERS THEN
     dbms_output.put_line('Unexpected errro ' || SQLERRM);   
END;

Submitted concurrent program from the front end.

Submit Concurrent Program from back-end using fnd_request