Busrting
Bursting
1. Create PLSQL Procedure
2. Register Executable
3. Register Concurrent Program
4. Create XML bursting control file
5. Register data definition
6. Create RTF template File
7. Upload RTF file to data template
--=================================================
CREATE OR REPLACE PROCEDURE APPS.XXSD_BURST_PROC (
RETCODE OUT VARCHAR2,
ERRBUF OUT VARCHAR2,
P_DEPT_NO IN VARCHAR2 )
AS
CURSOR C2 IS
select 'oracle.shooter@gmail.com' EMAIL,A.* from SCOTT.EMP A
--where deptno = :V_DEPT_NO;
where deptno = NVL(P_DEPT_NO,deptno);
BEGIN
fnd_file.put_line (fnd_file.output, '<?xml version="1.0"?>');
fnd_file.put_line (fnd_file.output, '<REPORT>');
FOR J IN C2 LOOP
fnd_file.put_line (fnd_file.output, '<R_LINES>');
fnd_file.put_line (fnd_file.output,'<EMAIL>' || J.EMAIL || '</EMAIL>' );
fnd_file.put_line (fnd_file.output,'<EMPNO>' || J.EMPNO || '</EMPNO>' );
fnd_file.put_line (fnd_file.output,'<ENAME>' || J.ENAME || '</ENAME>' );
fnd_file.put_line (fnd_file.output,'<JOB>' || J.JOB || '</JOB>' );
fnd_file.put_line (fnd_file.output,'<MGR>' || J.MGR || '</MGR>' );
fnd_file.put_line (fnd_file.output,'<HIREDATE>' || J.HIREDATE || '</HIREDATE>' );
fnd_file.put_line (fnd_file.output,'<SAL>' || J.SAL || '</SAL>' );
fnd_file.put_line (fnd_file.output,'<DEPTNO>' || J.DEPTNO || '</DEPTNO>' );
fnd_file.put_line (fnd_file.output, '</R_LINES>');
END LOOP;
fnd_file.put_line (fnd_file.output, '</REPORT>');
XXSD_SUBMIT_BURSTING_RPT(fnd_profile.VALUE ('CONC_REQUEST_ID'));
EXCEPTION WHEN OTHERS THEN fnd_file.put_line (fnd_file.LOG, 'Entered INTO exception' || SQLCODE || SQLERRM );
END;
--=============================================================
CREATE OR REPLACE PROCEDURE APPS.XXSD_SUBMIT_BURSTING_RPT(p_request_id IN INTEGER) AS
n_request_id NUMBER;
BEGIN
n_request_id := fnd_request.submit_request(
application => 'XDO'
,program => 'XDOBURSTREP'
,description => NULL
,start_time =>NULL
,sub_request =>FALSE
,argument1 =>'Y'
,argument2 =>p_request_id
);
END;
--==========================================================
select xtb.application_short_name||'.'||
xtb.template_code ||'.'||
xtb.default_language ||'.'||
xtb.default_territory
from apps.xdo_templates_b xtb
where xtb.template_code LIKE 'XXSD_BURST_PROC'
--===========================================================
<?xml version="1.0" encoding="UTF-8"?>
<xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" type="bursting">
<xapi:request select="/REPORT/R_LINES">
<xapi:delivery>
<xapi:email id="123" server="localhost" port="25" from="Info@max.com" reply-to ="Info@max.com">
<xapi:message id="123" to="${EMAIL}" attachment="true" subject="Burst Test Report">
Hi,
Please find attached Sales Vs Refund Report for today.
Thanks and Regards
Max Life
</xapi:message>
</xapi:email>
</xapi:delivery>
<xapi:document output="/home/stgapp/${EMPNO}.pdf" output-type="pdf" delivery="123,456" >
<xapi:template type="rtf" location="xdo://XXSD.XXSD_BURST_PROC.en.IN/?getSource=true"> </xapi:template>
</xapi:document>
</xapi:request>
</xapi:requestset>
--===============================================================
--=================================================================
1. Create PLSQL Procedure
2. Register Executable
3. Register Concurrent Program
4. Create XML bursting control file
5. Register data definition
6. Create RTF template File
7. Upload RTF file to data template
--=================================================
CREATE OR REPLACE PROCEDURE APPS.XXSD_BURST_PROC (
RETCODE OUT VARCHAR2,
ERRBUF OUT VARCHAR2,
P_DEPT_NO IN VARCHAR2 )
AS
CURSOR C2 IS
select 'oracle.shooter@gmail.com' EMAIL,A.* from SCOTT.EMP A
--where deptno = :V_DEPT_NO;
where deptno = NVL(P_DEPT_NO,deptno);
BEGIN
fnd_file.put_line (fnd_file.output, '<?xml version="1.0"?>');
fnd_file.put_line (fnd_file.output, '<REPORT>');
FOR J IN C2 LOOP
fnd_file.put_line (fnd_file.output, '<R_LINES>');
fnd_file.put_line (fnd_file.output,'<EMAIL>' || J.EMAIL || '</EMAIL>' );
fnd_file.put_line (fnd_file.output,'<EMPNO>' || J.EMPNO || '</EMPNO>' );
fnd_file.put_line (fnd_file.output,'<ENAME>' || J.ENAME || '</ENAME>' );
fnd_file.put_line (fnd_file.output,'<JOB>' || J.JOB || '</JOB>' );
fnd_file.put_line (fnd_file.output,'<MGR>' || J.MGR || '</MGR>' );
fnd_file.put_line (fnd_file.output,'<HIREDATE>' || J.HIREDATE || '</HIREDATE>' );
fnd_file.put_line (fnd_file.output,'<SAL>' || J.SAL || '</SAL>' );
fnd_file.put_line (fnd_file.output,'<DEPTNO>' || J.DEPTNO || '</DEPTNO>' );
fnd_file.put_line (fnd_file.output, '</R_LINES>');
END LOOP;
fnd_file.put_line (fnd_file.output, '</REPORT>');
XXSD_SUBMIT_BURSTING_RPT(fnd_profile.VALUE ('CONC_REQUEST_ID'));
EXCEPTION WHEN OTHERS THEN fnd_file.put_line (fnd_file.LOG, 'Entered INTO exception' || SQLCODE || SQLERRM );
END;
--=============================================================
CREATE OR REPLACE PROCEDURE APPS.XXSD_SUBMIT_BURSTING_RPT(p_request_id IN INTEGER) AS
n_request_id NUMBER;
BEGIN
n_request_id := fnd_request.submit_request(
application => 'XDO'
,program => 'XDOBURSTREP'
,description => NULL
,start_time =>NULL
,sub_request =>FALSE
,argument1 =>'Y'
,argument2 =>p_request_id
);
END;
--==========================================================
select xtb.application_short_name||'.'||
xtb.template_code ||'.'||
xtb.default_language ||'.'||
xtb.default_territory
from apps.xdo_templates_b xtb
where xtb.template_code LIKE 'XXSD_BURST_PROC'
<?xml version="1.0" encoding="UTF-8"?>
<xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" type="bursting">
<xapi:request select="/REPORT/R_LINES">
<xapi:delivery>
<xapi:email id="123" server="localhost" port="25" from="Info@max.com" reply-to ="Info@max.com">
<xapi:message id="123" to="${EMAIL}" attachment="true" subject="Burst Test Report">
Hi,
Please find attached Sales Vs Refund Report for today.
Thanks and Regards
Max Life
</xapi:message>
</xapi:email>
</xapi:delivery>
<xapi:document output="/home/stgapp/${EMPNO}.pdf" output-type="pdf" delivery="123,456" >
<xapi:template type="rtf" location="xdo://XXSD.XXSD_BURST_PROC.en.IN/?getSource=true"> </xapi:template>
</xapi:document>
</xapi:request>
</xapi:requestset>
--===============================================================
Email
|
Empno
|
Ename
|
Job
|
Mgr
|
Hiredate
|
Sal
|
Deptno
|
--=================================================================
Comments
Post a Comment