Vous êtes sur la page 1sur 10

Miscellaneous

Thanks to the wonderful XML Bursting article written by Prasad CP.


Following his explanations in this link , I have re-created the old tutorial for XML Publisher
Concurrent Program that was written in Year 2006.
Old tutorial has now been further enhanced to burst the report output to each email address in
the manager table.
This article simply shows the steps, however for detailed explanation of concepts bursting
control file etc, please read Prasad CP's articles, where he has explained each node of the
Bursting Control File.

You will also be able to download each of the component used in this demo.

Overview of steps in this article are

1.

Create table which will provide data for Bursting Report

2.

Create a report name XX_MANAGERS.rdf

3.

Run the report in preview mode in reports designer

4.

1 / 10
Miscellaneous

Add user parameters to this report and FTP to $AR_TOP/reports/US

5.

Register this report as concurrent program of type XML

6.

Add this report to Receivables group

7.

Run this report and save the xml file as xx_manager_output.xml

8.

Download & install XML Publisher desktop software latest version[as yet]

9.

Import xx_manager_output.xml in MS Word, and create default layout

10.

Save the default layout as rtf file MANAGER_XML_TEMPLATE.rtf

11.

Preview the report output within MS Word using XMLP Preview option

12.

Define data definition for the XMLP Report

13.

Prepare a simple bursting file, with help of XML xx_manager_output.xml

2 / 10
Miscellaneous

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

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 $AR_TOP/reports/US

20.

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

Ensure that you have the desired patches, as per your EBS Level, as mentioned in Prasad's
article.

3 / 10
Miscellaneous

select application_short_name, bug_number, to_char(creation_date,'DD-MON-YYYY


HH24:MI:SS') dated
from apps.ad_bugs
where bug_number = '5968876';

Run the below in non-apps schema [but for demo I am using APPS]
--Create the tables as below
create table xx_managers ( manager_no integer, manager_name varchar2(200) ) ;
insert into xx_managers ( manager_no, manager_name ) values ( 1000, 'Anil Passi') ;
insert into xx_managers ( manager_no, manager_name ) values ( 1001, 'Martin') ;
commit;
--add email address column to the table

commit;
Note:- To each record in the table, we will Burst the output via Email.
Please note, the intention is just to show the steps, and not necessary the breakdown of data
structure.

Hence only a simple single repeating frame based layout is being used.

In control file you need to specify the level at which data should be broken down while bursting.

Create a new report as shown below, and name it XX_MANAGERS

4 / 10
Miscellaneous

as
Add
shown
the user
Preview above.
the parameters[i.e.
report in reportsP_CONC_REQUEST_ID, P_RESPONSIBILITY_ID,
builder itself, by running P_USER_ID]
the same in Reports Builder

FTPto
Silly
you
CreateitXX_MANAGERS.rdf
is,
runbut
thefor
source
Concurrentdemo code]. to executable
I will use
program $AR_TOP/reports/US
standard Application [forgive as
for XMLP report, me,if but
it isI a
am makingreport
normal it easier for

Create a name
program concurrent
IMPORTANT:- both
Note as
program
XX_MANAGERS.
that foristhe
format executable. Note that I have kept the shortname and the
XML

Register
Now, makethis
theprogram with Receivables
report available request
to default request group.
set of “Receivables Manager” responsibility.
DECLARE
BEGIN
fnd_program.add_to_group(program_short_name => 'XX_MANAGERS'
,program_application => 'AR'
,request_group => 'Receivables All'
,group_application => 'AR');
COMMIT;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Object already exists');
END;
/

5 / 10
Miscellaneous

Login to receivables Manager, and Run the report from Submit Request window, as a
concurrent program submission.

Output will appear as shown below

IMPORTANT NOTE - Save the above XML outpur as xx_manager_output.xml on your PC.

Ensure that you have installed the latest version of XML Publisher desktop software

http://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=5887917

Open MS Word, you will see the menu’s as shown

6 / 10
Miscellaneous

Load the xml output of concurrent program into XMLP Desktop tool

Now, click on insert and click on Table/Form

Within Insert Table/Form, as shown below, drag the List G Manager No to Template
section

The default Layout is created as below

You can preview the output as below from within MS Word, using XMLP Desktop Preview
option

Preview is as shown below

Now, lets doLogon


Publisher. the real bit in attaching
to responsibility the Publisher
“XML Concurrent Program definition to XML
Administrator”.

Definition.
definition
Clickcreate
Lets
Name
Code
Start
Click :on
Date “Data
for
Effectively
XMLP.
Definition”
: :“Data
:XX_MANAGERS
XX_MANAGERS
Application Leave
“Apply” it towe are
Definition”
Receivables menu
saying
with
[Note:
default as
theabove…so
This
Sysdatethat output
values
is the that
ofname
the
in below
short wefields
Concurrent
can create
of the program
the XMLs
Concurrent becomes
source data
program] the data

option
As soon
Click asthe
on as
shown
you create
below.
button a Data Definition,
for uploading Bursting you will then
Control File be presented with Bursting Control File

Ensure that
Sample a bursting
definition file created
of bursting asfile
control below
is has been uploaded

Ensure that temp directory is set, for this, navigate to Administration in XML Publisher
Administrator

7 / 10
Miscellaneous

In this
we
Ensure case,
simply Ithe
amdown
thatnote setting
XML thepath
Temporary
Template
the to
fileuse itdirectory
is there to /tmp
in bursting
on the server.
controlIt file.
can be anywhere on server,

In
VERY
If theDate
Hence
FTP’ed
your
Create
Name
Code above
Application
Data
Start
Type
using in
concurrent
to /tmp
templateexample,
bursting
:IMPORTANT on
XX_MANAGERS
::MS-Word/
XX_MANAGERS
RTF : :Leave
Definition
browse as the
control
NOTE-
managers
DB Tier.
below,
Receivables
:and
XX_MANAGERS
andthis RTF
file,
default.
select In
by
[this
[short
thewe
run template
realwill
on life,
DB
uploading
is
RTF the
name
[the name
of
onefile[MANAGER_XML_TEMPLATE.rtf]
mention
this
Tier rtf
the
concof
thatthe
file
itself,
rtf
the wepath
will
then
file /tmp/MANAGER_XML_TEMPLATE.rtf
not beinintemplate
ensure
during
template]
program]created
file[MANAGER_XML_TEMPLATE.rtf] /tmpstep
that
prior rtfdirectory
template
creationis
fileinhas
12]that you /tmpbeen
had saved
Click on Apply, you will get the below record.

Your template
Run the belowhas now beenincreated
procedure APPS Schema
CREATE OR REPLACE PROCEDURE xx_submit_bursting(p_request_id IN INTEGER) AS
n_request_id NUMBER;
BEGIN
n_request_id := fnd_request.submit_request('XDO'
,'XDOBURSTREP'
,NULL
,NULL
,FALSE
,p_request_id
,'Y'
);
END xx_submit_bursting;
/

Ensure that the procedure has been created

8 / 10
Miscellaneous

Open report XX_MANAGERS in reports editor, and in the After Report Trigger & Before
Report Triggers, write code below

FUNCTION afterreport RETURN BOOLEAN IS


BEGIN
xx_submit_bursting(:p_conc_request_id);
RETURN(TRUE);
END;

FUNCTION beforereport RETURN BOOLEAN IS


BEGIN
srw.user_exit('FND SRWINIT');
RETURN(TRUE);
END;

Next, ftp the file XX_MANAGERS.rdf again to the $AR_TOP/reports/US. This is so, because,
now we are calling the bursting process from the After Report Trigger

Run the XX_MANAGERS as below, this will submit the Bursting process too.

9 / 10
Miscellaneous

I can now see the emails in my inbox, as below

First email is as shown below

Second email is as shown below

Downloads
The rdf file can be downloaded from here
Click here to download bursting control file in this example
Click here to download xml output of concurrent program
Click here to download rtf file used in this example

10 / 10

Vous aimerez peut-être aussi