Oracle E-Business suite custom application development-How to submit a concurrent request from a FORM module through push button click


Required: FNDCONC.pll attached to custom form

with when-button-pressed trigger, attach the following code (Please remove what is not applicable in your case)

  l_ord_num               NUMBER := 0;
   l_ord_type_name         VARCHAR2 (240);
   l_req_id_Rep            NUMBER;
   l_request_completed     BOOLEAN := FALSE;
   l_req_phase             VARCHAR2 (20);
   l_req_status            VARCHAR2 (1000);
   l_req_dev_phase         VARCHAR2 (1000);
   l_req_dev_status        VARCHAR2 (1000);
   l_req_message           VARCHAR2 (1000);
   l_conc_mgr_status       NUMBER;
   p_call_stat             NUMBER;
   p_activep_stat          NUMBER;

   l_order_category_code   NUMBER;
   l_inv_report_name       VARCHAR2 (40);
   l_ret_report_name       VARCHAR2 (40);
   l_req_id                                 NUMBER;
   l_order_type_name                VARCHAR2(30);
  l_req_id :=
      fnd_request.submit_request (‘ONT’,—Actual application short name
                                  l_inv_report_name,—Short name of concurrent program, please note this is not the executable name
                                  NULL,—Description not required
                                  SYSDATE,—start time, not required
                                  FALSE,—subsequent report name, not required

/*You can pass a total of 100 parameters, just make sure to pass them in the same order you have defined them in the parameter session for the concurrent program*/
                                  :ORDERS.OE_ORDER_NUMBER,                                   l_order_type_name,                                   NULL,
                                  apps.fnd_profile.VALUE (‘ORG_ID’));

:SYSTEM.Message_Level := ’25’;

   l_request_completed :=
      fnd_concurrent.wait_for_request (request_id   => l_req_id,
                                       INTERVAL     => 1,
                                       phase        => l_req_phase,
                                       status       => l_req_status,
                                       dev_phase    => l_req_dev_phase,
                                       dev_status   => l_req_dev_status,
                                       MESSAGE      => l_req_message);

—   :SYSTEM.Message_Level := ’25’;

:SYSTEM.Message_Level := ‘0’; (l_req_id, ‘Y’);

/*for displaying the pdf automatically with a new window or tab after the concurrent request completes successfully*/

This should provide you the desired functionality.