<?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 logic in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451166#M549286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pls give the result...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a internal table .. as t1  in that i appended a,b,c,d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t1.&lt;/P&gt;&lt;P&gt;write sy-index.&lt;/P&gt;&lt;P&gt;write sy-tabix.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jul 2007 04:12:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-03T04:12:26Z</dc:date>
    <item>
      <title>logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451166#M549286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pls give the result...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a internal table .. as t1  in that i appended a,b,c,d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t1.&lt;/P&gt;&lt;P&gt;write sy-index.&lt;/P&gt;&lt;P&gt;write sy-tabix.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 04:12:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451166#M549286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T04:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451167#M549287</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;sy-tabix will give u the table index.so in ur case it is 1,2,3,4&lt;/P&gt;&lt;P&gt;sy-index will give u the current loop index(do,while,...).&lt;/P&gt;&lt;P&gt;so it will give u 0 for each time.&lt;/P&gt;&lt;P&gt;so ur output is:01020304&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 04:16:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451167#M549287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T04:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451168#M549288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sy-index   &lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-tabix&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if it is usefull.... &lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 04:20:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451168#M549288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T04:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451169#M549289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sy-tabix is 0&lt;/P&gt;&lt;P&gt;sy-index is no of records in the internal table (suppose if u have 5 records in the internal table then the sy-index is 5 (1 2 3 4 5)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REMINDER: If you posted the question, please reward points for good answers*. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 04:23:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451169#M549289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T04:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451170#M549290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in loop at itab only sy-tabix getting incremented but in other loop like do enddo or while loop sy-index is getting incremented.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since you are using loop at itab.. so sy-tabix will get incremented from 1 to 4 because you have only 4 rows.... and sy-index is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so output 01020304.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 04:23:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451170#M549290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T04:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451171#M549291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Here there is differnece between sy-tabix and sy-index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-tabix and sy-index will give the current loop pass value in the loop.&lt;/P&gt;&lt;P&gt;But here the differnece is sy-tabix must be used in the loop at - endloop only.&lt;/P&gt;&lt;P&gt;Sy-index must be used in the other loop like Do-Enddo.&lt;/P&gt;&lt;P&gt;So in your scenario you have used both sy-tabix and sy-index in loop at -endloop.&lt;/P&gt;&lt;P&gt;Here sy-tabix will give the current loop pass value i.e. during first loop pass it gives sy-tabix as 1 and during second loop pass it gives as 2 so on.&lt;/P&gt;&lt;P&gt;But here sy-index value does not change i.e.whatever the sy-index value before the loop at that will mainitan.Here let assume before loop at sy-index is 0 then after every loop pass also sy-index is 0.&lt;/P&gt;&lt;P&gt;So simply in your logic sy-tabix will give current loop pass value but sy-index has no effect and it does not change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;shyla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 04:26:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451171#M549291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T04:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451172#M549292</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;output will be          0           1           0           2           0           3           0           4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bcoz sy-index is 0 and sy-tabix will change from 1-4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also, this is my codes where i hv tried.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF itab occurs 0,
index type int4,
END OF itab,
wa like line of itab.

do 4 times.

wa-index = sy-index.
append wa to itab.
enddo.

loop at itab.
write: sy-index.
write: sy-tabix.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 04:36:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451172#M549292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T04:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451173#M549293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   loop at t1.&lt;/P&gt;&lt;P&gt;write sy-index.&lt;/P&gt;&lt;P&gt;write sy-tabix.&lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output for your program is:4, because you didn't use '/' in each write statement, so you change your program by given below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   loop at t1.&lt;/P&gt;&lt;P&gt;write / 'index:',sy-index.&lt;/P&gt;&lt;P&gt;write / 'tabix:',sy-tabix.&lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTPUT:&lt;/P&gt;&lt;P&gt;***********&lt;/P&gt;&lt;P&gt;index:0&lt;/P&gt;&lt;P&gt;tabix:1&lt;/P&gt;&lt;P&gt;index:1&lt;/P&gt;&lt;P&gt;tabix:2&lt;/P&gt;&lt;P&gt;index:2&lt;/P&gt;&lt;P&gt;tabix:3&lt;/P&gt;&lt;P&gt;index:3&lt;/P&gt;&lt;P&gt;tabix:4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;index will start from 0 and tabix will start from 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF USEFULL REWARD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 04:40:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic/m-p/2451173#M549293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T04:40:22Z</dc:date>
    </item>
  </channel>
</rss>

