Today, let us look at how we can submit XML Publisher report from PL/SQL. Now you might think that I already know how to use “fnd_request.submit_request” to submit a concurrent program. Right? Well, things are a little different when it comes to XML Publisher Report / Concurrent Program.

First, let us see what happens when you submit a XML Publisher Report manually from the SRS Window. Take a look at the below screen shot. You will see that the “Layout” field is populated automatically once you select the concurrent program name.

concProgram_001

Lets click on “Options” and see what we can find out.

Layout_001

You will see the template name, language and format details. This is populated from the Data Template that we have created. Let us see how that looks.

template_001

So the template is linked to the concurrent program. Therefore what we learn from this is that when we submit the concurrent program manually, the layout / template is automatically attached to the Concurrent Program and that’s how the output is generated in PDF (in this example).

So when we try to submit the concurrent program from PL/SQL, it has to be a two-step process:

  1. Attach the layout / template to the Concurrent Program
  2. Submit the concurrent program

Now lets see how we can attach the layout / template to the Concurrent Program. The API to be used is fnd_request.add_layout.

code_snippet1

You can get the template details using the below SQL statements.

SELECT * FROM xdo_templates_b
WHERE template_code = ‘FNDCPPGD_XML’;

SELECT * FROM xdo_templates_tl
WHERE template_code = ‘FNDCPPGD_XML’;

Let us also look at how we can submit the concurrent program. API for the same is fnd_request.submit_request. In our case, call to the API will look like:

code_snippet2

So our final code snippet will look like below:

final_code

One thing to note is that if you are calling the program from another concurrent program, you may not have
to use FND_GLOBAL.APPS_INITIALIZE.

Hope this helps. Please leave your comments and feedback which will really help us!!

If you would like to see blogs on a different topic, please use the “Contact Us” page to let us know.


Comments

2 responses to “Submit XML Publisher Report from PL/SQL”

  1. hi any one have idea about check printg please upload .rtf files and xml files please …. or others wise please seand to nalluri.venkatanaresh@gmail.com

    1. Hi Venkat,

      You can download the standard check template from your Oracle EBS / Oracle Fusion instance. You can also download the XML file from the Log file of the Format Payment Instruction program or from the IBY Tables. To know how to download the XML file from the table, please check out XML Output for AP Check Payments in R12

      If you have specific requirements, please let me know in the comments.

      Thanks,
      Arun

Questions? Comments? Suggestions? Let us know!! Like / Subscribe / Follow for more updates.