<?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: Loop! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264916#M491377</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;try this...there might not be any data in table SFLIGHT

REPORT ychatest.

DATA: it_spfli TYPE TABLE OF sflight ,
wa_spfli TYPE sflight.

SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE it_spfli.

IF NOT it_spfli[] IS INITIAL.
LOOP at it_spfli into wa_spfli.
  WRITE : / wa_spfli-carrid.
ENDLOOP.
ELSE.
WRITE : / 'No Data found'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 May 2007 07:17:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-29T07:17:36Z</dc:date>
    <item>
      <title>Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264903#M491364</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;For this simple program I am not getting the output. &lt;/P&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZATUL_DEMO1.&lt;/P&gt;&lt;P&gt;data: it_spfli TYPE TABLE OF sflight  ,&lt;/P&gt;&lt;P&gt;wa_spfli type sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from  sflight INTO corresponding fields of   table  it_spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_spfli into wa_spfli.&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; WRITE : wa_spfli-CARRID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264903#M491364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264904#M491365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check whether sflight has any data in it or not and then move write statement inside the loop....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_spfli into wa_spfli.&lt;/P&gt;&lt;P&gt;WRITE : wa_spfli-CARRID. &lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;null&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:05:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264904#M491365</guid>
      <dc:creator>PS_1978</dc:creator>
      <dc:date>2007-05-29T07:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264905#M491366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write  WRITE statement with in loop.&lt;/P&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward , if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264905#M491366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264906#M491367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give write statement within the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look the below one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : it_spfli LIKE STANDARD TABLE OF sflight WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE it_spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_spfli.&lt;/P&gt;&lt;P&gt;  WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; it_spfli-carrid.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Regards,&lt;/P&gt;&lt;P&gt;jackie..&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Jackie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:07:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264906#M491367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264907#M491368</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;REPORT ZATUL_DEMO1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_spfli TYPE TABLE OF sflight ,&lt;/P&gt;&lt;P&gt;wa_spfli type sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from sflight INTO corresponding fields of table it_spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_spfli into wa_spfli.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;WRITE : / wa_spfli-CARRID.&amp;lt;/b&amp;gt;  "putting a / will get next records in new line..&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;*WRITE : wa_spfli-CARRID.  this will return the last record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewards if useful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;nazeer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:07:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264907#M491368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264908#M491369</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;Keep that write statment inside the LOOP..ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wa_spfli will have only one value at a time&lt;/P&gt;&lt;P&gt;incase if it doesnt have last record,it wont display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:07:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264908#M491369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264909#M491370</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; Do Like This.............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZATUL_DEMO1.&lt;/P&gt;&lt;P&gt;data: it_spfli TYPE TABLE OF sflight ,&lt;/P&gt;&lt;P&gt;wa_spfli type sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from sflight INTO corresponding fields of table it_spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_spfli into wa_spfli.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa_spfli-CARRID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:08:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264909#M491370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264910#M491371</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;data: it_spfli TYPE TABLE OF sflight ,&lt;/P&gt;&lt;P&gt;             wa_spfli type sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from sflight INTO corresponding fields of table it_spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_spfli into wa_spfli.&lt;/P&gt;&lt;P&gt;WRITE : wa_spfli-CARRID. &lt;/P&gt;&lt;P&gt;endloop.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:10:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264910#M491371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264911#M491372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried  the write statement in side the loop . then also its not working. not gng inside the loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:11:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264911#M491372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264912#M491373</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;You just keep the WRITE command inside LOOP and ENDLOOP.&lt;/P&gt;&lt;P&gt;Since the work are is blank of the internal table is blank, you were not getting at single record displayed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZATUL_DEMO1.&lt;/P&gt;&lt;P&gt;data: it_spfli TYPE TABLE OF sflight ,&lt;/P&gt;&lt;P&gt;wa_spfli type sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from sflight INTO corresponding fields of table it_spfli.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;loop at it_spfli into wa_spfli.&lt;/P&gt;&lt;P&gt;WRITE : wa_spfli-CARRID.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:13:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264912#M491373</guid>
      <dc:creator>graghavendra_sharma</dc:creator>
      <dc:date>2007-05-29T07:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264913#M491374</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;Are you getting any error message or&lt;/P&gt;&lt;P&gt;Just a blank output screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it by using the above coding &lt;/P&gt;&lt;P&gt;which i gave..&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;Jackie.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Jackie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:14:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264913#M491374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264914#M491375</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;Can You post your code that u tried...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Biju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:14:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264914#M491375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264915#M491376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay , &lt;/P&gt;&lt;P&gt;  Your code is working fine in my system.&lt;/P&gt;&lt;P&gt;So could you please check if data is selected from the select statement.&lt;/P&gt;&lt;P&gt;I feel no data is being selected by the SQL statement.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264915#M491376</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264916#M491377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;try this...there might not be any data in table SFLIGHT

REPORT ychatest.

DATA: it_spfli TYPE TABLE OF sflight ,
wa_spfli TYPE sflight.

SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE it_spfli.

IF NOT it_spfli[] IS INITIAL.
LOOP at it_spfli into wa_spfli.
  WRITE : / wa_spfli-carrid.
ENDLOOP.
ELSE.
WRITE : / 'No Data found'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:17:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264916#M491377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Loop!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264917#M491378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ajay singh,&lt;/P&gt;&lt;P&gt;              check sy-subrc before writing loop. IF sy-subrc EQ 0 then only use the loop statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc EQ 0 and still if U wont get any output it means U have the CARRID as initial. As it is a primary key this is not possible but programatically if some one has inserted some junk data this is possible. Check ur table entires once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 07:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop/m-p/2264917#M491378</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T07:19:34Z</dc:date>
    </item>
  </channel>
</rss>

