Monday 21 October 2013

XML Publisher v 5.6.3 issue with excel based template bursting

Introduction to Problem Statements:

Bursting with excel template is not allowed in xml publisher 5.6.3.

Proposed Solution:

This can be overcome by going little deep in to the standard tables.
When building the xml publisher report with excel template. You need to be cautious while writing bursting control file, particularly in the syntax where system understands from where the template needs to be picked up.
An issue was identified with bursting when used excel based template (.xls) in xml publisher (bi publisher) 5.6.3 version.

 Error shown in log is

--Exception ZIP file must have at least one entry java.util.zip.ZipException: ZIP file must have at least one entry at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:304) at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.zipOutputFiles(JCP4XDOBurstingEngine.java:534) at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.runProgram(JCP4XDOBurstingEngine.java:292) at oracle.apps.fnd.cp.request.Run.main(Run.java:157)

After troubleshooting, it is identified that the issue is in the below statement.

<xapi:template type="excel" location="blob://xdo_lobs.file_data/VARCHAR2:LOB_TYPE=TEMPLATE_SOURCE/VARCHAR2:APPLICATION_SHORT_NAME=ENEAP/VARCHAR2:LOB_CODE=ENEAPDRINV/VARCHAR2:LANGUAGE=en/VARCHAR2:TERRITORY=US"/>

This statement informs system to check in the XDO_TEMPLATES_TL table with template type "TEMPLATE_SOURCE". We only find rtf templates with this template type, so we get the above error, all excel based templates are stored with template type "TEMPLATE".
You can change the LOB_TYPE = TEMPLATE instead of TEMPLATE_SOURCE in the above template tag, else use the below statement which works perfectly fine.
<xapi:template type="excel" location="xdo://ENEAP.ENEAPDRINV.en.US/?getSource=true"/>

useful query for this situation

SELECT    lt.application_short_name
       || '.'
       || lt.template_code
       || '.'
       || lt.default_language
       || '.'
       || lt.default_territory
          AS burst_template_xdo_location
  FROM apps.xdo_templates_b lt
 WHERE lt.template_code = 'ENEQMSQLTYFNDASSTYPE' -- where 'ENEQMSQLTYFNDASSTYPE' is a data definition code.

References:

  • Bursting with excel template is given as a limitation in Metalink note (1351502.1).

Thanks,
Nithin

Comments system

Disqus Shortname