Monday 31 August 2015

CREATE THE DATA DEFINITION TEMPLATE IN XML PUBLISHER

Create the data definition template

<?xml version="1.0" encoding="WINDOWS-1252" ?><dataTemplate name="ABINVDATA" description="JM Inventory Data" defaultPackage="AB_BURSTING_CP_SUB_PKG"  Version="1.0">

<dataQuery>
 
 <sqlStatement name="Q_AB_INV_DET">
  <![CDATA[

 select CREATION_DATE,SEGMENT1,SEGMENT2,DESCRIPTION from mtl_system_items where attribute15='900' and creation_date>='01-MAY-13' and segment2!='PB'and inventory_item_id not in (select inventory_item_id from mtl_system_items where attribute15='900' and creation_date>='01-MAY-13' and  segment2!='PB' and organization_id<>5) and inventory_item_status_code='Active' order by creation_date,segment2,segment1

]]>
</sqlStatement>
</dataQuery>
<dataStructure>

<group name="G_AB_INV_DET" source="Q_AB_INV_DET">
<element name="CREATION_DATE"   value="CREATION_DATE" />
<element name="SEGMENT1"   value="SEGMENT1" />
<element name="SEGMENT2"   value="SEGMENT2" />
<element name="DESCRIPTION"   value="DESCRIPTION" />
    </group>
</dataStructure>
<dataTrigger name="afterReport" source="AB_BURSTING_CP_SUB_PKG.AfterReport()"/>

</dataTemplate>

Save the file with name ABINVDATA.xml

-------------------------------------------------------------------------------------------------------


 Create data definition in xml publisher and attach the data definition template to the data definition

Navigation: XML Publisher Administrator -> Data Definitions -> Create Data Definition
---------------------------------------------------------------------------------------------------------
Create Concurrent Program to generate the Data XML output.
Navigation: System Administrator-> Concurrent-> Program->Define

AND THEIR EXECUTABLE NAME AS "XDODTEXE"



Assignment of concurrent program to responsibility

Navigation: System Administrator-> Security-> Responsibility->Request

Creation of RTF from msword.
attach the RTF to the program from "data template"

Creation of Control file for bursting.
<?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="/ABINVDATA/LIST_G_AB_BOM_RWO">
<xapi:delivery>
<xapi:email id="123" server="mail3.abc.com" port="25" from="abc.123@gmail.com" reply-to="abc.123@gmail.com">
<xapi:message id="123" to="xx.aa@yahoo.com,yy.aa@yahoo.com" cc="xx.aa@yahoo.com,yy.aa@yahoo.com"
attachment="true" content-type="html/text" subject="control file of inv data">

Hello,

Please find the attached latest “control file of inv data” spread sheet.


Thanks,
xyz.

</xapi:message>
</xapi:email>
</xapi:delivery>
<xapi:document output="ABINVDATA.xls" output-type="excel" delivery="123">
<xapi:template type="rtf" location="/usr/tmp/ABINVDATA.rtf" />
</xapi:document>
</xapi:request>

</xapi:requestset>

save the file as control.xml

No comments:

Post a Comment