Skip to Content
0
Former Member
Dec 12, 2006 at 12:13 AM

Convert SAP data to XML

33 Views

Hi friends

I am writing an interface program to generate an XML file.

I need to extract data from SAP system and generate the XML file as below.

I have gone through many threads but i didnt find one which can give the attributes in the XML file. If i found also i didnt find one which has header with two or more details and also they are generating few characters like <ts:.....xmlns etc>

can anyone post an example which gives the below format.

Thanks in advance

Satya

<?xml version="1.0"?>

http://schemas.abc.com/IS/1.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:xtc="http://schemas/abc/xt/core"

xmlns:xtd="http://schemas/abc/xt/datatypes" xmlns:dts="http://schemas/abc/xt/database" msgid="95efb764-db05-4b9f-a32a-e91e5f5c26ce">

<TransactionSetProperties null_representation="implicit" transaction_scope="entity">

<DateTimeFormats dateTimeFormat="2006-11-21 17:25:35"/>

<Source>SAP</Source>

<Message_Version>1.0.0</Message_Version>

<COM_Version>1.0.0</COM_Version>

<Application_Version>4.0.1 Build 1060</Application_Version>

</TransactionSetProperties>

http://schemas.abc.com/IS/1.0.0/Sample_Transaction" operation="INSERT" objectId="1886" type_name="Sample_Transaction">

<Sample_Transaction_ID>800000000000359</Sample_Transaction_ID>

<Transaction_Date>2005-02-05 09:39:54</Transaction_Date>

<Sample_Document_Value>7654</Sample_Document_Value>

<Employee_ID>96</Employee_ID>

<Sample_Transaction_Detail_List type_name="Sample_Transaction_Detail_List">

<Sample_Transaction_Detail operation="INSERT" objectId="1887" type_name="Sample_Transaction_Detail">

<Sample_Transaction_Detail_ID>800000000000360</Sample_Transaction_Detail_ID>

<Unit_Quantity>42</Unit_Quantity>

<Lot_Number>02</Lot_Number>

<Product_ID>168</Product_ID>

<Comment>Comment for Product 168 lot 02</Comment>

</Sample_Transaction_Detail>

</Sample_Transaction_Detail_List>

<Sample_Transaction_Detail operation="INSERT" objectId="1887" type_name="Sample_Transaction_Detail">

<Sample_Transaction_Detail_ID>800000000000361</Sample_Transaction_Detail_ID>

<Unit_Quantity>43</Unit_Quantity>

<Lot_Number>03</Lot_Number>

<Product_ID>169</Product_ID>

<Comment>Comment for Product 168 lot 02</Comment>

</Sample_Transaction_Detail>

</Sample_Transaction_Detail_List>

</xt:Sample_Transaction>

</ts:TransactionSet>