How_to_Guide_Developing_Oracle_BI_XML_Pu
How_to_Guide_Developing_Oracle_BI_XML_Pu
Yemi Onigbode
http://www.i‐oracle.com
Developing Oracle BI (XML) Publisher Reports in E‐Business Suite R12
1 - INTRODUCTION ...................................................................................................... 3
2 - WHAT IS ORACLE BI (XML) PUBLISHER? ................................................................... 4
BI Publisher or XML Publisher? ...................................................................................... 4
3 - WHY USE XML PUBLISHER ....................................................................................... 5
The issue with traditional standard Oracle reports .......................................................... 5
Some Issues ................................................................................................................ 5
The XML Publisher solution ........................................................................................... 6
4 - WHEN TO USE XML PUBLISHER ................................................................................ 7
5 - HOW XML PUBLISHER REPORTS WORKS................................................................... 8
The Process ................................................................................................................. 8
The Output Post Processor (OPP) .................................................................................. 9
6 - HOW THE REPORTS ARE DEVELOPED ......................................................................10
Define Requirements ...................................................................................................10
Create Data Template .................................................................................................10
Structure of the data template ..................................................................................11
Create the Concurrent program based on the data template...........................................12
Enter Parameters .....................................................................................................14
Add the report to the Report’s request group ................................................................14
Register the Report as a Data Definition in the Template Manager..................................15
Attach the data template file to the Template Manager...............................................16
Run the Report to extract the XML File .........................................................................16
Design Template .........................................................................................................17
Register the template in the Template Manager ............................................................19
Run the report ............................................................................................................20
7 - ENVIRONMENT SETUP ............................................................................................22
Profile Options ............................................................................................................22
Runtime properties......................................................................................................22
FO Processing and RTF Template Properties .................................................................24
RTF Template Properties .............................................................................................25
8 - POSSIBLE DEVELOPMENT ISSUES............................................................................26
Check the Log file details .............................................................................................26
Environment Issues.....................................................................................................28
Issue: .....................................................................................................................28
Solution: .................................................................................................................28
Coding Issues .............................................................................................................29
Solution ..................................................................................................................30
Output Post Processor (OPP) Issues .............................................................................31
Concurrent Requests complete with warning..............................................................31
Viewing the OPP log files ..........................................................................................31
The Output Post Processor is running but has not picked up the request......................33
The concurrent manager has timed out waiting for the Output Post-processor to finish
this request .............................................................................................................33
9 - IN A NUTSHELL ......................................................................................................36
10 - More Information ..................................................................................................37
About the Author ........................................................................................................37
The report-publishing framework in Oracle E-Business Suite (EBS) R12 has undergone a
major change, and consultants are facing some challenges in applying the new technology
stack. In this white paper I will address some issues that could be faced when implementing
Oracle BI (XML) Publisher as a report publishing solution, and some suggested solutions and
best practice guide in the implementation.
This is not a definitive guide, but it will assist the average implementer to successfully
implement a solid Oracle BI (XML) Publisher solution within Oracle EBS R12.
Notes area
2 - WHAT IS ORACLE BI (XML) PUBLISHER?
The Oracle BI Publisher was formerly called XML Publisher, and it is now part of Oracle’s
Business Intelligence Suite. However the name XML Publisher is still used within the E-
Business Suite (EBS), PeopleSoft Enterprise and JD Edwards E1. Oracle BI Publisher is also
available as a standalone product. This white paper looks at the implementation within EBS
R12, and will refer to “Oracle BI Publisher” as “XML Publisher” as implemented in EBS R12.
XML Publisher provides an opportunity for rapid report publishing, development and
maintenance. It is also possible to have multiple layouts in different languages for the same
data structure. Report output can be generated as Excel, Word, PDF and HTML at runtime.
The report layout can be developed in Rich Text Format (rtf), Portable Definition Format (pdf)
or eText format. The development of the report can be separated between the structure of
the data and the presentation of the layout.
Traditional Report Definition Files (rdf) are very difficult to maintain and have a high
development and customisation cost. The data logic, layout and translation are all in one file.
The output of the file is also displayed in a format that is not dynamic enough to be used for
further analysis in tools like spreadsheets.
Some Issues
Let us have a look at an assumed requirement to create an invoice in three languages in two
separate layouts. Such as, one layout for detailed invoice and another layout for summary
invoice with the same data. This requirement will require six different rdf files to be
developed. A small change in the layout would require amending all the six rdf files.
With XML Publisher, the same report would have required two rtf layout files and two XML
language translation files (XML Localization Interchange File Format - XLIFF). The change will
require slight changes to the layout files.
Another traditional issue is the layout presented by rdf outputs. In the diagram below, the
end user desires to display the extracted file as an Excel output. Due to the fixed format of
rdf, the report is not user-friendly for the requirements of the user.
Notes area
XML Publisher allows the development separation of data, layout and translation. This makes
it flexible to develop and easy to maintain. The design of the report can be delegated to
consultants who are familiar with the desktop tools for layout customisation such as Adobe
Acrobat and MS Word. The solution can also be developed rapidly. The output of the report
can be decided at runtime.
In this whitepaper, we will look at the steps required to create an XML Publisher solution that
will create and extract to Excel as displayed below.
XML Publisher is suited mainly for the following types of reports output:
Financial and business reports
Invoices, purchase orders, receipts, Sales Orders, Statements
Legal documents – Tax forms, Payslips, Cheques
Newsletters, Marketing documents
Notes area
5 - HOW XML PUBLISHER REPORTS WORKS
The Process
Concurrent processing uses the OPP to enforce post-processing actions for publishing
concurrent requests with XML Publisher. After the concurrent manager finishes running the
concurrent program, it will contact the OPP to apply the XML Publisher template and create
the final output.
The OPP runs as a multi-threaded service, and will start a new thread for each concurrent
request it processes. If all the OPP services have reached their respective maximum number
of threads, the requests waiting to be processed remain in a queue to be processed as soon
as threads become available. If no threads are available the concurrent program may
complete with a warning.
Notes area
6 - HOW THE REPORTS ARE DEVELOPED
Define Requirements
The Business Analyst and the Functional Consultant identifies the data requirements including
the layout of the data. The Functional Consultant produces a functional design document that
is passed on to the Technical Consultant for the technical design and development.
The XML Publisher data template is the method by which the request for data is
communicated 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 Technical Consultant identifies where the data is held in the tables, and writes the SQL
query to fetch the data. The SQL query is used in the data template to extract the data.
Tip: To convert an existing Oracle Standard Report to an XML Publisher Report you do not
need to create a data template.
Header – contains XML elements including: Doctype version, Data template tag and
Properties tag with property elements to support the XML output and Data Engine properties.
The parameters used in the concurrent program and lexicals used for flexfields
<parameters>
<parameter name="P_SEGMENT_NAME" dataType = "character"></parameter>
<parameter name="P_STRUCT_NUM" dataType = "number"></parameter>
<parameter name="P_CONC_REQUEST_ID" dataType = "number"
defaultValue="0"></parameter>
</parameters>
<lexicals>
</lexicals>
<![CDATA[
select
v.flex_value segval,
vt.description segdesc,
…
]]>
</sqlStatement>
</dataQuery>
More information on how to create the data template is found in XML Publisher -
Administration and Developer's Guide - http://download-
west.oracle.com/docs/cd/B40089_02/current/acrobat/120xdoig.pdf
The Concurrent Program name – use a naming convention for your custom programs
Designate "XDODTEXE" as the executable for your concurrent program. This is the
XML Publisher Java concurrent program that will execute your data template.
The Short Name that you assign to the program must match the Data Definition
Code that you assigned to the data template in the Template Manager. The XML
Publisher executable uses the short name of the program to locate the corresponding
data template in the Template Manager.
You can optionally set the Executable Options for the Java heap size during
execution. This may be necessary for generating reports with large outputs. For
example –Xmx1024m sets it to 1GB.
Select XML as the output format
More information on how to call the data template from a Concurrent Program can be found
in XML Publisher - Administration and Developer's Guide http://download-
west.oracle.com/docs/cd/B40089_02/current/acrobat/120xdoig.pdf
Notes area
Enter Parameters
Click on the Parameters button to create the parameters. Enter the parameters details; note
that the Token should match the Parameter name in the data template.
Assign the concurrent program to an appropriate Request Group for your users to run. When
your user submits the request, the Concurrent Manager executes the XML Publisher Data
Template Java concurrent program. The short name of the concurrent program is used to
locate the appropriate data template in the Template Manager.
When the data generation is complete, the Concurrent Manager's Output Post Processor
applies the layout template to the generated XML.
Creating the data definition maps the data with the template layout. You can have many
layouts mapped to one data definition.
Notes area
Design Template
The Technical Consultant or Report Designer uses the XML file to design the rtf template.
Mark-up tags are added to the document to prepare it for merging with the XML data. XML
Publisher recognizes the formatting features and converts them to XSL-FO. The template is
designed in a word processing tool such as MS Word.
Notes area
More information on how to create the layouts can be found in XML Publisher – Report
Designer’s Guide http://download-
west.oracle.com/docs/cd/B40089_02/current/acrobat/120xdorg.pdf
Notes area
The output
Notes area
7 - ENVIRONMENT SETUP
The following set up is required for the XML Publisher solution in Oracle EBS R12
Profile Options
Concurrent: OPP Process Timeout - This profile option specifies the amount of time the
OPP manager waits for the OPP to actually process the request.
Concurrent: OPP Response Timeout - This profile option specifies the amount of time an
OPP manager waits for the OPP to respond to its request for post processing.
Runtime properties
Enter the directory path for the temporary directory used by the FO Processor
when processing large files.
Notes area
This is required to avoid "Out of Memory" errors.
Tip: The Database Administrator should create a cron job that will delete these files on a
regular basis. Once the output is created, the files stored in this directory are no longer
required.
Use XML Publisher's XSLT processor - Controls XML Publisher's parser usage. If set to
True, XSLT will be parsed.
Enable scalable feature of XSLT processor - Controls the scalable feature of the XDO
parser. The property "Use XML Publisher's XSLT processor" must be set to "True" for this
property to be effective.
To further enhance performance when you set this property to True, it is recommended that
you set the property Extract attribute sets to "False". See RTF Template Properties below
Extract attribute sets - The RTF processor will automatically extract attribute sets within
the generated XSL-FO. The extracted sets are placed in an extra FO block, which can be
referenced. This improves processing performance and reduces file size.
Notes area
8 - POSSIBLE DEVELOPMENT ISSUES
From the view requests window, select the View Log button.
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
Executing request completion options...
+---------------------------------------------------------------------------+
Concurrent request completed successfully
Current system time is 18-NOV-2009 12:27:29
+---------------------------------------------------------------------------+
Environment Issues
Errors in the log file will provide a clue to the details of the issue. A common issue is the size
of the temp space allocated to XML Publisher
Issue:
java.sql.SQLException: ORA-01652: unable to extend temp segment by 128 in tablespace
TEMP
Solution:
The DBA needs to increase the temp space.
Check that the cron job required to delete the temp space is working. See the section on
Environment Setup to see how to setup the temp space.
Coding Issues
Most completed in error issues are coding issues and should have been detected during
development and testing.
+---------------------------------------------------------------------------+
General Ledger: Version : 12.0.0
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
Executing request completion options...
+---------------------------------------------------------------------------+
Concurrent request completed
Current system time is 19-NOV-2009 00:40:29
+---------------------------------------------------------------------------+
Solution
Refer to the development support team
In the above example there was an invalid identifier in the where clause.
where
vi.flex_value_set_id = :PVSETID
and vit.flex_value_id = vi.flex_value_id + 0
and vit.language = userenv ('LANG')
and ad.flex_value_set_id = :VSETID
and vd.parent_flex_value_low = vi.flex_value
and vd.enabled_flag = l1.lookup_code
and vdt.flex_value_id = vd.flex_value_id + 0
and vdt.language = userenv('LANG')
and l1.lookup_type = 'YES/NO'
Solutions:
Verify that the Output Post Processor is enabled and active.
If confirmed, retrieve the OPP log file.
Notes area
The log file can also be retrieved via the Oracle Application Manager.
The Error Log should be passed on to the developer or the DBA, depending on the type of
issue.
The Output Post Processor is running but has not picked up the request
By default a timeout will occur if it takes longer than 120 seconds (2 min.) for the Output
Post Processor to pick up the request from the Concurrent Manager process. In that case, the
Concurrent Request will complete with status Warning and the Request log file will contain
error message like below.
...
+————- 1) PUBLISH ————-+
The Output Post-processor is running but has not picked up this request. No further
attempts will be made to post-process this request, and the request will be marked with
Warning status.
Setting the profile option Concurrent: OPP Response Timeout to a higher value may be
necessary.
+————————————–+
…
Solutions:
Increase the value (in seconds) for the profile option ‘Concurrent:OPP Response
Timeout‘.
The concurrent manager has timed out waiting for the Output Post-processor to
finish this request
The concurrent manager process has successfully invoked the OPP but it a timeout is
encountered as the OPP takes too long to complete the job.
The time that this takes will depends on various elements such as:
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 like above.
Solutions:
Increase the value (in seconds) for the profile option ‘Concurrent: OPP Process
Timeout’.
Increase the Java heap size for the report
Setting the profile option Concurrent: OPP Response Timeout to a higher value may
be necessary. Set it to little higher value...
Set the temp dir for XMLP
Enable the scalability of the XSLT processor
Properties > FO Processing > Use XML Publisher’s XSLT processor / Enable scalable feature
of XSLT processor = true.
See the section on environment setup on how to perform the above. Setting the above
should resolve the issue.
If Error persists - Check the OPP log file for more information
Notes area
9 - IN A NUTSHELL
Yemi is an Oracle Financials Certified Trainer, Sun Certified Instructor and a Fellow of the
Association of Chartered Certified Accountants. He has a Bachelor of Science (Honours)
degree in Pure and Applied Mathematics. Yemi is also a technical writer on Accountancy and
IT issues. Yemi also presents at Accounting and IT seminars; He also motivates and mentors
young adults on career management and planning.
If you have any questions or feedback for Yemi please contact him on
[email protected]
http://uk.linkedin.com/in/yemionigbode