<?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 Re: Simple Transformation Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570518#M22237</link>
    <description>&lt;P&gt;Hello Sandra&lt;BR /&gt;I tryed with text, it looks like what I need, but there is no cr between the nodes ArticleNb and MatDesc&lt;BR /&gt;It's possible to make a line feed?&lt;BR /&gt;Thank you in advance, Daniel&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;        &amp;lt;StoreMaterial&amp;gt;
          &amp;lt;tt:loop name="data" ref="$line.data"&amp;gt;

            &amp;lt;tt:text&amp;gt;Material Name = "ArticleNb" Value="&amp;lt;/tt:text&amp;gt;
            &amp;lt;tt:value ref="articlenb"/&amp;gt;
            &amp;lt;tt:text&amp;gt;"&amp;lt;/tt:text&amp;gt;
            
            &amp;lt;tt:text&amp;gt;Material Name = "MatDesc" Value="&amp;lt;/tt:text&amp;gt;
            &amp;lt;tt:value ref="matdesc"/&amp;gt;
            &amp;lt;tt:text&amp;gt;"&amp;lt;/tt:text&amp;gt;

          &amp;lt;/tt:loop&amp;gt;
        &amp;lt;/StoreMaterial&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 08 Dec 2017 10:12:17 GMT</pubDate>
    <dc:creator>dmi</dc:creator>
    <dc:date>2017-12-08T10:12:17Z</dc:date>
    <item>
      <title>Simple Transformation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570516#M22235</link>
      <description>&lt;P&gt;hello &lt;/P&gt;
  &lt;P&gt;I got the requirement to export data from a sap table to a xml file. The xml file must be in the followed form:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;StoreMaterial&amp;gt;
  &amp;lt;Material Name="ArticleNb" Value="value from SAP"/&amp;gt;
  &amp;lt;Material Name="MatDesc" Value="value from SAP"/&amp;gt;
&amp;lt;/StoreMaterial&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;What is the correct syntax to create this node in one line:&lt;BR /&gt;&amp;lt;Material Name="ArticleNb" Value="value from SAP" /&amp;gt;&lt;/P&gt;
  &lt;P&gt;value from SAP is e.g. a material number&lt;/P&gt;
  &lt;P&gt;many thanks Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 06:15:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570516#M22235</guid>
      <dc:creator>dmi</dc:creator>
      <dc:date>2017-12-08T06:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570517#M22236</link>
      <description>&lt;P&gt;Did you try anything? What is the structure of your internal table?&lt;/P&gt;
  &lt;P&gt;Something like that:&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" xmlns:ddic="http://www.sap.com/abapxml/types/dictionary"&amp;gt;
  &amp;lt;tt:root name="ROOT"/&amp;gt;
  &amp;lt;tt:template&amp;gt;
    &amp;lt;XMLROOT&amp;gt;
      &amp;lt;tt:loop ref=".ROOT"&amp;gt;
        &amp;lt;StoreMaterial&amp;gt;
         &amp;lt;Material Name="ArticleNb"&amp;gt;
          &amp;lt;tt:attribute name="Value" value-ref="$ref.ARTICLENB"/&amp;gt;
          &amp;lt;/Material&amp;gt;
         &amp;lt;Material Name="MatDesc"&amp;gt;
          &amp;lt;tt:attribute name="Value" value-ref="$ref.MATDESC"/&amp;gt;
          &amp;lt;/Material&amp;gt;
        &amp;lt;/StoreMaterial&amp;gt;
      &amp;lt;/tt:loop&amp;gt;
    &amp;lt;/XMLROOT&amp;gt;
  &amp;lt;/tt:template&amp;gt;
&amp;lt;/tt:transform&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;?&lt;/P&gt;
  &lt;P&gt;EDIT 15 hours later: sorry, it was value-ref, not ref.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 08:17:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570517#M22236</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-12-08T08:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570518#M22237</link>
      <description>&lt;P&gt;Hello Sandra&lt;BR /&gt;I tryed with text, it looks like what I need, but there is no cr between the nodes ArticleNb and MatDesc&lt;BR /&gt;It's possible to make a line feed?&lt;BR /&gt;Thank you in advance, Daniel&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;        &amp;lt;StoreMaterial&amp;gt;
          &amp;lt;tt:loop name="data" ref="$line.data"&amp;gt;

            &amp;lt;tt:text&amp;gt;Material Name = "ArticleNb" Value="&amp;lt;/tt:text&amp;gt;
            &amp;lt;tt:value ref="articlenb"/&amp;gt;
            &amp;lt;tt:text&amp;gt;"&amp;lt;/tt:text&amp;gt;
            
            &amp;lt;tt:text&amp;gt;Material Name = "MatDesc" Value="&amp;lt;/tt:text&amp;gt;
            &amp;lt;tt:value ref="matdesc"/&amp;gt;
            &amp;lt;tt:text&amp;gt;"&amp;lt;/tt:text&amp;gt;

          &amp;lt;/tt:loop&amp;gt;
        &amp;lt;/StoreMaterial&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Dec 2017 10:12:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570518#M22237</guid>
      <dc:creator>dmi</dc:creator>
      <dc:date>2017-12-08T10:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570519#M22238</link>
      <description>&lt;P&gt;Now I found the solution - but???&lt;BR /&gt;The first Node "ArticleNb" is not correct, the next nodes are correct&lt;BR /&gt;If I delete the first Node "ArticleNb", the next nodes are not correct&lt;BR /&gt;I can't find out the reason, thanks for any help&lt;BR /&gt;Daniel&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;StoreMaterial&amp;gt;
  &amp;lt;tt:loop name="data" ref="$line.data"&amp;gt;
    &amp;lt;Material Value="ArticleNb"&amp;gt;        " display wrong
      &amp;lt;tt:attribute name="Name"&amp;gt;
        &amp;lt;tt:value ref="articlenb"/&amp;gt;
      &amp;lt;/tt:attribute&amp;gt;
    &amp;lt;/Material&amp;gt;
    &amp;lt;Material Name="ArticleNb"&amp;gt;         " display correct
      &amp;lt;tt:attribute name="Value"&amp;gt;
        &amp;lt;tt:value ref="articlenb"/&amp;gt;
      &amp;lt;/tt:attribute&amp;gt;
    &amp;lt;/Material&amp;gt;
    &amp;lt;Material Name="MatDesc"&amp;gt;          " display correct
      &amp;lt;tt:attribute name="Value"&amp;gt;
        &amp;lt;tt:value ref="matdesc"/&amp;gt;
      &amp;lt;/tt:attribute&amp;gt;
    &amp;lt;/Material&amp;gt;
  &amp;lt;/tt:loop&amp;gt;
&amp;lt;/StoreMaterial&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Dec 2017 12:14:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570519#M22238</guid>
      <dc:creator>dmi</dc:creator>
      <dc:date>2017-12-08T12:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570520#M22239</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;
  &lt;P&gt;Ideally Creating a node is important for correct output.please check with the node and the structure how your are refering in the coding part.Check with the screen shot may be this would helpful.You can also have test transformation T-Code : XSLT_TOOL give transformation name as SP12_TESTVECTOR2.&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://answers.sap.com/storage/attachments/98316-capture.png"&gt;capture.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 14:44:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570520#M22239</guid>
      <dc:creator>former_member443654</dc:creator>
      <dc:date>2017-12-08T14:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570521#M22240</link>
      <description>&lt;P&gt;I tried your example and have no issue if I remove the first &amp;lt;Material ... &amp;lt;/Material&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 22:30:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570521#M22240</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-12-08T22:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570522#M22241</link>
      <description>&lt;P&gt;Hi Daniel in ST you can create a corresponding DDIC structure and the base ST code is generated when u use it in STRANS.&lt;/P&gt;
  &lt;P&gt;Then you can improve it further. both for deserelization and serilization.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2017 07:42:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570522#M22241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-12-09T07:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570523#M22242</link>
      <description>&lt;P&gt;Hi Prasenjit&lt;BR /&gt;Thanks for help, but all what I need is a solution to create a xml in this form:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;Normal XML:
 &amp;lt;ArticleNb&amp;gt;123456789&amp;lt;/ArticleNb&amp;gt;
  &amp;lt;MatDesc&amp;gt;somthing&amp;lt;/Matdesc&amp;gt;&lt;BR /&gt;
My requirement:
  &amp;lt;Material Name="ArticleNb" Value="123456789"/&amp;gt;
  &amp;lt;Material Name="MatDesc" Value="something"/&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 Dec 2017 14:52:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570523#M22242</guid>
      <dc:creator>dmi</dc:creator>
      <dc:date>2017-12-09T14:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570524#M22243</link>
      <description>&lt;P&gt;Hello Sandra&lt;BR /&gt;Your propose helps me, but there is still a problem:&lt;/P&gt;
  &lt;P&gt;The first Node "ArticleNb" is not correct, the next nodes are correct&lt;BR /&gt;If I delete the first Node "ArticleNb", the next nodes are not correct&lt;BR /&gt;The result you can see in the printscreen. Do you have any idea for this problem?&lt;BR /&gt;Many thanks, Daniel&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;StoreMaterial&amp;gt;
  &amp;lt;tt:loop name="data" ref="$line.data"&amp;gt;
    &amp;lt;Material Value="ArticleNb"&amp;gt;        " display wrong
      &amp;lt;tt:attribute name="Name"&amp;gt;
        &amp;lt;tt:value ref="articlenb"/&amp;gt;
      &amp;lt;/tt:attribute&amp;gt;
    &amp;lt;/Material&amp;gt;
    &amp;lt;Material Name="ArticleNb"&amp;gt;         " display correct
      &amp;lt;tt:attribute name="Value"&amp;gt;
        &amp;lt;tt:value ref="articlenb"/&amp;gt;
      &amp;lt;/tt:attribute&amp;gt;
    &amp;lt;/Material&amp;gt;
    &amp;lt;Material Name="MatDesc"&amp;gt;          " display correct
      &amp;lt;tt:attribute name="Value"&amp;gt;
        &amp;lt;tt:value ref="matdesc"/&amp;gt;
      &amp;lt;/tt:attribute&amp;gt;
    &amp;lt;/Material&amp;gt;
  &amp;lt;/tt:loop&amp;gt;
&amp;lt;/StoreMaterial&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/99401-98312-xml.png" /&gt;&lt;/P&gt;
  &lt;STRONG&gt;&lt;/STRONG&gt;
  &lt;U&gt;&lt;/U&gt;
  &lt;SUB&gt;&lt;/SUB&gt;
  &lt;SUP&gt;&lt;/SUP&gt;
  &lt;BR /&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;SUP&gt;&lt;/SUP&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;SUP&gt;&lt;/SUP&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2017 13:02:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570524#M22243</guid>
      <dc:creator>dmi</dc:creator>
      <dc:date>2017-12-10T13:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570525#M22244</link>
      <description>&lt;P&gt;I already answered on your same post 2 days ago. Why do you need to keep the first node? What is the expected result? (please, not in words, but in XML)&lt;/P&gt;
  &lt;P&gt;It's normal that with :&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;Material Value="ArticleNb"&amp;gt;&lt;BR /&gt;  &amp;lt;tt:attribute name="Name"&amp;gt;&lt;BR /&gt;    &amp;lt;tt:value ref="articlenb"/&amp;gt;&lt;BR /&gt;  &amp;lt;/tt:attribute&amp;gt;
&amp;lt;/Material&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;you get&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;Material Name="8.28.005.210" Value="ArticleNb"/&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Look carefully your code.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2017 16:23:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570525#M22244</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-12-10T16:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570526#M22245</link>
      <description>&lt;P&gt;Hi Sandra&lt;BR /&gt; Sorry, I'm anyoing, but what is wrong with my code?&lt;BR /&gt; The expected result can you see in the print screen, I have only a specification, I can't show you in xml, only in word.&lt;BR /&gt; Sorry again and many thanks, Daniel&lt;BR /&gt; My ST:&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/99422-sap-st.txt"&gt;sap-st.txt&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;My requirement&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="iso-8859-1" ?&amp;gt;
&amp;lt;StoreInventoryDataList&amp;gt;
&amp;lt;StoreMaterial&amp;gt;
&amp;lt;Material Name="ArticleNb" Value="DD11"/&amp;gt;
&amp;lt;Material Name="MatDesc" Value="mild steel"/&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;My result:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/99423-result.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 09:01:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-problem/m-p/570526#M22245</guid>
      <dc:creator>dmi</dc:creator>
      <dc:date>2017-12-11T09:01:07Z</dc:date>
    </item>
  </channel>
</rss>

