Pages

Tuesday 20 November 2012

Migrating BI Publisher Files: using XDOLoader FNDLOAD

BI Publisher reports are typically made up of several components:

• Metadata that defines the details about the data definition and templates
• BI Publisher files i.e Data Definition Files/RTF Template/Bursting file etc
• RDF files in case of reports based BI Files
• Concurrent programs to run the report.

In Order to move the entire definition of the BI Publisher report from one instance to other you need to move each of the components described above. The tools namely XDOLoader and FNDLOAD are used to migrate these files across instances.

You can use the following commands to download :
Metadata:
FNDLOAD apps/****0 Y DOWNLOAD $XDO_TOP/patch/115/import/xdotmpl.lct XXJW_ARDLP_NON_SRS.ldt XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME=AR DATA_SOURCE_CODE=ARDLP_NON_SRS

BI Publisher files i.e BI Publisher Data definition template/Bursting File/RTF Template for ARDLP_NON_SRS Data definition:

java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD \
-DB_USERNAME apps \
-DB_PASSWORD ***** \
-JDBC_CONNECTION db_server:db_port:db_sid \
-APPS_SHORT_NAME AR \
-LCT_FILE ${XDO_TOP}/patch/115/import/xdotmpl.lct \
-DS_CODE ARDLP_NON_SRS

Copy the RFD file if any from the instance directly

Download the concurrent program using:
FNDLOAD apps/**** 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XX_ARDLP_NON_SRS.ldt PROGRAM CONCURRENT_PROGRAM_NAME="ARDLP_NON_SRS"

Once the files have all been downloaded you need to take them to the middle tier of another instance and upload them back. This can be done using the following commands:

Metadata:

FNDLOAD apps/****0 Y UPLOAD $XDO_TOP/patch/115/import/xdotmpl.lct XXJW_ARDLP_NON_SRS.ldt

• Upload each of the xml publisher files using commands below:

o Bursting File:
java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \ -DB_USERNAME apps \ -DB_PASSWORD **** \ -JDBC_CONNECTION db_server:db_port:instance_sid \ -LOB_TYPE BURSTING_FILE \ -APPS_SHORT_NAME AR \ -LOB_CODE ARDLP_NON_SRS \ -LANGUAGE en \ -TERRITORY US \ -NLS_LANG American_America.WE8ISO8859P1 \ -XDO_FILE_TYPE XML-BURSTING-FILE \ -FILE_CONTENT_TYPE 'text/html' \ -FILE_NAME ./xmlpub/BURSTING_FILE_AR_ARDLP_NON_SRS.xml

o RTF Template:
java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \ -DB_USERNAME apps \ -DB_PASSWORD **** \ -JDBC_CONNECTION db_server:db_port:instance_sid \ -LOB_TYPE TEMPLATE_SOURCE \ -APPS_SHORT_NAME AR \ -LOB_CODE ARDLP_NON_SRS \ -LANGUAGE en \ -TERRITORY US \ -NLS_LANG American_America.WE8ISO8859P1 \ -XDO_FILE_TYPE RTF \ -FILE_CONTENT_TYPE 'text/html' \ -FILE_NAME ./xmlpub/TEMPLATE_SOURCE_AR_ARDLP_NON_SRS_en.rtf

o Data Definition Template:
java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \ -DB_USERNAME apps \ -DB_PASSWORD **** \ -JDBC_CONNECTION :: \ -LOB_TYPE DATA_TEMPLATE \ -APPS_SHORT_NAME AR \ -LOB_CODE ARDLP_NON_SRS \ -LANGUAGE en \ -TERRITORY US \ -NLS_LANG American_America\.WE8ISO8859P1 \ -XDO_FILE_TYPE XML-DATA-TEMPLATE \ -FILE_CONTENT_TYPE 'text/html' \ -FILE_NAME DATA_TEMPLATE.xml

• Copy the RFD file if any to the reports/US folder directly. If it is customised then copy to /reports/US and then create a soft link in /reports/US directory.

• Upload the concurrent program using:
FNDLOAD apps/**** 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct .ldt

XDOLoader : Wrapper Tool

The attached tool is a wrapper on top of XDOLoader. This is a convenience tool to scan all files in the directory from which the command is run and uploads them to the database.
Download here (https://sites.google.com/a/applikast.net/applikast/file-cabinet/xdoload.pl?attredirects=0&d=1)
Also create a file called install.txt in your installation directory with the following contents and replace with the appropriate values:

db_sid=mydb
db_port=1561
db_server=localhost

Ensure that each entry remains on a different line in the text file. It is also important that the text file doesn't have any ^M characters.

Please note that the xml publisher files should follow the naming convention that is followed by XDOLoader DOWNLOAD. This helps the tool identify the Product short name/ lob code and the lob type as well. Once these are derived the only parameter that is needed to run xdoloader is the apps password that is passed as a commandline argument.
Sample files names when downloaded using XDOLoader download are:
BURSTING_FILE_AR_ARDLP_NON_SRS.xml
TEMPLATE_SOURCE_AR_ARDLP_NON_SRS_en.rtf

The file in the link needs to be downloaded and renamed as xdoload.pl

Once this is done you can run this in your unix shell as
perl xdoload.pl apps_pwd

You can put this in the /bin directory and create an alias so that you don't need to type perl xdoload.pl all the time.
eg. cp xdoload.pl $CUSTOM_TOP/bin
alias xdoload='perl $CUSTOM_TOP/bin/xdoload.pl'.
Then run the command using xdoload directly

This wrapper internally calls out to the XDOLoader class with the appropriate parameters as described in the post:
Migrating BI Publisher Files: using XDOLoader FNDLOAD
Please do leave your feedback and comments it will help me provide something more meaningful going forward. 

BI Publisher Data Template Not Displaying French Caracers

Symtoms:


On Oracle Applications 11i, R12.0.x
French characters are not displayed in the data file created from XML data template.
- Data extraction is happening through XML publisher Data Template. It is replacing French characters to Junk characters.
- Layout template shows proper French characters (i.e) labels are displayed properly, only dynamic data are not displayed.

Cause:


The output XML file is encoded with windows-1252 even if UTF-18 is specified in the data template definition. Because of this French characters are not displayed and inverted question mark is displayed.
Droping the encoding tag from XML takes the default encoding UTF-8.
This problem is caused by wrong character set taken by the XML Data processor engine.


Solution:


Download and review the readme and pre-requisites for patch - 6334584 ( you can find it on metalink or write to me and I'll send for you)

Or another Solution:


The characters require the French font files to be available within the Java Runtime Envirinment (JRE). The question mark is an indication the that the XML Publisher generator was not able to find the proper font file.
In Release 12, Copy the FRC*.ttf font files to the $OA_JRE_TOP/lib/fonts and $AF_JRE_TOP/lib/fonts directory.

You can find the FRC*.ttf font files in the $FND_TOP/resource folder.