Submitting XML Report using FND_REQUEST.SUBMIT_REQUEST

Submitting XML Report using FND_REQUEST.SUBMIT_REQUEST, www.askhareesh.com
If you submit the concurrent Program (XML Report) from backend using FND_REQUEST.SUBMIT_REQUEST, it will not take Attached Template(Layout) to the Concurrent Program. For this, we need to add Layout Explicitly using FND_REQUEST.ADD_LAYOUT before submitting the Concurrent Program (XML Report).

Sample code:
DECLARE
   l_request_id               NUMBER;
   l_option_return            BOOLEAN;
BEGIN

   fnd_global.apps_initialize (user_id           => fnd_global.user_id,
                               resp_id           => fnd_global.resp_id,
                               resp_appl_id      => fnd_global.resp_appl_id
                              );
   l_option_return :=
      fnd_request.add_layout (template_appl_name      => 'SQLAP', --Application Short Name
                              template_code           => 'DATA_WORKTAB_REPORT', --Template Code
                              template_language       => 'En',
                              template_territory      => '00',
                              output_format           => 'PDF'
                             );
   /* Setting Printer Options , if we want print output of the Concurrent Program on Particular Printer*/
   l_option_return :=
      fnd_request.set_print_options (printer             => 'noprint',
                                     style               => 'LANDSCAPE',
                                     copies              => 1,
                                     save_output         => TRUE,
                                     print_together      => 'N'
                                    );
   l_request_id := fnd_request.submit_request (
        'SQLAP' ,
        'DATA_WORKTAB_REPORT' ,
        'EDI830 Worktab table Data',
        null,
        FALSE,
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
          CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0),
        CHR(0));
   IF l_request_id = 0 THEN 
    FND_MESSAGE.SET_STRING('Cannot Submit Request') ;
     FND_MESSAGE.SHOW;
   ELSE 
  FND_MESSAGE.SET_STRING('Submitting Job to Run: EDI830 Worktab table Data. Look at Request ID: '||to_char(l_request_id)) ;
     FND_MESSAGE.SHOW;
     commit;
   END IF;
END;


*/