No need to use developer 6i/10g report tool or pl/sql stored procedure to create an XML report in this case.
Please refer another post to see XML Publisher Report with PLSQL as Data Source and Known Issues
Here we will create a Data Template and include our SQL query into it.
We will be using seeded executable (XDODTEXE) to meet our requirement.
Step-by-step instruction to create a XML report using Data Template.
1> Prepare your query, based on your business requirement.
2> Define a Data Template XML File. (Please refer the sample Data Template attached below)
> It is very important to create the Data Template in correct format.
Lets go through the different sections of it.
>> <dataTemplate name>: Name of your Data Template, Ex: NOBANK_DD
>> <parameters>: Add separate parameters for each input(conditions/bind variables) used in the query.
>> <dataQuery>: Your above created query with proper bind variables.
>> <dataStructure>: It is the XML output data structure.
3> Create a Data Definition (Ex. short code: XXSAMXML) in Test application.
Navigation: XML Publisher Administrator -> Home -> Data Definitions --> Create Data Definition
> Attach the above created Data Template XML file to it as a Data Template.
3> Register the packaged procedure in Test application (Concurrent program short code : XXSAMXML).
> Short code of Data Definition and Concurrent Program must be same.
> Executable: XDODTEXE
> Output Format: XML
> Define parameter for each parameters in the Data Template.
>> The concurrent program parameter token should match with the Data Template parameter name.
4> Add the concurrent program to the respective request group.
5> Run the report and save the output as sample.xml
6> Create an rtf template (sample.rtf) on MS Word based on sample.xml (using BI Publisher Desktop)
7> Define a Template in Test application.
Navigation: XML Publisher Administrator -> Home -> Templates --> Create Template
> Refer the same Data Definition created above (short code: XXSAMXML).
> Attach the above created rtf template (Sample.rtf) to this Template.
> Choose 'Default Output Type' as required.
8> Run the Cuncurrent program again to get the desired output.
Known Issues:
1> While defining Data Definition
Error:
The uploaded file is invalid. the file should be in xml-data-template format
Solution : Double check your data definition xml file, format must be correct.
2> Concurrent Program Error
Error:
-- Log file of concurrent request
======================================
XDO Data Engine Version No: 5.6.3
Resp: 20419
Org ID : null
Request ID: 2250535
All Parameters: p_due_date=
Data Template Code: XXSAMXML
Data Template Application Short Name: XXX
Debug Flag: N
{p_due_date=}
Calling XDO Data Engine...
java.lang.NullPointerException
at oracle.apps.xdo.oa.util.DataTemplate.getDataTemplate(DataTemplate.java:379)
at oracle.apps.xdo.oa.util.DataTemplate.<init>(DataTemplate.java:226)
at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:283)
at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
Solution : DataTemplate code must be in Uppercase and same as Concurrent program Short Code.
Sample Data Template
Please refer another post to see XML Publisher Report with PLSQL as Data Source and Known Issues
Here we will create a Data Template and include our SQL query into it.
We will be using seeded executable (XDODTEXE) to meet our requirement.
Step-by-step instruction to create a XML report using Data Template.
1> Prepare your query, based on your business requirement.
2> Define a Data Template XML File. (Please refer the sample Data Template attached below)
> It is very important to create the Data Template in correct format.
Lets go through the different sections of it.
>> <dataTemplate name>: Name of your Data Template, Ex: NOBANK_DD
>> <parameters>: Add separate parameters for each input(conditions/bind variables) used in the query.
>> <dataQuery>: Your above created query with proper bind variables.
>> <dataStructure>: It is the XML output data structure.
3> Create a Data Definition (Ex. short code: XXSAMXML) in Test application.
Navigation: XML Publisher Administrator -> Home -> Data Definitions --> Create Data Definition
> Attach the above created Data Template XML file to it as a Data Template.
3> Register the packaged procedure in Test application (Concurrent program short code : XXSAMXML).
> Short code of Data Definition and Concurrent Program must be same.
> Executable: XDODTEXE
> Output Format: XML
> Define parameter for each parameters in the Data Template.
>> The concurrent program parameter token should match with the Data Template parameter name.
4> Add the concurrent program to the respective request group.
5> Run the report and save the output as sample.xml
6> Create an rtf template (sample.rtf) on MS Word based on sample.xml (using BI Publisher Desktop)
7> Define a Template in Test application.
Navigation: XML Publisher Administrator -> Home -> Templates --> Create Template
> Refer the same Data Definition created above (short code: XXSAMXML).
> Attach the above created rtf template (Sample.rtf) to this Template.
> Choose 'Default Output Type' as required.
8> Run the Cuncurrent program again to get the desired output.
Known Issues:
1> While defining Data Definition
Error:
The uploaded file is invalid. the file should be in xml-data-template format
Solution : Double check your data definition xml file, format must be correct.
2> Concurrent Program Error
Error:
-- Log file of concurrent request
======================================
XDO Data Engine Version No: 5.6.3
Resp: 20419
Org ID : null
Request ID: 2250535
All Parameters: p_due_date=
Data Template Code: XXSAMXML
Data Template Application Short Name: XXX
Debug Flag: N
{p_due_date=}
Calling XDO Data Engine...
java.lang.NullPointerException
at oracle.apps.xdo.oa.util.DataTemplate.getDataTemplate(DataTemplate.java:379)
at oracle.apps.xdo.oa.util.DataTemplate.<init>(DataTemplate.java:226)
at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:283)
at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
Solution : DataTemplate code must be in Uppercase and same as Concurrent program Short Code.
Sample Data Template
Just Excellent!!!
ReplyDeleteGreat.. Saved me a lot of research and debugging .Thanks a lot
ReplyDeleteVery good tip
ReplyDeletestill it is throwing same error
ReplyDeleteDileep,
DeleteDid you try the solution mentioned above for the error?
Hi,
ReplyDeleteI am trying to create a xml report , though my short name and code are same and in the same case yet im getting the below error.
Calling XDO Data Engine...
java.lang.NullPointerException
at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:480)
at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:445)
at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:308)
at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:334)
at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:294)
at oracle.apps.fnd.cp.request.Run.main(Run.java:156)
Any help is appreciated.
Please recheck the data template specially the tag names.
DeleteI am getting same error but am using xsl file for template instead of rtf. Output is in XML not excel output
ReplyDeleteMy Xml publisher codes were in lowercase. You saved me a lot of trouble shooting.
ReplyDeleteThanks a lot.
DataTemplate is in Uppercase and same as Concurrent program Short Code, but still iam getting error.
ReplyDeleteDataTemplate is in Uppercase and same as Concurrent program Short Code but still getting error.
ReplyDelete