<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ABAP to XML in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-to-xml/m-p/693868#M31294</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
  &lt;P&gt;I have to create XML file using ABAP (internal table to xml ). I crate structure and map with transformation tool using tcode XSLT_TOOL . I can download XML file without any issue. but I need to pass value for the root element. I was try to pass different way but its not working. I have to pass " linkey, Action and Type" .those are variable . &amp;lt;Vendor linkey=" " Action=" " type=" "&amp;gt;. &lt;/P&gt;
  &lt;P&gt;If any one can help me about this it will be grate.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-16"?&amp;gt;
-&amp;lt;APVend Companycode=""&amp;gt;
-&amp;lt;Vendor linkey=" " Action=" " type=" "&amp;gt;
&amp;lt;idfAPVendorKey&amp;gt;9230000011&amp;lt;/idfAPVendorKey&amp;gt;
&amp;lt;idfComment/&amp;gt;
&amp;lt;idfCurrLineUpSeq/&amp;gt;
&amp;lt;idfDatePromisedOffset/&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 29 Jun 2018 21:53:41 GMT</pubDate>
    <dc:creator>Nawanandana</dc:creator>
    <dc:date>2018-06-29T21:53:41Z</dc:date>
    <item>
      <title>ABAP to XML</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-to-xml/m-p/693868#M31294</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
  &lt;P&gt;I have to create XML file using ABAP (internal table to xml ). I crate structure and map with transformation tool using tcode XSLT_TOOL . I can download XML file without any issue. but I need to pass value for the root element. I was try to pass different way but its not working. I have to pass " linkey, Action and Type" .those are variable . &amp;lt;Vendor linkey=" " Action=" " type=" "&amp;gt;. &lt;/P&gt;
  &lt;P&gt;If any one can help me about this it will be grate.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-16"?&amp;gt;
-&amp;lt;APVend Companycode=""&amp;gt;
-&amp;lt;Vendor linkey=" " Action=" " type=" "&amp;gt;
&amp;lt;idfAPVendorKey&amp;gt;9230000011&amp;lt;/idfAPVendorKey&amp;gt;
&amp;lt;idfComment/&amp;gt;
&amp;lt;idfCurrLineUpSeq/&amp;gt;
&amp;lt;idfDatePromisedOffset/&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Jun 2018 21:53:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-to-xml/m-p/693868#M31294</guid>
      <dc:creator>Nawanandana</dc:creator>
      <dc:date>2018-06-29T21:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP to XML</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-to-xml/m-p/693869#M31295</link>
      <description>&lt;P&gt;You can create template in transformation,when call transformation you pass the itab to that template something like this (You can read more about transformation by push F1 on TRANSFORM statement):&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;In ABAP:&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;CALL TRANSFORMATION ZXXX
   SOURCE source = itab 
   RESULT xml result.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;In Transformation:&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;?sap.transform simple?&amp;gt;&amp;lt;tt:transform xmlns:tt="http://www.sap.com/transformation-templates"&amp;gt;  
  &amp;lt;tt:root name="SOURCE"/&amp;gt;  
  &amp;lt;tt:template&amp;gt;  
    &amp;lt;tt:loop name="b" ref=".SOURCE"&amp;gt; 
     &amp;lt;Vendor&amp;gt;  
      &amp;lt;tt:attribute name="linkey" value-ref="$b.linkey"/&amp;gt; 
     &amp;lt;/Vendor&amp;gt;  
    &amp;lt;/tt:loop&amp;gt;  
  &amp;lt;/tt:template&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Jul 2018 00:10:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-to-xml/m-p/693869#M31295</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2018-07-02T00:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP to XML</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-to-xml/m-p/693870#M31296</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
  &lt;P&gt;I found the solution how to create root attribute, you have to create structure and using XSLT_TOOL you can change the Element to attribute .&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;IMG src="http://sapintegrationhub.com/wp-content/uploads/2015/03/9-2.png" alt="XSLT_TOOL-change-element-type" /&gt;&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Nawa&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 01:40:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-to-xml/m-p/693870#M31296</guid>
      <dc:creator>Nawanandana</dc:creator>
      <dc:date>2018-07-02T01:40:52Z</dc:date>
    </item>
  </channel>
</rss>

