<?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: Issue with LOOP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152497#M1514806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use AT-NEW events to control the flow of your program and logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Aug 2010 06:10:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-16T06:10:24Z</dc:date>
    <item>
      <title>Issue with LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152495#M1514804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table ITAB where WBS element, SKF, Fiscal Period, Fiscal year and Quantity fields are present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to append the WBS elements into other table (ITAB2) for processing the data into Function module to create a posting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While looping, i have to append all these values for a particular period and then execute Function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever a period changes i have to append again and then execute FMs.&lt;/P&gt;&lt;P&gt;Basically, the postings for multiple WBS for a particular Period should be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe while looping ITAB, i need to control this using a control break statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how to incorporate the logic?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help will be appreciated....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 05:28:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152495#M1514804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-16T05:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152496#M1514805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use the control break statements like on change of / at new.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 05:34:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152496#M1514805</guid>
      <dc:creator>Sandeep_Panghal</dc:creator>
      <dc:date>2010-08-16T05:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152497#M1514806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use AT-NEW events to control the flow of your program and logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 06:10:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152497#M1514806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-16T06:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152498#M1514807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Sanganal &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get much help about &lt;STRONG&gt;Control Break&lt;/STRONG&gt; Statements after a little search, you can also get by writing &lt;STRONG&gt;AT&lt;/STRONG&gt; in your &lt;STRONG&gt;ABAP&lt;/STRONG&gt; Editor Press &lt;STRONG&gt;F1&lt;/STRONG&gt; and &lt;STRONG&gt;Double Click&lt;/STRONG&gt; on &lt;STRONG&gt;AT - itab, ABAP Statement&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply if any Issue,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 06:18:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152498#M1514807</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2010-08-16T06:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152499#M1514808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort your First ITAB with "period" and use AT-New statement inside a loop , to get the next change values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers , &lt;/P&gt;&lt;P&gt;Dilum&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 06:30:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152499#M1514808</guid>
      <dc:creator>former_member451655</dc:creator>
      <dc:date>2010-08-16T06:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152500#M1514809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control break statements :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. AT NEW f. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. AT END OF f. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. AT FIRST. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. AT LAST. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a LOOP which processes an internal table, you can use special control structures for control break processing. All these structures begin with AT and end with ENDAT. The sequence of statements which lies between them is then executed if a control break occurs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT it_final BY belnr.

*  To add the Local Currency Amount, Quantity and Quantity in EUn at new Document Number.

                   LOOP AT it_final INTO wa_final.
                     wa_final1 = wa_final.

                     AT NEW belnr.
                       g_belnr = wa_final1-belnr.


                     ENDAT.

                     IF wa_final1-belnr = g_belnr.
                       g_dmbtr_sum = g_dmbtr_sum + wa_final1-dmbtr.
                       g_menge_sum = g_menge_sum + wa_final1-menge.
                       g_erfmg_sum = g_erfmg_sum + wa_final1-erfmg.
                     ENDIF.

                     AT END OF belnr.
                       wa_final1-dmbtr = g_dmbtr_sum.
                       wa_final1-menge = g_menge_sum.
                       wa_final1-erfmg = g_erfmg_sum.
                       g_dmbtr_sum = 0.
                       g_erfmg_sum = 0.
                       g_menge_sum = 0.

                       APPEND wa_final1 TO it_final1.
                       CLEAR : wa_final,
                               wa_final1.
                     ENDAT.


                   ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 06:35:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-loop/m-p/7152500#M1514809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-16T06:35:08Z</dc:date>
    </item>
  </channel>
</rss>

