oracle concurrent program xml design white pater

19
XML Publisher and Concurrent Manager Integration An Oracle White Paper July 2004

Upload: rao-tari

Post on 12-Apr-2015

31 views

Category:

Documents


0 download

DESCRIPTION

how to link XML template to conc. request

TRANSCRIPT

Page 1: Oracle Concurrent Program XML Design white pater

XML Publisher and Concurrent Manager Integration

An Oracle White Paper July 2004

Page 2: Oracle Concurrent Program XML Design white pater

XML Publisher and Concurrent Manager Integration

EXECUTIVE SUMMARY ................................................................................................ 1 INTRODUCTION.............................................................................................................. 1

Process Overview............................................................................................................. 2 SET UP THE RESPONSIBILITY AND REQUEST GROUP ................................ 3

Responsibility Assignment.............................................................................................. 3 Add the XML Report Publisher Program to Request Groups................................. 3 Register the Report as a Data Definition with XML Publisher................................ 5 Create a Template............................................................................................................. 5

RTF Templates............................................................................................................. 6 PDF Templates ............................................................................................................ 9

Register the Template in the Template Manager ...................................................... 10 Publishing ........................................................................................................................ 12

Set up the Report to Generate XML Output........................................................ 12 Submit the E-Business Suite Report....................................................................... 12 Submit the XML Report Publisher Program ........................................................ 13

TROUBLESHOOTING .................................................................................................. 15 Empty LOV in the XML Report Publisher concurrent request Parameters window ........................................................................................................................ 15 Unable to view final PDF output............................................................................ 15

CONCLUSION.................................................................................................................. 16

ii

Page 3: Oracle Concurrent Program XML Design white pater

XML Publisher and Concurrent Manager Integration

EXECUTIVE SUMMARY Until now, customers could rely on the powerful data extraction features of their Oracle E-Business Suite reports, but could not present this data in visually appealing and customized formats. Customers therefore had to rely on expensive third party solutions to create publishable documents such as invoices, purchase orders, sales orders, contracts, marketing material, and financial reports.

Oracle XML Publisher is a new java-based product available within the technology stack of the E-Business Suite. It provides a template-based, easy-to-use publishing solution based on standard, well-known technologies and tools so users can quickly take advantage of it to develop and maintain report formats.

XML Publisher technology is based on the W3C XSL-FO standard to transform XML data into an FO object. This contains both data and formatting information that can then be transformed into an output format such as PDF.

Utilizing a set of familiar desktop tools such as Adobe Acrobat and Microsoft Word, users can create and maintain their own report formats based on E-Business Suite-delivered XML data extracts. Users can also obtain third party provided PDF forms (for example, government tax forms) and merge XML data from E-Business Suite products to fill the forms with the required data prior to printing.

At report runtime these template formats are applied to the XML data to generate rich, visually appealing report outputs in a PDF format.

INTRODUCTION The flexibility of XML Publisher is a result of the separation of the presentation of the report from its data structure. The collection of the data is still handled by the E-Business Suite, but now you can design and control how the report outputs will be presented in separate template files. At runtime, XML Publisher merges your designed template files with the report data to create rich, published documents in PDF that can support colors, images, font styles, headers and footers, and countless other formatting options.

While you use your own desktop tools to design your templates, XML Publisher provides the Template Manager to register and maintain report templates and their

XML Publisher and Concurrent Manager Integration Page 1

Page 4: Oracle Concurrent Program XML Design white pater

data sources. Once both have been registered, use the XML Publisher concurrent program to merge the template and its data source to create the customized report.

Process Overview After applying the XML Publisher patch, perform the following steps to create customized E-Business Suite reports:

1. Set up the XML Publisher responsibility and add the XML Report Publisher request to a request group (or groups).

2. Register the E-Business Suite report as a Data Definition with XML Publisher.

3. Design a template.

4. Register the template in the Template Manager.

5. Set the E-Business Suite report to generate XML output.

6. Run the E-Business Suite report to obtain the XML data file.

7. Run the XML Report Publisher request to merge the data with the template.

XML Publisher and Concurrent Manager Integration Page 2

Page 5: Oracle Concurrent Program XML Design white pater

SET UP THE RESPONSIBILITY AND REQUEST GROUP XML Publisher provides a responsibility and a concurrent program that require set up in the E-Business Suite.

Responsibility Assignment The XML Publisher Administrator responsibility allows access to the Template Manager. Assign the responsibility to the appropriate users as follows:

1. From the System Administrator responsibility, navigate to the Users form. Navigation path: Security > User > Define

2. In the Responsibilities region, select XML Publisher Administrator from the Responsibility list of values.

Adding the XML Publisher Administrator responsibility to a User

Add the XML Report Publisher Program to Request Groups Add the “XML Report Publisher” program to the appropriate request group depending on what concurrent program is to be published and which responsibility is being used. The XML Report Publisher program should be added to the request groups that the base programs reside in.

For example, to publish the AR Customer Listing – Summary report (RAXCUS), the XML Report Publisher program must be added to the Receivables All request group.

To add the XML Report Publisher program to a request group:

XML Publisher and Concurrent Manager Integration Page 3

Page 6: Oracle Concurrent Program XML Design white pater

1. From the System Administrator responsibility, navigate to the Request Groups form. Navigation path: Security > Responsibility > Request

2. Query the request group.

3. Add XML Report Publisher as a Program.

Adding the XML Report Publisher program to a Request Group

XML Publisher and Concurrent Manager Integration Page 4

Page 7: Oracle Concurrent Program XML Design white pater

Register the Report as a Data Definition with XML Publisher XML Publisher provides a Template Manager to register your report data definitions and templates. Register the report data definition in the Template Manager to make the data source available to XML Publisher for use with the designed templates.

To register a Data Definition:

1. From the XML Publisher Administrator responsibility, navigate to the Create Data Definition page. Navigation path: Data Definitions > Create Data Definition.

2. Enter the required fields. The data definition Code must match the concurrent program’s short name. At runtime this allows the XML Report Publisher program to provide a list of reports that can be published; that is, those that have been registered as data definitions with XML Publisher and the list of appropriate templates for those reports.

For this example, the Customer Listing – Summary report short name is “RAXCUS”, therefore the data definition Code must be “RAXCUS” also.

For a complete description of the fields required to register your data definition, see the XML Publisher User’s Guide.

Registering the concurrent program as a Data Definition in the Template Manager

Create a Template Templates can be in rich text format (RTF), designed in Microsoft Word, or Portable Document Format (PDF), designed in Adobe Acrobat.

XML Publisher and Concurrent Manager Integration Page 5

Page 8: Oracle Concurrent Program XML Design white pater

RTF Templates

RTF Templates are produced in MS Word. There are two methods described in the XML Publisher User’s Guide. From an end user’s point of view, the form field method is more aesthetically pleasing and makes cosmetic changes to the report very straightforward; that is, you do not need to worry about the technical aspects of the template. The template shown below uses the “Form Field” method:

Using the MS Word Form Field feature to insert XML Publisher syntax into a template

The key to RTF templates is the use of the following components:

• Tables to establish precise placement of fields

• “for-each” groups to define repeating fields in the report

• Tags of the form <?FIELD_NAME?> to map elements from the report’s XML data file to the field in the designed template.

Note: For complete descriptions of these components and how to use them, see the XML Publisher User’s Guide.

The <?for:each:G_SETUP?> tag shown below defines the table row as a group of repeating elements. The row will therefore be repeated for each occurrence of the G_SETUP element in the XML file.

XML Publisher and Concurrent Manager Integration Page 6

Page 9: Oracle Concurrent Program XML Design white pater

Using the MS Word form field feature to define a “group”

The XML element tag name CUSTOMER_NAME is inserted for the Customer Field. This maps the template field to the XML data field.

Using the MS Word form field feature to map the XML element to the template field

XML Publisher and Concurrent Manager Integration Page 7

Page 10: Oracle Concurrent Program XML Design white pater

The full template and XML report output are shown in the diagram below:

XML Publisher and Concurrent Manager Integration Page 8

Page 11: Oracle Concurrent Program XML Design white pater

Each group (for example G_SETUP and G_MAIN) is typically placed in a nested table. Form fields are used to hide the <?for-each:<grp_name>?> tag used to loop through the repeating data.

PDF Templates

The VETS report template shown below is a PDF document. It was created by taking the VETS template from a government Website. In many cases these third party templates already contain named Adobe form fields embedded in the document:

Sample fields from the VETS PDF template

Rather than modify the names already provided, XML Publisher provides a mapping facility to map these fields to the XML elements in your E-Business Suite data. Mapping is performed when you register the template in the Template Manager.

For those PDF templates that do not contain fields, you must use the full Adobe Acrobat product to add the fields.

You have two options when creating the form fields in Adobe:

1. Create the fields with your own “friendly” names. If you choose this option, you must map them to the XML elements in your E-Business Suite report’s XML file.

2. Create fields with the same names as the XML elements in your E-Business Suite report’s XML file. For this option mapping is not required.

The final component is the XSD file, which is used to validate and describe the XML file. The XSD is only required for PDF templates that require mapping. Below is an example of an XSD file: <?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="AF_SRWINIT"> <xs:complexType /> </xs:element> <xs:element name="AF_SRWINIT1"> <xs:complexType />

XML Publisher and Concurrent Manager Integration Page 9

Page 12: Oracle Concurrent Program XML Design white pater

</xs:element> <xs:element name="APPLICATION_NAME"> <xs:complexType mixed="true" /> </xs:element> <xs:element name="BREAK"> <xs:complexType> <xs:sequence> <xs:element ref="USER_NAME" minOccurs="1" maxOccurs="1" /> <xs:element ref="SECURITY_GROUP_NAME" minOccurs="1" maxOccurs="1" /> <xs:element ref="LIST_G_RESPS" minOccurs="1" maxOccurs="1" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="END_DATE"> <xs:complexType mixed="true" /> </xs:element> <xs:element name="FNDSCURS"> <xs:complexType> <xs:sequence> <xs:element ref="LIST_OSAF_FIRST_QUERY" minOccurs="1" maxOccurs="1" /> </xs:sequence> </xs:complexType> </xs:element>

Generating an XSD File

There are several XML Utilities available on the Web to generate an XSD file. XML Publisher will provide a utility in its next release (XML Publisher 5.0).

Register the Template in the Template Manager From the XML Publisher Administrator responsibility, navigate to the Create Template page. Navigation path: Templates > Create Template.

When you create your template, you register it against an existing Data Definition. At publishing time, XML Publisher will present you with the list of available templates that have been registered for the Data Definition. In this example, we selected the Sample: Customer Listing data definition that we created in a previous step.

Upload the RTF or PDF template file and select the language and territory.

XML Publisher and Concurrent Manager Integration Page 10

Page 13: Oracle Concurrent Program XML Design white pater

Registering a template in the Template Manager

You can upload multiple templates for different language/territory combinations.

For PDF templates, the Template Manager provides the option to enable mapping of the template fields to the data. The mapping page presents you with a list of the template field names and a drop down list of the data source field names from which to choose the appropriate data element.

XML Publisher’s Mapping tool

For further information on the Template Manager and how to create PDF and RTF templates please refer to the XML Publisher User’s Guide.

XML Publisher and Concurrent Manager Integration Page 11

Page 14: Oracle Concurrent Program XML Design white pater

Publishing XML Publisher needs XML data to publish. Oracle Reports 6i supports XML as an output and can be achieved very simply by updating the concurrent program definition.

Set up the Report to Generate XML Output

1. From the System Administrator responsibility, navigate to the Concurrent Programs form. Navigation Path: Concurrent > Program > Define.

2. Query the report you wish to publish. The report must be able to generate XML. Oracle Reports 6i supports XML output.

3. In the Output region, select XML from the Format drop down list.

Setting the Customer Listing-Summary Report to generate XML

Submit the E-Business Suite Report

From the appropriate responsibility, use the Submit Request form to run the E-Business Suite report. The request will generate an XML file.

XML Publisher and Concurrent Manager Integration Page 12

Page 15: Oracle Concurrent Program XML Design white pater

Submitting the Customer Listing – Summary Report

Submit the XML Report Publisher Program

Use the Submit Request form to run the XML Report Publisher program. You will be prompted for the following three parameters:

1. Report Request – the LOV will contain a list of requests that:

a. Have produced XML

b. Have been run by the same user or responsibility

2. Report Template – the LOV will contain a list of available templates that are registered with this data definition in the Template Manager.

3. Template Locale – the LOV will contain the language/territory combinations for which templates have been registered.

XML Publisher and Concurrent Manager Integration Page 13

Page 16: Oracle Concurrent Program XML Design white pater

Submitting the XML Report Publisher Program

Once the request has been submitted, the XML Publisher Report is renamed to match the E-Business Suite report name. In this example it is renamed to “Customer Listing – Summary (XML Report Publisher)”.

The final output is a visually appealing PDF report.

XML Publisher and Concurrent Manager Integration Page 14

Page 17: Oracle Concurrent Program XML Design white pater

The report can be printed from the client, or directly from the E-Business Suite using PASTA.

TROUBLESHOOTING Following are possible errors and the steps to resolve them:

Empty LOV in the XML Report Publisher concurrent request Parameters window

Error Condition: While submitting the XML Report Publisher request the Parameters window invokes the error “No entries found for List of Values.”

Solution: Set the profile option “Concurrent:Report Access Level” to “User” or “Responsibility”.

For information on setting profile options, see the Oracle Applications System Administrator’s Guide.

Unable to view final PDF output

Error Condition: You select the View Output button from the Requests window, and you receive the Adobe Reader error: “Adobe Reader could not open <your file> because it is either not a supported file type or because the file has been corrupted.”

Solution: This is a Microsoft Internet Explorer issue. From the Internet Explorer menu bar select Tools > Internet Options… to launch the Internet Options dialog box. On the General tab, in the Temporary Internet Files region, select the

XML Publisher and Concurrent Manager Integration Page 15

Page 18: Oracle Concurrent Program XML Design white pater

Settings button. In the Settings dialog box choose “Automatically” under “Check for newer versions of stored pages”.

CONCLUSION Using XML Publisher, customers can now leverage the powerful data reporting features of the E-Business Suite with the easy-to-use formatting features of their existing desktop applications to create rich, visually appealing published documents without having to rely on third-party solutions.

XML Publisher and Concurrent Manager Integration Page 16

Page 19: Oracle Concurrent Program XML Design white pater

XML Publisher and Concurrent Manager Integration June 2004 Author: Oracle Corporation Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 www.oracle.com Oracle Corporation provides the software that powers the Internet. Oracle is a registered trademark of Oracle Corporation. Various product and service names referenced herein may be trademarks of Oracle Corporation. All other product and service names mentioned may be trademarks of their respective owners. Copyright © 2002 Oracle Corporation All rights reserved.