Top Banner
XML/BI Publisher – A Comprehensive Guide for Troubleshooting Kiran Kumar Gupta Killamsetty Gomathi Madheswaran Author: Kiran Kumar Gupta Killamsetty Gomathi Madheswaran Target readers XML Report Developers/ Leads Table of Contents 1. Installations XML Publisher Desktop Version 3 2. XML Publisher Report using Concurrent Program 4 Different activity to develop Report base XML Publisher. 4 a. Creating sample table 4 b. Create a report and register it as Concurrent Program of type XML 5 c. Creating Sample Word Template for XML Report. 7 3. XML Publisher Report using a SQL. 11 a. Introduction 11 b. The Data Template Definition 11 c. Construction of Data Template 12 d. Steps to Build XML Report using Data Template using SQL 14 4. Template formatting tips. 18 a. Inserting a field 18 b. If Statement 19 c. Setting Display property of a table at run time using if statement 19 d. Case statement 19 e. Importing a sub template 20 f. Inserting subtemplate in template rtf 20 g. Include repeating frame/table. 20 5. Bursting in XML Publisher 21 Advantages of XMLP Bursting 21 Prerequisites 21 Setups to create XML Publisher report using Bursting functionality 22 Steps to create Bursting Report: 25 6. Migration of XML Publisher reports between instances. 27 a. Different Components consider for migration. 27 b. Oracle Apps utilities for migration of XML Publisher components. 27 7. Known Issues: 31 8. Enhancements 33 9. Reference Documents 37 1. Installations XML Publisher Desktop Version This chapter explains installation of XML Publisher desktop version. Pre-Requisite : .Net Frame Work 2 Software : Oracle Patch Number 4561835 http://updates.oracle.com/download/4561835.html
33
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: XML

XML/BI Publisher – A Comprehensive Guide for TroubleshootingKiran Kumar Gupta KillamsettyGomathi Madheswaran

Author: Kiran Kumar Gupta Killamsetty            Gomathi Madheswaran

Target readers

  XML Report Developers/ Leads

Table of Contents1. Installations XML Publisher Desktop Version 32. XML Publisher Report using Concurrent Program 4

Different activity to develop Report base XML Publisher. 4a. Creating sample table 4b. Create a report and register it as Concurrent Program of type XML 5c. Creating Sample Word Template for XML Report. 7

3. XML Publisher Report using a SQL. 11a. Introduction 11b. The Data Template Definition 11c. Construction of Data Template12d. Steps to Build XML Report using Data Template using SQL 14

4. Template formatting tips. 18a. Inserting a field 18b. If Statement 19c. Setting Display property of a table at run time using if statement 19d. Case statement 19e. Importing a sub template 20f. Inserting subtemplate in template rtf 20g. Include repeating frame/table. 20

5. Bursting in XML Publisher 21Advantages of XMLP Bursting 21Prerequisites 21

Setups to create XML Publisher report using Bursting functionality 22Steps to create Bursting Report: 25

6. Migration of XML Publisher reports between instances. 27a. Different Components consider for migration. 27b. Oracle Apps utilities for migration of XML Publisher components. 27

7. Known Issues: 318. Enhancements 339. Reference Documents 37

1. Installations XML Publisher Desktop Version

This chapter explains installation of XML Publisher desktop version. Pre-Requisite :   .Net Frame Work 2Software :  Oracle Patch Number 4561835

  http://updates.oracle.com/download/4561835.html

Page 2: XML

After installation MS Word will get additional add-in as shown in the

Verify the Patch installation:Application Object Library (FND) patch 3435480 fullyIntegrates XML Publisher with the Concurrent Manager

2. XML Publisher Report using Concurrent Program

This chapter explains step by step processes to build XML Publisher report using source as Oracle Concurrent Program.Different activity to develop Report base XML Publisher.

a. Creating sample table to do this exercise b. Create a report and register it as Concurrent Program of type XMLb. Build a Data Definition & XML Template using XML Publisher.c. Create a relation between XML Template & Concurrent Program.

a. Creating sample table  

Table Script:CREATE TABLE EMP( EMPNO     NUMBER, ENAME     VARCHAR2(100 BYTE), MGR       VARCHAR2(100 BYTE), HIREDATE  DATE, SAL       NUMBER, COMM      NUMBER);

Primary Key:ALTER TABLE EMP ADD (  CONSTRAINT EMP_PK  PRIMARY KEY  (EMPNO) );

Sample Data:

Insert into EMP  (EMPNO, ENAME, MGR, HIREDATE, SAL, COMM)Values  (1, 'Kiran', 'Ravi', TO_DATE('05/11/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 1);Insert into EMP  (EMPNO, ENAME, HIREDATE, SAL, COMM)Values  (2, 'Ravi', TO_DATE('05/11/2000 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 10009, 10);Insert into EMP  (EMPNO, ENAME, MGR, HIREDATE, SAL, COMM)Values  (3, 'Vineela', 'Kiran', TO_DATE('05/11/2006 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 10, 0);COMMIT;

Page 3: XML

b. Create a report and register it as Concurrent Program of type XML

1. Creating Oracle Report

SQL:Select * from Emp;

Data Model:

Default Layout:

Add following user Defined Parameters:

P_CONC_REQUEST_ID,  P_RESPONSIBILITY_ID, P_USER_ID

Note : These parameters are mandatory to run report.

Sample File :

2. Migrate newly created custom rdf file to Oracle Application server at appropriate location.

3. Register report as concurrent program.

a. Executable using Application Developer Responsibility :

Page 4: XML

b. Concurrent Program using Application Developer Responsibility :

Page 5: XML

Note : Select Output as XML

Page 6: XML

c. Associate with a request Group

d. Attach to request group to a Responsibility.

4. Run the report and you will see an xml output appearing. Save the output as XMLREP1.xml on your computer. You will need to use menu /Tool/Copy to open this XML output in browser, and then save it as XX XMLREP1.xml on your PC.

Sample File :

c. Creating Sample Word Template for XML Report.

5. Open MS Word and click the Add-Ins menu you will get Custom Toolbars (refer installation section for more details). Load

Data from Data menu to load the report output (xml file).

6. Insert table using Insert Table option

Page 7: XML

7. I have added two different tables as shown below. By doing this you have created XML Publisher template.

Sample File:

Page 8: XML

8. Create Data Template for XML report as mentioned below (XML Publisher Admin Data Template Create)

Note: Code Name should be Report Concurrent program short Name.

9. Create template as given below

Page 9: XML

10. Navigate back to “UL Custom Responsibility” and submit the concurrent program “XXUL XML Publisher Report 1” and see the output.

Page 10: XML

Note: Layout value should default with template name. This we can ensure link between Concurrent Program and Template established correctly.

3. XML Publisher Report using a SQL.

For any XML Publisher report requires a template layout (RTF template) and Data XML (Data Definition) to generate any report. In the previous section we have learned how to build XML Publisher report from Oracle Report. This section we would be learning how to build XML Report without using Oracle Report.

a. Introduction

The XML Publisher data engine enables you to rapidly generate any kind of XML data Structure against the Oracle database in a scalable, efficient manner. The data template is the method by which you communicate your request for data to the data engine. It is an XML document whose elements collectively define how the data engine will process the template to generate the XML.

The data engine supports the following functionality:• Schema generation• Default RTF template generation• Flexfields• Single and multiple data queries

Page 11: XML

•Query links• Parameters• Multiple data groups• Aggregate functions (SUM, AVG, MIN, MAX, COUNT)• Event triggers• Distributed queries across multiple databases

b. The Data Template Definition

The data template is an XML document that consists of four basic sections: define parameters, define triggers, define data query, define data structure. This structure is shown in the following graphic:

Sample Files:Data Template Definition Data

Template

c. Construction of Data Template

Tags Comments

dataTemplate<dataTemplate name="EmpData" description="Employee Details" Version="1.0">

Attributes:• name (Required)• description• version (Required)• defaultPackage - the PL/SQL package name to resolve any lexical references, group filters, or data triggers defined in the template.• dataSourceRef - the default data source reference for the entire data template. Required only when performing a distributed query across multiple data sources.

dataTriggerSyntax<dataTrigger name=afterReport/beforeReprot source=<Package Name>.<Procedure Name> />

Always place “afterReport” trigger after dataStructure tag and Place “beforeReport” trigger before dataStructure tag.

Parameters<parameters><parameter name="p_DeptNo" dataType="character" /></parameters>

Consists of one or more <parameter> elementsdataType  Optional. Specify the parameter data type as"character", "date", or "number". Default value is"character".For the "date" dataType, the following three formats(based on the canonical ISO date format) are supported:• YYYY-MM-DD (example: 1997-10-24)• YYYY-MM-DD HH24:MI:SS (example: 1997-10-2412:00:00)• YYYY-MM-DDTHH24:MI:SS.FF3TZH:TZMdefaultValueThis value will be used for the parameter if no other value is supplied from the data at runtime.

ne a Data Link Between QueriesHow to DeExample :<link name="DEPTEMP_LINK" parentQuery="Q1" parentColumn="DEPTNO" childQuery="Q_2"childColumn="DEPARTMENTNO"/>

Attributes:• parentQuery - specify the parent query name.• parentColumn - specify the parent column name.• childQuery - specify the child query name.• childColumn - specify the child

Page 12: XML

column name.• condition - the SQL operator that defines the relationship between the parent column and the child

Lexical References Create a lexical reference using the following syntax:&parameternameNote : define a parameter (package variable) in the PL/SQL default package for each lexical reference in the query.

                                      

d. Steps to Build XML Report using Data Template using SQL

Step 1: Create the Data Definition in XML Publisher and associate it with Data Template

Create Data Template as shown below and note down the code name (EMP_DD1), this code should be used as concurrent program short name.

Add Data Template file which we have created in the previous session.

Page 13: XML

Step 2:  Create Concurrent program as shown below.  Short Name should be equal to Data Template code name.

Note: XDOTEXE is a standard Oracle Java Program.

Step 3: Create RTF template

Sample file.

Page 14: XML

RTF File

XML Data File

Step 4: Create Template and associate Data Definition.

Page 15: XML

Step 5: Navigate back to “UL Custom Responsibility” and submit the concurrent program “XXUL EMP DEP XML SQL Report”.

Page 16: XML

Sample Output :

Page 17: XML

4. Template formatting tips.

This session will discuss about various available in XML Publisher to manipulate the RTF template.

Sample XML Data file  <?xml version="1.0" ?> - <EMPDATA> <p_DeptNo>10</p_DeptNo> - <LIST_G_DEPT>- <G_DEPT> <DEPT_NUMBER>10</DEPT_NUMBER>  <DEPT_NAME>ACCOUNTING</DEPT_NAME>  <LOCATION>NEW YORK</LOCATION> - <LIST_G_EMP>- <G_EMP> <EMPLOYEE_NUMBER>7782</EMPLOYEE_NUMBER>  <NAME>CLARK</NAME>  <JOB>MANAGER</JOB>  <MANAGER>7839</MANAGER>  <HIREDATE>19810609T00:00:00.00005:00</HIREDATE>  <SALARY>2450</SALARY>  </G_EMP> </LIST_G_EMP> <DEPTSAL>7450</DEPTSAL>  </G_DEPT>

Page 18: XML

 </LIST_G_DEPT> </EMPDATA>

a. Inserting a field

NAME

Syntax : <?<Name of the field>?>

b. If Statement

<?if: <field Name>=”Value”?> Text    <?end-if?>

c. Setting Display property of a table at run time using if statement

Following table will display only if <field name> contains “Y” value<?if: <Field

Name>=”Y”?>I am an employee of the company.I confirm I am not an independent, non-employee representative of the company. I confirm I have authority to accept or reject this agreement.I have been provided the content of this agreement and have reviewed it.I accept this agreement on behalf of the company and agree that the company will be bound by it.

By:  

d. Case statement

<?choose:?><?when:expression?><? end when ?><?otherwise?><?end otherwise?>

<?end choose:?>

Page 19: XML

e. Importing a sub template

Imported MyAgreement<?import:xdo://<Application >.<Template Name>.<language>.00/?> <?import:xdo://ONT.XXULMYAGREEMENT.en.00/?>  

f. Inserting subtemplate in template rtf

<?call-template:<subtemplate name>?>  <?call@inlines:<Subtemplate name>?> <?end call?>    

g. Include repeating frame/table.

F  (Syntax: <?for-each:LIST_G_EMP?>)Number Nam

eJobManag

erHiredate

Salary

F  (syntax <?for-each:G_EMP?>) Enum

NAME

JOBMANAGER

HIREDATE

SALARY  E (Syntax: <?end for-each?>)

 E  (Syntax: <?end for-each?>)

5. Bursting in XML Publisher

Very common requirement in reporting is to split/print report in different pages depending transaction number. XML Publisher’s bursting engine accepts data stream and splits it based on multiple criteria. The engine provides flexibility to choose delivery channel. Example: Employee Pay slips and delivered via email.

Advantages of XMLP Bursting

No Additional Coding, just need to create XML bursting File. ( Isn't it exciting , otherwise we would have to write java program to split the XML File and then use XMLP delivery manager API to send emails .

Process of Creating XML data Definition and Template remains AS – IS .

Prerequisites

Apply patch 5968876 if not already applied

Verify XMLP version is 5.6.3

Steps to Verify if XMLP is indeed 5.6.3

adident Header $OA_JAVA/oracle/apps/xdo/common/MetaInfo.classMetainfo.class XML

PublisherPatch Reference

Page 20: XML

120.6 XDO 5.6.3 Patch 4440000  ... for the Oracle E-Business Suite 11i      115.28 XDO 5.6.3 Patch 5472959 Note 422508.1 115.27 XDO 5.6.2 (core) Patch 5097966 Note 367394.1 115.26 XDO 5.6.1 Patch 4905678 Note 357308.1 115.24 XDO 5.6.0 Patch 4561451Note 337999.1 115.22 XDO 5.5.0 Patch 4206181 Note 316447.1115.21 XDO 5.0.1 (core) Patch 4236958  115.19 XDO 5.0.0 Patch 3822219 Note 295036.1

If patch is applied in your instance you can see Burst Control file option in Data Definition.

Setups to create XML Publisher report using Bursting functionality

1. Setup temporary directory in XML Publisher Administrator.

Navigation: XML Publisher Administrator- > Administration- > Generals > Temporary Directory.

Page 21: XML

2. Creation of Bursting File,

XML File Structure:

Sample File:

<?xml version="1.0" encoding="UTF-8"?><xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi"><xapi:request select="/EMPLOYEES/EMPLOYEE"> <! - This sets the burstingelement i.e., EMPLOYEE (group name)- ><xapi:delivery><xapi:email id=”<ID Name>”server=" usnbkm201.us.ul.com" port="25"from="[email protected]" reply-to ="reply@ us.ul.com "> <!- Mention SMPT Server Name and port number. - ><xapi:message id="123" to="${EMAIL}" cc="${EMAIL_ALL}"attachment="true" subject="Employee Detailsfor ${ENAME}"> Mr. ${ENAME}, Please review theattached document</xapi:message><! - This assigns a delivery id of ’123’. It also sets the e-mailaddress of the employee and a cc copy to a parameter valueEMAIL_ALL; this might be a manager’s e-mail. The employee’sname (ENAME) can also be used in the subject/bodyof the email. - ></xapi:email><xapi:fax server="ipp://mycupsserver:631/printers/fax2">

<xapi:number id="FAX1">916505069560</xapi:number></xapi:fax>

<xapi:print id="printer1" printer="ipp://mycupsserver:631/printers/printer1" copies="2" /></xapi:delivery><xapi:document output-type="pdf" delivery="123"><xapi:template type="rtf" location="/usr/tmp/empGeneric.rtf"><xapi:template type="rtf" location="/usr/tmp/empDet.rtf"filter=".//EMPLOYEE[ENAME=’SMITH’]" ><! - Employees with the name SMITH will havethe empDet template applied - ></xapi:template></xapi:document></xapi:request></xapi:requestset>

3. Use the attribute select under the request element to specify the element in the XML data that you wish to burst on

Example<xapi:request select="/EMPLOYEES/EMPLOYEE">

4. Use the attribute id under the lowest level of the delivery structure (for example, for the delivery element email, the id attribute belongs to the message element. This assigns an ID to the delivery method to be referenced later in the XML file.

Example<xapi:message id="123" [email protected]

5. Use the delivery attribute under the document element. This assigns the delivery method for the generated document as defined in the id attribute for the delivery element. You can specify multiple delivery channels separated by a comma.

Example<xapi:document output-type="pdf" delivery="123">

6. Use the filter attribute on the template element. Use this to apply a layout template based on a filter on your XML data.

Example<xapi:template type="rtf" location="/usr/tmp/empGeneric.rtf"><xapi:template type="rtf" location="usr\tmp\empDet.rtf" filter=".//EMPLOYEE[ENAME=’SMITH’]"/>

Page 22: XML

This will apply the empDet template only to those employees with the name "SMITH". All other employees will have the empGeneric template applied. This filter can use any XPATH expression to determine the rules for the template application.

7. Dynamic Delivery Destination

You can reference elements in the data to derive certain delivery attributes, such as an e-mail address or fax number. Enter the value for the attribute using the following form:${ELEMENT} where ELEMENT is the element name from the XML data that holds the value for the attribute.For example:<xapi:message id="123" to="${EMAIL}"/>At runtime the value of the to attribute will be set to the value of the EMAIL element from the input XML file. You can also set the value of an attribute by passing a parameter to API in a Properties object.

8. Dynamic Delivery Content: Options same as above.

9. Run the below procedure in APPS Schema

CREATE OR REPLACE PROCEDURE xx_submit_bursting(p_request_id IN INTEGER) ASn_request_id NUMBER;BEGINn_request_id := fnd_request.submit_request('XDO','XDOBURSTREP',NULL,NULL,FALSE,p_request_id,'Y');END xx_submit_bursting;/

11.

Steps to create Bursting Report:

1. Create table which will provide data for Bursting Report2. Create a report name <Report Name> 3. Run the report in preview mode in reports designer4. Add user parameters to this report and FTP to $<Custom Location>/reports/US5. Register this report as concurrent program of type XML6. Add this report to Request group7. Run this report and save the xml file as xx_manager_output.xml8. Download & install XML Publisher desktop software latest version[as yet]9. Import xx_manager_output.xml in MS Word, and create default layout10. Save the default layout as rtf file MANAGER_XML_TEMPLATE.rtf11. Preview the report output within MS Word using XMLP Preview option12. Define data definition for the XMLP Report13. Prepare a simple bursting file, with help of XML xx_manager_output.xml

Page 23: XML

Sample file

14. Upload the bursting control file to data definition

15. Create XMLP Template XX_MANAGERS, and upload MANAGER_XML_TEMPLATE.rtf to this template.

16. Create pl/sql procedure xx_submit_bursting in apps schema, that submits fnd_request for XDOBURSTREP, with debug parameter= Y (Refer Setup 9)

17. Call XDOBURSTREP from After report trigger, passing it current request_id

18. Ensure that srw.user_exit('FND SRWINIT') has been called from before report trigger

19. FTP the XX_MANAGERS.rdf againt to $<Custom Location>/reports/US

20. Run the report, and you will see the Bursted Output in mailbox.

6. Migration of XML Publisher reports between instances.

In this article we will discuss in details the steps involved in the moving the XML Publisher / BI Publisher report components across instances.A   XML Publisher report development is a multi step process requiring a technical consultant to develop multiple files and register with XML Publisher Administrator. In addition to registering, consultant needs to integrate the report with oracle applications using Concurrent Program or OA Framework Self Service Application. Due to these complexity, its very important to understand the steps involved in moving the components of a XML Publisher report across instances.

a. Different Components consider for migration.

Data Definition

Data Template

Data Definition File.

Concurrent Program

Page 24: XML

b. Oracle Apps utilities for migration of XML Publisher components.

XML Publisher provides FNDLOAD and XDOLoader to migrate XML Publisher components.

FNDLOAD :  This tool is used to migrate Data Definition, Data Template definition and Concurrent Programs.

Download a particular data definitions and its corresponding Templates.FNDLOAD apps/<Password> 0 Y DOWNLOAD $XDO_TOP/patch/115/import/xdotmpl.lct targetldtfile.ldt XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME=XXX DATA_SOURCE_CODE=EMP_DD Upload the data definitions and its corresponding Templates to an instance.FNDLOAD apps//<Password> @db 0 Y UPLOAD $XDO_TOP/patch/115/import/xdotmpl.lct targetldtfile.ldt

XDOLoader :  This tool is used to download and upload physical files.

Option I File download Only Mode allows you to download files of the specified type (BURSTING_FILE, DATA_TEMPLATE,TEMPLATE,XML_SAMPLE,XML_SCHEMA) from a specified application short name. If you specify the data definition or template code, then it download the specified file type of that data definition or Template. But when i tested the command, it generated files of all type attached to a data definition in a specified application short name including the drv file.Download Syntax :

java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD \-DB_USERNAME <db_username> \-DB_PASSWORD <db_password> \-JDBC_CONNECTION <jdbc_con_string> \-LOB_TYPE <lob_type> \-APPS_SHORT_NAME <application_short_name> \-LOB_CODE <lob_code> \-LANGUAGE <language> \-TERRITORY <territory> \-LOG_FILE <log file>Uploading Physical Files

Syntax :java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \ -DB_USERNAME <db_username> \-DB_PASSWORD <db_password> \-JDBC_CONNECTION <jdbc_con_string> \-LOB_TYPE <lob_type> \-APPS_SHORT_NAME <application_short_name> \-LOB_CODE <lob_code> \-LANGUAGE <language> \-TERRITORY <territory> \-XDO_FILE_TYPE <xdo_file_type> \-NLS_LANG <NLS_LANG> \-FILE_CONTENT_TYPE <file_content_type> \-FILE_NAME <file_name> \-OWNER <owner> \-CUSTOM_MODE [FORCE|NOFORCE] \-LOG_FILE <log file>

Uploading Physical Files

Syntax :java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \ -DB_USERNAME <db_username> \-DB_PASSWORD <db_password> \-JDBC_CONNECTION <jdbc_con_string> \-LOB_TYPE <lob_type> \-APPS_SHORT_NAME <application_short_name> \-LOB_CODE <lob_code> \-LANGUAGE <language> \-TERRITORY <territory> \-XDO_FILE_TYPE <xdo_file_type> \

Page 25: XML

-NLS_LANG <NLS_LANG> \-FILE_CONTENT_TYPE <file_content_type> \-FILE_NAME <file_name> \-OWNER <owner> \-CUSTOM_MODE [FORCE|NOFORCE] \-LOG_FILE <log file>JDBC_CONNECTION : HOST:PORT:SIDLOB_TYPE : TEMPLATE , XML_SCHEMA, XML_SAMPLE

Option IIFile Download and LDT/DRVX Generation Mode allows you to download all the files (BURSTING_FILE,DATA_TEMPLATE,TEMPLATE,XML_SAMPLE,XML_SCHEMA) for a specified application short name. If you specify the data definition, then it will download all the files for the specified data definition. IN addition these files, it also generates a DRVX files, which has the upload script for each of the file downloaded.

Syntax : java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD \-DB_USERNAME <db_username> \-DB_PASSWORD <db_password> \-JDBC_CONNECTION <jdbc_conn_string> \-APPS_SHORT_NAME <application_short_name> \-DS_CODE (data source code> \-LCT_FILE <full path to lct file> \-LDT_FILE <ldt file> \-DRVX_FILE <drvx file> \-LOG_FILE <log file>Example :

1) Upload the RTF file.

java oracle.apps.xdo.oa.util.XDOLoader \UPLOAD \-DB_USERNAME apps \-DB_PASSWORD welcome \-JDBC_CONNECTION r12.com:1533:R124 \-LOB_TYPE TEMPLATE \-APPS_SHORT_NAME AMW \-LOB_CODE EMP_DD \-LANGUAGE en \-TERRITORY US \-NLS_LANG American_America.WE8ISO8859P1 \-XDO_FILE_TYPE RTF \-FILE_CONTENT_TYPE ’text/html’ \-FILE_NAME /tmp/psomanat/TEMPLATE_SOURCE_AMW_Emp_Template_en_US.rtf

7. Known Issues:

1. “Unable to find published output for this request”

Issue Root Cause:When we submit a concurrent program to generate XML Publisher / BI Publisher report using fnd_request.submit_request , the Template Name, Template Language and Format is not set in the concurrent program option. Hence when we try to view the output, we get the error "Unable to find published output for this request".Root Cause: When we submit a concurrent program to generate XML Publisher / BI Publisher report using fnd_request.submit_request , the Template Name, Template Language and Format is not set in the concurrent program option.  How to overcome this issue:Call fnd_request.add_layout before calling the fnd_request.submit.Signature:Fnd_request.add_layout (template_appl_name in varchar2,                           template_code     in varchar2,                           template_language in varchar2,                           template_territory in varchar2,                           output_format     in varchar2) return boolean is

For OAF  use addLayout method in oracle.apps.fnd.cp.request.ConcurrentRequest class.

Page 26: XML

Issue2:Issue Root Cause:Beginning post-processing of request 11180253 on node USNBKA030 at 02-OCT-2009 16:41:33.Post-processing of request 11180253 failed at 02-OCT-2009 16:48:34 with the error message:The concurrent manager has timed out waiting for the Output Post-processor to finish this request.Root Cause: By default a timeout will occur if it takes longer then 300 seconds (5 min.) for the XML Publisher engine to generate the output file. The Concurrent Request will complete with status Warning and the Request log file will contain Error Message B.How to overcome this issue:There are 2 new profiles options that can be used to control the timeouts. Depending on the error message, one of the following solutions needs to be implemented.

Profile Option: Concurrent: OPP Response TimeoutInternal Name: CONC_PP_RESPONSE_TIMEOUTDescription: Specifies the amount of time a manager waits for OPP to respond to its request for post processing.

Profile Option: Concurrent: OPP Process TimeoutInternal Name: CONC_PP_PROCESS_TIMEOUTDescription: Specifies the amount of time the manager waits for the OPP to actually process the request.

8. Enhancements

i. How to generate XML outputs in different Languages based on the user preference?

Solution:

Page 27: XML

While defining the Templates, We can attach templates for different Language and territory combination in according to the needed user preference values.

ii. How  to set Background color for each alternate row?

Solution:                  This below sample code is used to set the background of the alternative rows in light silver                    color. This code has to be added in the row first property as shown in the screen shot.                                                          <?if@row:position() mod 2=0?><xsl:attribute name="background-                                               color"xdofo:ctx="incontext">Needed Colour </xsl:attribute>

Page 28: XML

    

iii. How to add sorting condition in the template?

The records can be sorted by by particular field. It can be done by setting by the row level property as shown in the screen shot for a particular group of data.<?sort:field_name?>

Page 29: XML

iv. How to eliminate zero amount lines ?

              Based on the field data value (whether it holds zero or non-zero), we can restrict the data to               display or not in the output file.

            By defining the condition in row level property of the particular group of data as shown in the                          below screen shot.

<?if field_value > 0?>

Page 30: XML

v. How to define number formats?

Page 31: XML

            We can define the number formats in the field value as shown in the below screen shot.

vi. How to make titles to repeat on each page?

We can use the table property to make the titles to repeat on each pages as shown below.

Page 32: XML

  

9. Reference Documents

http://www.oracle.com/technology/products/xml-publisher/xmlpdocs.html