<?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: control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553043#M581597</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;&lt;/P&gt;&lt;P&gt;CONTROL STATEMENTS :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.if &amp;lt;condition&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;statements&amp;gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;  &amp;lt;statements&amp;gt;&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. do &lt;/P&gt;&lt;P&gt;   &amp;lt;statements&amp;gt;&lt;/P&gt;&lt;P&gt;   while&amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.do &amp;lt;condition&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;statements&amp;gt;&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. loop &lt;/P&gt;&lt;P&gt;   &amp;lt;statements&amp;gt;&lt;/P&gt;&lt;P&gt;   endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5 skip&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward with points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Vinutha YV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jul 2007 08:00:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-17T08:00:03Z</dc:date>
    <item>
      <title>control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553038#M581592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;usually what are control statements that are used in our programs in general&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 07:42:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553038#M581592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T07:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553039#M581593</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;IF ELSE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHILE&lt;/P&gt;&lt;P&gt;DO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP ENDLOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;These are the most common control statements used in abap.&lt;/P&gt;&lt;P&gt;refer to abap help for more statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ravish garg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 07:43:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553039#M581593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T07:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553040#M581594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check this,&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9f1f35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9f1f35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Reward if useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 07:48:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553040#M581594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T07:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553041#M581595</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;&lt;/P&gt;&lt;P&gt;Check these links for information regarding different Events in SAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/EN/9f/db9a1435c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/EN/9f/db9a1435c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_di471/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_di471/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="182681"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_di471/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_di471/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROL STATEMENTS.&lt;/P&gt;&lt;P&gt;Control Break Statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control break statements are used to create statement blocks which process only specific table lines the LOOP &amp;#150; ENDLOOP block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You open such a statement block with the control level statement AT and close it with the control level statement ENDAT. The syntax is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table should be sorted when you use control-break statements&lt;/P&gt;&lt;P&gt;You can break the sequential access of internal tables by using these statements.&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;At first.&lt;/P&gt;&lt;P&gt;&amp;lt;Statement block&amp;gt;&lt;/P&gt;&lt;P&gt;Endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the first statement to get executed inside the loop (remember control break statements are applicable only inside the loop)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in this block you can write or process those statements which you want to get executed when the loop starts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At New carrid.&lt;/P&gt;&lt;P&gt;Write:/ carrid.&lt;/P&gt;&lt;P&gt;Endat.&lt;/P&gt;&lt;P&gt;In this case whenever the new carrid is reached, carrid will be written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At End of carrid.&lt;/P&gt;&lt;P&gt;Uline.&lt;/P&gt;&lt;P&gt;Endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case whenever the end of carrid is reached, a line will be drawn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At Last.&lt;/P&gt;&lt;P&gt;Write:/ &amp;#145;Last Record is reached&amp;#146;.&lt;/P&gt;&lt;P&gt;Endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Processing of statements within this block is done when entire processing of entire internal table is over. Usually used to display grand totals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use either all or one of the above control break statements with in the loop for processing internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At end of carrid.&lt;/P&gt;&lt;P&gt;Sum.&lt;/P&gt;&lt;P&gt;Endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In above case the statement SUM (applicable only within AT-ENDAT) will sum up all the numeric fields in internal table and result is stored in same internal table variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.mis.cmich.edu/sap-abap/abap03/sld001.htm" target="test_blank"&gt;http://sap.mis.cmich.edu/sap-abap/abap03/sld001.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;pls go through this&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9f1f35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9f1f35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priyanka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 07:48:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553041#M581595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T07:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553042#M581596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;All this AT NEW, AT FIRST, AT END OF and AT LAST are called control break statements of Internal tables and are used to calculate the TOTALS based on sertain key fields in that internal table&lt;/P&gt;&lt;P&gt;FIrst to use these statements the ITAB has to be sorted by the key fields on whcih you need the SUM of the fields.&lt;/P&gt;&lt;P&gt;Some time you will get * when mopving data from this int table to other table using these commands&lt;/P&gt;&lt;P&gt;so you have to use&lt;/P&gt;&lt;P&gt;READ TABLE ITAB INDEX SY-TABIX in AT..ENDAT..if you are using other fields between them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: sflight_tab TYPE SORTED TABLE OF sflight &lt;/P&gt;&lt;P&gt;                  WITH UNIQUE KEY carrid connid fldate, &lt;/P&gt;&lt;P&gt;      sflight_wa  LIKE LINE OF sflight_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM sflight &lt;/P&gt;&lt;P&gt;       INTO TABLE sflight_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT sflight_tab INTO sflight_wa. &lt;/P&gt;&lt;P&gt;  AT NEW connid. &lt;/P&gt;&lt;P&gt;    WRITE: / sflight_wa-carrid, &lt;/P&gt;&lt;P&gt;             sflight_wa-connid. &lt;/P&gt;&lt;P&gt;    ULINE. &lt;/P&gt;&lt;P&gt;  ENDAT. &lt;/P&gt;&lt;P&gt;  WRITE: / sflight_wa-fldate, &lt;/P&gt;&lt;P&gt;           sflight_wa-seatsocc. &lt;/P&gt;&lt;P&gt;  AT END OF connid. &lt;/P&gt;&lt;P&gt;    SUM. &lt;/P&gt;&lt;P&gt;    ULINE. &lt;/P&gt;&lt;P&gt;    WRITE: / 'Sum', &lt;/P&gt;&lt;P&gt;              sflight_wa-seatsocc UNDER sflight_wa-seatsocc. &lt;/P&gt;&lt;P&gt;    SKIP. &lt;/P&gt;&lt;P&gt;  ENDAT. &lt;/P&gt;&lt;P&gt;  AT END OF carrid. &lt;/P&gt;&lt;P&gt;    SUM. &lt;/P&gt;&lt;P&gt;    ULINE. &lt;/P&gt;&lt;P&gt;    WRITE: / 'Carrier Sum', &lt;/P&gt;&lt;P&gt;              sflight_wa-seatsocc UNDER sflight_wa-seatsocc. &lt;/P&gt;&lt;P&gt;    NEW-PAGE. &lt;/P&gt;&lt;P&gt;  ENDAT. &lt;/P&gt;&lt;P&gt;  AT LAST. &lt;/P&gt;&lt;P&gt;    SUM. &lt;/P&gt;&lt;P&gt;    WRITE: / 'Overall Sum', &lt;/P&gt;&lt;P&gt;              sflight_wa-seatsocc UNDER sflight_wa-seatsocc. &lt;/P&gt;&lt;P&gt;  ENDAT. &lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 07:49:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553042#M581596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T07:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553043#M581597</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;&lt;/P&gt;&lt;P&gt;CONTROL STATEMENTS :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.if &amp;lt;condition&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;statements&amp;gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;  &amp;lt;statements&amp;gt;&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. do &lt;/P&gt;&lt;P&gt;   &amp;lt;statements&amp;gt;&lt;/P&gt;&lt;P&gt;   while&amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.do &amp;lt;condition&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;statements&amp;gt;&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. loop &lt;/P&gt;&lt;P&gt;   &amp;lt;statements&amp;gt;&lt;/P&gt;&lt;P&gt;   endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5 skip&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward with points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Vinutha YV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 08:00:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control/m-p/2553043#M581597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T08:00:03Z</dc:date>
    </item>
  </channel>
</rss>

