<?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 Two Loop for the position in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-loop-for-the-position/m-p/3124394#M742040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi people i explain my situation.&lt;/P&gt;&lt;P&gt;I have a table with some component.&lt;/P&gt;&lt;P&gt;Every component have a type. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pos  Name  Netprice Type Uepos&lt;/P&gt;&lt;P&gt;10    xxxx    xxxx      TAP  &lt;/P&gt;&lt;P&gt;20    yyyy    yyyy      TAN     10&lt;/P&gt;&lt;P&gt;30    zzzz    zzzz      TAN     10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i must do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at this table, if TYPE = TAN i read the UEPOS value and get it into a Zvariable.&lt;/P&gt;&lt;P&gt;Now i must reloop in the table because i must SUM the Netprice of every element Type TAN that have the same UEPOS, and this UEPOS must be the same of the POSNR of the element that have the Type TAP.&lt;/P&gt;&lt;P&gt;Understand? I Know it's difficolt to explain. I try more in another type.&lt;/P&gt;&lt;P&gt;I have this situation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POS NAME NETPR&lt;/P&gt;&lt;P&gt;10     A        0&lt;/P&gt;&lt;P&gt;20     A.1     xx&lt;/P&gt;&lt;P&gt;30     A.2     yy&lt;/P&gt;&lt;P&gt;40     B        0&lt;/P&gt;&lt;P&gt;50     B.1     xx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this actual situation the A.1 are dependento of A and i wanto to sum in the NETPR of A the netpr xx , yy of the A.1 and A.2. then the same for B position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the attention.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Nov 2007 10:28:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-28T10:28:48Z</dc:date>
    <item>
      <title>Two Loop for the position</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-loop-for-the-position/m-p/3124394#M742040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi people i explain my situation.&lt;/P&gt;&lt;P&gt;I have a table with some component.&lt;/P&gt;&lt;P&gt;Every component have a type. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pos  Name  Netprice Type Uepos&lt;/P&gt;&lt;P&gt;10    xxxx    xxxx      TAP  &lt;/P&gt;&lt;P&gt;20    yyyy    yyyy      TAN     10&lt;/P&gt;&lt;P&gt;30    zzzz    zzzz      TAN     10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i must do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at this table, if TYPE = TAN i read the UEPOS value and get it into a Zvariable.&lt;/P&gt;&lt;P&gt;Now i must reloop in the table because i must SUM the Netprice of every element Type TAN that have the same UEPOS, and this UEPOS must be the same of the POSNR of the element that have the Type TAP.&lt;/P&gt;&lt;P&gt;Understand? I Know it's difficolt to explain. I try more in another type.&lt;/P&gt;&lt;P&gt;I have this situation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POS NAME NETPR&lt;/P&gt;&lt;P&gt;10     A        0&lt;/P&gt;&lt;P&gt;20     A.1     xx&lt;/P&gt;&lt;P&gt;30     A.2     yy&lt;/P&gt;&lt;P&gt;40     B        0&lt;/P&gt;&lt;P&gt;50     B.1     xx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this actual situation the A.1 are dependento of A and i wanto to sum in the NETPR of A the netpr xx , yy of the A.1 and A.2. then the same for B position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the attention.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 10:28:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-loop-for-the-position/m-p/3124394#M742040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T10:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Two Loop for the position</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-loop-for-the-position/m-p/3124395#M742041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey i think you can do like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT ITAB by TYPE UEPOS.&lt;/P&gt;&lt;P&gt;clear: w_type, w_uepos, w_netpr.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt; if w_type ne itab-type&lt;/P&gt;&lt;P&gt;or w_uepos ne itab-uepos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;here you can capture previous type and uepos.. so write logic to use netprice before clearing that.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;clear w_netpr.&lt;/P&gt;&lt;P&gt;w_type = itab-type.&lt;/P&gt;&lt;P&gt;w_uepos = itab-uepos.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_netpr = w_netpr + itab-netprice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pos Name Netprice Type Uepos&lt;/P&gt;&lt;P&gt;10 xxxx xxxx TAP &lt;/P&gt;&lt;P&gt;20 yyyy yyyy TAN 10&lt;/P&gt;&lt;P&gt;30 zzzz zzzz TAN 10&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 10:37:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-loop-for-the-position/m-p/3124395#M742041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T10:37:52Z</dc:date>
    </item>
  </channel>
</rss>

