<?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>Question Re: Strans XSLT-Programm Conversion error in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803778#M249296</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;xsl:transform version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:sap="http://www.sap.com/sapxsl"
&amp;gt;


&amp;lt;xsl:strip-space elements="*"/&amp;gt;


&amp;lt;xsl:template match="/"&amp;gt;
&amp;lt;asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"&amp;gt;
    &amp;lt;asx:values&amp;gt;
        &amp;lt;ORDERS&amp;gt;
            &amp;lt;xsl:for-each select="/Orders/Order"&amp;gt;
            &amp;lt;xsl:variable name="var1" select="/Orders/Order"/&amp;gt;
            &amp;lt;HEAD&amp;gt;
                &amp;lt;NAME&amp;gt;
                    &amp;lt;xsl:value-of select="Name"/&amp;gt;
                &amp;lt;/NAME&amp;gt;
                &amp;lt;STRATEGY&amp;gt;
                    &amp;lt;xsl:value-of select="Strategy"/&amp;gt;
                &amp;lt;/STRATEGY&amp;gt;
                &amp;lt;STARTDATE&amp;gt;
                    &amp;lt;xsl:value-of select="StartDate"/&amp;gt;
                &amp;lt;/STARTDATE&amp;gt;
                &amp;lt;PART&amp;gt;
                    &amp;lt;xsl:for-each select="$var1/Parts/Part"&amp;gt;
                       &amp;lt;ITEM&amp;gt;
                            &amp;lt;NAME&amp;gt;
                                &amp;lt;xsl:value-of select="Name"/&amp;gt;
                            &amp;lt;/NAME&amp;gt;
                            &amp;lt;MEASURE&amp;gt;
                                &amp;lt;xsl:value-of select="Measure"/&amp;gt;
                            &amp;lt;/MEASURE&amp;gt;
                        &amp;lt;/ITEM&amp;gt;
                    &amp;lt;/xsl:for-each&amp;gt;
                &amp;lt;/PART&amp;gt;
            &amp;lt;/HEAD&amp;gt;
            &amp;lt;/xsl:for-each&amp;gt;
        &amp;lt;/ORDERS&amp;gt;
    &amp;lt;/asx:values&amp;gt;
&amp;lt;/asx:abap&amp;gt;
&amp;lt;/xsl:template&amp;gt;


&amp;lt;/xsl:transform&amp;gt;

-------------------------------------my strans code↑

&amp;lt;Orders&amp;gt;
        &amp;lt;Order&amp;gt;
          &amp;lt;Name&amp;gt;Bend_001_10&amp;lt;/Name&amp;gt;
          &amp;lt;Strategy&amp;gt;MaterialAdministrationOrder&amp;lt;/Strategy&amp;gt;
          &amp;lt;StartDate&amp;gt;2018-07-13T08:00:00&amp;lt;/StartDate&amp;gt;
          &amp;lt;TargetDate&amp;gt;2018-08-02T16:00:00&amp;lt;/TargetDate&amp;gt;
          &amp;lt;Parts&amp;gt;
            &amp;lt;Part&amp;gt;
              &amp;lt;Name&amp;gt;B010_110_011V3&amp;lt;/Name&amp;gt;
              &amp;lt;Measure&amp;gt;Metric&amp;lt;/Measure&amp;gt;
            &amp;lt;/Part&amp;gt;
          &amp;lt;/Parts&amp;gt;
        &amp;lt;/Order&amp;gt;
        &amp;lt;Order&amp;gt;
          &amp;lt;Age&amp;gt;2&amp;lt;/Age&amp;gt;
          &amp;lt;Name&amp;gt;Zusammenbau Teil&amp;lt;/Name&amp;gt;
          &amp;lt;Strategy&amp;gt;MaterialAdministrationOrder&amp;lt;/Strategy&amp;gt;
          &amp;lt;StartDate&amp;gt;2018-07-13T08:00:00&amp;lt;/StartDate&amp;gt;
          &amp;lt;Parts&amp;gt;
            &amp;lt;Part&amp;gt;
              &amp;lt;Name&amp;gt;Imported1&amp;lt;/Name&amp;gt;
              &amp;lt;Measure&amp;gt;Metric&amp;lt;/Measure&amp;gt;
            &amp;lt;/Part&amp;gt;
          &amp;lt;/Parts&amp;gt;
        &amp;lt;/Order&amp;gt;
      &amp;lt;/Orders&amp;gt;
-----------------------------------------my xml code↑&lt;BR /&gt;best regards. 

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 11 Mar 2019 07:33:40 GMT</pubDate>
    <dc:creator>mt13065</dc:creator>
    <dc:date>2019-03-11T07:33:40Z</dc:date>
    <item>
      <title>Strans XSLT-Programm Conversion error</title>
      <link>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaq-p/803774</link>
      <description>&lt;P&gt;I often use strans for XML-&amp;gt;ABAP TABLE conversion, but I have encountered the following problem. The correct result should be that there is only one row of data in the ''GT_ORDER-PART'' of each row, but now he has two rows, he has read all the The data in "part", how can I make him correspond to ORDER?&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/300411-1.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/300412-2.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/300413-3.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/300414-4.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 06:22:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaq-p/803774</guid>
      <dc:creator>mt13065</dc:creator>
      <dc:date>2019-03-11T06:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Strans XSLT-Programm Conversion error</title>
      <link>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803775#M249293</link>
      <description>&lt;P&gt;Please post the code as text instead of image, so that we can easily answer by modifying portions of your code.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 06:47:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803775#M249293</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-03-11T06:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Strans XSLT-Programm Conversion error</title>
      <link>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803776#M249294</link>
      <description>&lt;P&gt;it's my strans code, I think it should be something wrong,hope someone can help me, best regards, T^T&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 07:19:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803776#M249294</guid>
      <dc:creator>mt13065</dc:creator>
      <dc:date>2019-03-11T07:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Strans XSLT-Programm Conversion error</title>
      <link>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803777#M249295</link>
      <description>&lt;P&gt;Thank you. &lt;/P&gt;&lt;P&gt;Note: you'd better correcting your original question rather than adding text.&lt;/P&gt;&lt;P&gt;If you want to reply to someone to add complements, please use the COMMENT button. ANSWER is only to propose a solution. If it's too late, you still have an option to convert your answer into a comment.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 07:27:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803777#M249295</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-03-11T07:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Strans XSLT-Programm Conversion error</title>
      <link>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803778#M249296</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;xsl:transform version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:sap="http://www.sap.com/sapxsl"
&amp;gt;


&amp;lt;xsl:strip-space elements="*"/&amp;gt;


&amp;lt;xsl:template match="/"&amp;gt;
&amp;lt;asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"&amp;gt;
    &amp;lt;asx:values&amp;gt;
        &amp;lt;ORDERS&amp;gt;
            &amp;lt;xsl:for-each select="/Orders/Order"&amp;gt;
            &amp;lt;xsl:variable name="var1" select="/Orders/Order"/&amp;gt;
            &amp;lt;HEAD&amp;gt;
                &amp;lt;NAME&amp;gt;
                    &amp;lt;xsl:value-of select="Name"/&amp;gt;
                &amp;lt;/NAME&amp;gt;
                &amp;lt;STRATEGY&amp;gt;
                    &amp;lt;xsl:value-of select="Strategy"/&amp;gt;
                &amp;lt;/STRATEGY&amp;gt;
                &amp;lt;STARTDATE&amp;gt;
                    &amp;lt;xsl:value-of select="StartDate"/&amp;gt;
                &amp;lt;/STARTDATE&amp;gt;
                &amp;lt;PART&amp;gt;
                    &amp;lt;xsl:for-each select="$var1/Parts/Part"&amp;gt;
                       &amp;lt;ITEM&amp;gt;
                            &amp;lt;NAME&amp;gt;
                                &amp;lt;xsl:value-of select="Name"/&amp;gt;
                            &amp;lt;/NAME&amp;gt;
                            &amp;lt;MEASURE&amp;gt;
                                &amp;lt;xsl:value-of select="Measure"/&amp;gt;
                            &amp;lt;/MEASURE&amp;gt;
                        &amp;lt;/ITEM&amp;gt;
                    &amp;lt;/xsl:for-each&amp;gt;
                &amp;lt;/PART&amp;gt;
            &amp;lt;/HEAD&amp;gt;
            &amp;lt;/xsl:for-each&amp;gt;
        &amp;lt;/ORDERS&amp;gt;
    &amp;lt;/asx:values&amp;gt;
&amp;lt;/asx:abap&amp;gt;
&amp;lt;/xsl:template&amp;gt;


&amp;lt;/xsl:transform&amp;gt;

-------------------------------------my strans code↑

&amp;lt;Orders&amp;gt;
        &amp;lt;Order&amp;gt;
          &amp;lt;Name&amp;gt;Bend_001_10&amp;lt;/Name&amp;gt;
          &amp;lt;Strategy&amp;gt;MaterialAdministrationOrder&amp;lt;/Strategy&amp;gt;
          &amp;lt;StartDate&amp;gt;2018-07-13T08:00:00&amp;lt;/StartDate&amp;gt;
          &amp;lt;TargetDate&amp;gt;2018-08-02T16:00:00&amp;lt;/TargetDate&amp;gt;
          &amp;lt;Parts&amp;gt;
            &amp;lt;Part&amp;gt;
              &amp;lt;Name&amp;gt;B010_110_011V3&amp;lt;/Name&amp;gt;
              &amp;lt;Measure&amp;gt;Metric&amp;lt;/Measure&amp;gt;
            &amp;lt;/Part&amp;gt;
          &amp;lt;/Parts&amp;gt;
        &amp;lt;/Order&amp;gt;
        &amp;lt;Order&amp;gt;
          &amp;lt;Age&amp;gt;2&amp;lt;/Age&amp;gt;
          &amp;lt;Name&amp;gt;Zusammenbau Teil&amp;lt;/Name&amp;gt;
          &amp;lt;Strategy&amp;gt;MaterialAdministrationOrder&amp;lt;/Strategy&amp;gt;
          &amp;lt;StartDate&amp;gt;2018-07-13T08:00:00&amp;lt;/StartDate&amp;gt;
          &amp;lt;Parts&amp;gt;
            &amp;lt;Part&amp;gt;
              &amp;lt;Name&amp;gt;Imported1&amp;lt;/Name&amp;gt;
              &amp;lt;Measure&amp;gt;Metric&amp;lt;/Measure&amp;gt;
            &amp;lt;/Part&amp;gt;
          &amp;lt;/Parts&amp;gt;
        &amp;lt;/Order&amp;gt;
      &amp;lt;/Orders&amp;gt;
-----------------------------------------my xml code↑&lt;BR /&gt;best regards. 

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Mar 2019 07:33:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803778#M249296</guid>
      <dc:creator>mt13065</dc:creator>
      <dc:date>2019-03-11T07:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Strans XSLT-Programm Conversion error</title>
      <link>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803779#M249297</link>
      <description>&lt;P&gt;XSLT refers to nodes by using the &lt;A href="https://www.w3.org/TR/xpath/all/"&gt;XPATH&lt;/A&gt; language, which use absolute (start with / like in your example /OrdersOrder) or paths relative to the "context node" (not starting with /, like Parts/Part as I show below). The context node is changed by XSLT at runtime, for example for-each sets the context node to the currently-iterated node.&lt;/P&gt;&lt;P&gt;I think that should work:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;            &amp;lt;xsl:for-each select="/Orders/Order"&amp;gt;
                ...
                    &amp;lt;xsl:for-each select="Parts/Part"&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Note: $var1/Parts/Part is equivalent to /Orders/Order/Parts/Part which starts from the root and parses all nodes matching that path.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 07:47:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803779#M249297</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-03-11T07:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Strans XSLT-Programm Conversion error</title>
      <link>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803780#M249298</link>
      <description>&lt;P&gt;oh my god,i'm so stupid,I tried /Parts/Part, but I didn't try what you said,thank you so much.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 07:53:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803780#M249298</guid>
      <dc:creator>mt13065</dc:creator>
      <dc:date>2019-03-11T07:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Strans XSLT-Programm Conversion error</title>
      <link>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803781#M249299</link>
      <description>&lt;P&gt;By the way, you should better switch to the Simple Transformation language (provided that the transformations remain simple), because it's something like 10 times faster.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 08:08:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803781#M249299</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-03-11T08:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Strans XSLT-Programm Conversion error</title>
      <link>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803782#M249300</link>
      <description>&lt;P&gt;i will, but simple need create all fields in se11 ,If I am not mistaken.&lt;BR /&gt;but I am worried that the customer will add the fields that need to be read later. I am preparing to create a simple strans,thank you again.^_^&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 08:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803782#M249300</guid>
      <dc:creator>mt13065</dc:creator>
      <dc:date>2019-03-11T08:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Strans XSLT-Programm Conversion error</title>
      <link>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803783#M249301</link>
      <description>&lt;P&gt;A Simple Transformation may work without any reference to the DDIC i.e. the type of the data root is optional, in that case it's considered of type "any" and it will check the ABAP names when the transformation runs.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 09:58:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/strans-xslt-programm-conversion-error/qaa-p/803783#M249301</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-03-11T09:58:52Z</dc:date>
    </item>
  </channel>
</rss>

