# Oracle Forms, FND_REQUEST.SUBMIT_REQUEST, XML Publisher report, No PDF Output



## thePITman

I have a custom Oracle Form that submits a request for a concurrent program. The program is an XML Publisher report with PDF output. The concurrent program completes without error; but when I click "View Output," I get the "Unable to find the published output for this request" and "No output file exists for request #" errors.

If I submit the concurrent request manually by going to "Submit a New Request" and such, it works fine. Only when being submitted via the form does it have an issue. Please help, thanks!

Here is a sample of my code:



Code:


v_set_print := FND_REQUEST.SET_PRINT_OPTIONS(FND_PROFILE.VALUE('Printer'),'','',TRUE,'');

IF v_set_print = FALSE THEN
  FND_MESSAGE.RETRIEVE;
  FND_MESSAGE.ERROR;
  --MESSAGE('ERROR: Set Print Options did not submit successfully.');PAUSE;
END IF;

v_req_id := FND_REQUEST.SUBMIT_REQUEST(application_short_name,
                                       conc_program_short_name,
                                       conc_program_description,
                                       NULL,
                                       FALSE,
                                      :HEADER_BLOCK.FIELD_NAME,
                                      '','','','','','','','','',
                                      '','','','','','','','','','',
                                      '','','','','','','','','','',
                                      '','','','','','','','','','',
                                      '','','','','','','','','','',
                                      '','','','','','','','','','',
                                      '','','','','','','','','','',
                                      '','','','','','','','','','',
                                      '','','','','','','','','','',
                                      '','','','','','','','','','');

IF v_req_id = 0 THEN
  FND_MESSAGE.RETRIEVE;
  FND_MESSAGE.ERROR;
  --MESSAGE('ERROR: Statement of Invoie XML Publisher Report did not submit successfully.');PAUSE;

END IF;


----------



## thePITman

My issue has been resolved. When submitting the request via the Oracle Form (as opposed to submitting a manual concurrent request), there was no Layout attached to the request. I had to add a Layout to the request prior to the SUBMIT_REQUEST call. Here are the steps I had to follow:

1. First you must declare the variable



Code:


xml_layout boolean;

2. Then you must call the ADD_LAYOUT API prior to submitting your Concurrent Program. 



Code:


xml_layout := FND_REQUEST.ADD_LAYOUT(app_short_name,
                                     conc_prog_short_name,
                                     'en',
                                     'US',
                                     'PDF');

Courtesy Metalink Document ID: 308658.1


----------

