Log on to Oracle EBS using user having System Administrator responsibility to register the Oracle Report.
Creating Executable:
Create concurrent program for the executable:
Add the parameters for the Program:
Add the Concurrent Program to OM Concurrent Programs Request Set:
Go to Order Management Responsibility and run the request:
Change the output of the concurrent program to create the xml template file .rtf layout in ms word. Create data definition with Code same as the Concurrent Program Short Name:
Create Template for the Data definition and attached Template:
Run the Concurrent Program and Go to report builder open your existing report, go to report triggers open after report add the below code for bursting code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
FUNCTION AfterReport RETURN BOOLEAN
IS
v_sub_req NUMBER;
v_cp_description VARCHAR2(100);
c_cp_request_id CONSTANT NUMBER := :P_CONC_REQUEST_ID;
BEGIN
BEGIN
SELECT fcp.user_concurrent_program_name
INTO v_cp_description
FROM FND_CONCURRENT_REQUESTS fcr,
FND_CONCURRENT_PROGRAMS_VL fcp
WHERE fcr.concurrent_program_id = fcp.concurrent_program_id
AND fcr.request_id = c_cp_request_id;
EXCEPTION WHEN OTHERS THEN
v_cp_description := NULL;
END;
BEGIN
v_sub_req := fnd_request.submit_request(
application => 'XDO', -- application
program => 'XDOBURSTREP', -- Program
description=> v_cp_description, -- description
argument1=>'N' ,
argument2=> c_cp_request_id, -- argument1
argument3=> 'Yes' -- argument2
);
COMMIT;
IF v_sub_req <= 0
THEN
SRW.MESSAGE('206','Failed to submit Bursting XML Publisher Request for Request ID = '|| c_cp_request_id);
ELSE
SRW.MESSAGE('207','Submitted Bursting XML Publisher Request Request ID = ' || v_sub_req);
END IF;
EXCEPTION
WHEN OTHERS THEN
RAISE SRW.PROGRAM_ABORT;
END;
SRW.USER_EXIT('FND SRWEXIT');
RETURN (TRUE);
EXCEPTION
WHEN SRW.USER_EXIT_FAILURE
THEN
SRW.MESSAGE (1, 'Failed in AFTER REPORT TRIGGER');
RETURN (FALSE);
WHEN OTHERS
THEN
SRW.MESSAGE (1000, 'Failed in When Others' || SQLERRM);
END;
|
Compile the code the save the report.
Design XML Bursting control file, Below are the format of bursting control file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?xml version="1.0" encoding="UTF-8" ?>
<xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" type="bursting">
<xapi:globalData location="stream"/>
<xapi:request select="/XAOA/LIST_G_HEADER/G_HEADER">
<xapi:delivery>
<xapi:email id="123" server="mail.alloracleapps.com" port="25" from="admin@alloracleapps.com" >
<xapi:message id="123" to="test@alloracleapps.com" cc="admin@alloracleapps.com" attachment="true"
subject="Order Number ${ORDER_NUMBER}">
--------------------------------------------------------------------------------------------------------Hi,
Please review the attached Order ${ORDER_NUMBER}.
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.
Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than
the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
Regards
Admin
All Oracle Apps
</xapi:message>
</xapi:email>
</xapi:delivery>
<xapi:document output="XAOA_${ORDER_NUMBER}.pdf" output-type="pdf" delivery="123">
<xapi:template type="rtf" location="xdo://ONT.XAOASO.en.US/?getSource=true">
</xapi:template>
</xapi:document>
</xapi:request>
</xapi:requestset>
|
Goto XML Publisher Responsibility —> data definition —> Search for the data definition with data definition code or data definition and Attach your bursting control file at Bursting Control File Option.
Once done Run the program to get email with an attachment of the XML Template with splitting based on the Sales Order.
No comments:
Post a Comment