<?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: Transformation XML - problem with LOOP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformation-xml-problem-with-loop/m-p/12687606#M2017396</link>
    <description>&lt;P&gt;Thank you Sandra, it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Mar 2023 07:05:33 GMT</pubDate>
    <dc:creator>arkadiusz_czerniej</dc:creator>
    <dc:date>2023-03-22T07:05:33Z</dc:date>
    <item>
      <title>Transformation XML - problem with LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformation-xml-problem-with-loop/m-p/12687603#M2017393</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
  &lt;P&gt;I have problem with transformation (STRANS), header is passing to the structure but the table by loop unfortunately not. When I CALL TRANSFORMATION the values from Confirmation (Name1, NrRef, Id, Sk, Na, Code) save to structure as RESULT of transformation but the position from Document unfortunately not. &lt;/P&gt;
  &lt;P&gt;My XML:&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/2154608-test-xmla-1.xml" data-attachment="2154608"&gt;test-xmla-1.xml&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;My transformation:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;?sap.transform simple?&amp;gt;&amp;lt;br&amp;gt;&amp;lt;tt:transform 
xmlns:tt="http://www.sap.com/transformation-templates" 
xmlns:ddic="http://www.sap.com/abapxml/types/dictionary" 
xmlns:def="http://www.sap.com/abapxml/types/defined"&amp;gt;

&amp;lt;br&amp;gt;&amp;lt;tt:root name="Confirmation" type="ddic:ZTEST_XML"/&amp;gt;&amp;lt;br&amp;gt;
&amp;lt;tt:template&amp;gt;&amp;lt;br&amp;gt;    
&amp;lt;Confirmation xmlns="http://........../v1"&amp;gt;&amp;lt;br&amp;gt;
      &amp;lt;Name1 tt:value-ref=".Confirmation.Name1"/&amp;gt;&amp;lt;br&amp;gt;
      &amp;lt;NrRef tt:value-ref=".Confirmation.NrRef"/&amp;gt;&amp;lt;br&amp;gt;
      &amp;lt;Id tt:value-ref=".Confirmation.Id"/&amp;gt;&amp;lt;br&amp;gt;
      &amp;lt;Sk tt:value-ref=".Confirmation.Sk"/&amp;gt;&amp;lt;br&amp;gt;
      &amp;lt;Na tt:value-ref=".Confirmation.Na"/&amp;gt;&amp;lt;br&amp;gt;
      &amp;lt;Code tt:value-ref=".Confirmation.Code"/&amp;gt;&amp;lt;br&amp;gt;
      &amp;lt;Document&amp;gt;&amp;lt;br&amp;gt;
        &amp;lt;tt:loop ref=".Confirmation.Document"&amp;gt;&amp;lt;br&amp;gt;
            &amp;lt;NrDok tt:value-ref="NrDok"/&amp;gt;&amp;lt;br&amp;gt;
            &amp;lt;NrInv tt:value-ref="NrInv"/&amp;gt;&amp;lt;br&amp;gt;
            &amp;lt;DatSend tt:value-ref="DatSend"/&amp;gt;&amp;lt;br&amp;gt;
            &amp;lt;DatReg tt:value-ref="DatReg"/&amp;gt;&amp;lt;br&amp;gt;
            &amp;lt;SkDok tt:value-ref="SkDok"/&amp;gt;&amp;lt;br&amp;gt;
        &amp;lt;/tt:loop&amp;gt;&amp;lt;br&amp;gt;
      &amp;lt;/Document&amp;gt;&amp;lt;br&amp;gt;
    &amp;lt;/Confirmation&amp;gt;&amp;lt;br&amp;gt;
  &amp;lt;/tt:template&amp;gt;&amp;lt;br&amp;gt;
&amp;lt;/tt:transform&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Defined structures:&lt;/P&gt;
  &lt;P&gt;ZTEST_XML is structure like&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;Name1        Types String&amp;lt;br&amp;gt;
NrRef        Types String&amp;lt;br&amp;gt;
Id           Types String&amp;lt;br&amp;gt;
Sk           Types String&amp;lt;br&amp;gt;
Na           Types String&amp;lt;br&amp;gt;
Code         Types String&amp;lt;br&amp;gt;
Document     Types ZTEST_TT_DOCUMENT&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;ZTEST_TT_DOCUMENT is Table Type with line type:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;NrDok        Types String&amp;lt;br&amp;gt;
NrInv        Types String&amp;lt;br&amp;gt;
DatSend      Types String&amp;lt;br&amp;gt;
DatReg       Types String&amp;lt;br&amp;gt;
SkDok        Types String&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2023 14:55:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transformation-xml-problem-with-loop/m-p/12687603#M2017393</guid>
      <dc:creator>arkadiusz_czerniej</dc:creator>
      <dc:date>2023-03-21T14:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Transformation XML - problem with LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformation-xml-problem-with-loop/m-p/12687604#M2017394</link>
      <description>&lt;P&gt;So, your question is about the programming language Simple Transformation (a transformation can also be in language XSLT), and you want to &lt;STRONG&gt;deserialize&lt;/STRONG&gt; XML into a complex structure where one component is an internal table.&lt;/P&gt;&lt;P&gt;You have lots of &amp;lt;br&amp;gt; tags in your pasted code. Maybe if you use Ctrl+Shift+V (instead of Ctrl+V), you'll avoid all these &amp;lt;br&amp;gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 19:55:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transformation-xml-problem-with-loop/m-p/12687604#M2017394</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-03-21T19:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Transformation XML - problem with LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformation-xml-problem-with-loop/m-p/12687605#M2017395</link>
      <description>&lt;P&gt;You did:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;Document&amp;gt;
        &amp;lt;tt:loop ref=".Confirmation.Document"&amp;gt;
            ...
        &amp;lt;/tt:loop&amp;gt;
      &amp;lt;/Document&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;But it should be:&lt;BR /&gt;&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;tt:loop ref=".Confirmation.Document"&amp;gt;
        &amp;lt;Document&amp;gt;
            ...
        &amp;lt;/Document&amp;gt;&lt;BR /&gt;      &amp;lt;/tt:loop&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2023 20:40:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transformation-xml-problem-with-loop/m-p/12687605#M2017395</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-03-21T20:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Transformation XML - problem with LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformation-xml-problem-with-loop/m-p/12687606#M2017396</link>
      <description>&lt;P&gt;Thank you Sandra, it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 07:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transformation-xml-problem-with-loop/m-p/12687606#M2017396</guid>
      <dc:creator>arkadiusz_czerniej</dc:creator>
      <dc:date>2023-03-22T07:05:33Z</dc:date>
    </item>
  </channel>
</rss>

