Thursday, 6 August 2015

How to call Concurrent Request from an Oracle Reports

1. Define "User Parameters" of type number by the name:

    P_CONC_REQUEST_ID

 2. Add below script on Before-Report trigger:

    SRW.USER_EXIT('FND SRWINIT');

3. Create a script to call Concurrent program on report-trigger (e.g. AfterReport )


 l_request_id     NUMBER;
 l_layout_id      BOOLEAN;


    l_layout_id :=   
                    fnd_request.add_layout (template_appl_name   => 'XXILL',
                                  template_code        => 'XXCONA_PURCHASE_COND',
                                  template_language    => 'en',
                                  template_territory   => 'IN',
                                  output_format        => 'PDF'
                                  );

    l_request_id :=
          fnd_request.submit_request
                                   (application      => 'XXILL',
                                    program          => 'XXCONA_PURCHASE_COND',
                                    description      => NULL,
                                    start_time        => SYSDATE,
                                    sub_request     => FALSE,
                                    argument1        => :P_ORG_ID,
                                    argument2        => :PO_ORDER
                                   );
          Commit;

4. Add below script on After-Report Trigger

    SRW.USER_EXIT('FND SRWEXIT');

No comments:

Post a Comment