<?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: internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273941#M782673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;Just include the field SY-TABIX in your Write statement for the internal table. This should help you in achieving the no. of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhavin P Shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Jan 2008 09:45:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-02T09:45:07Z</dc:date>
    <item>
      <title>internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273937#M782669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Anybody can tell me, "How do we get the number of lines in an internal table?"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2008 06:12:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273937#M782669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-02T06:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273938#M782670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;data : N type I.
describe table ITAB lines N. " N gives the no of records of itab&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2008 06:13:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273938#M782670</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2008-01-02T06:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273939#M782671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use describe statement &lt;/P&gt;&lt;P&gt;describe table itab lines w_int.&lt;/P&gt;&lt;P&gt;in w_int will contain no. of lines.&lt;/P&gt;&lt;P&gt;Plzz reward points if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2008 06:14:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273939#M782671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-02T06:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273940#M782672</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;This can be done in several ways. But the latest and simple way is as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF str_test,&lt;/P&gt;&lt;P&gt;        n1 TYPE i,&lt;/P&gt;&lt;P&gt;        n2 TYPE i,&lt;/P&gt;&lt;P&gt;       END OF str_test.&lt;/P&gt;&lt;P&gt;DATA : itab LIKE STANDARD TABLE OF str_test WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 10 TIMES.&lt;/P&gt;&lt;P&gt;  CLEAR str_test.&lt;/P&gt;&lt;P&gt;  str_test-n1 = sy-index.&lt;/P&gt;&lt;P&gt;  str_test-n2 = sy-index * 2.&lt;/P&gt;&lt;P&gt;  APPEND str_test TO itab.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF LINES( itab ) ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT itab.&lt;/P&gt;&lt;P&gt;    WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; itab-n1, itab-n2.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple code is : &lt;STRONG&gt;Lines(&amp;lt;table name&amp;gt;)&lt;/STRONG&gt; gives number of lines in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the very best to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2008 09:32:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273940#M782672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-02T09:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273941#M782673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;Just include the field SY-TABIX in your Write statement for the internal table. This should help you in achieving the no. of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhavin P Shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2008 09:45:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273941#M782673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-02T09:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273942#M782674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;by using sy-dbcnt we can find the total number of records in the internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2008 09:57:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273942#M782674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-03T09:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273943#M782675</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 zsample.&lt;/P&gt;&lt;P&gt;tables:mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:itab like mara occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data:v_lines type i.&lt;/P&gt;&lt;P&gt;select-options :s_matnr for mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mara into table itab where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear v_lines.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;describe table itab lines v_lines.&lt;/P&gt;&lt;P&gt;write: v_lines , 'No of records in internal table for the given range'.&lt;/P&gt;&lt;P&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;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Sivaparvathi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points if helpful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2008 11:58:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273943#M782675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-03T11:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273944#M782676</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;Internal table in ABAP &lt;/P&gt;&lt;P&gt;*An internal table is a run time instance.  It get created when program starts execution. &lt;/P&gt;&lt;P&gt;*It get destroyed when program terminates. it has two different parts.  HeaderLine(optional) &amp;amp; Body(Compulsory). &lt;/P&gt;&lt;P&gt;*Any value that comes to or goes from interanal table , that travels through headerline.\ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*A related program is . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*declaration. &lt;/P&gt;&lt;P&gt;data: begin of inernaltable occurs 0, &lt;/P&gt;&lt;P&gt;         x type c, &lt;/P&gt;&lt;P&gt;         y type i, &lt;/P&gt;&lt;P&gt;      end of itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*initializing headerline &lt;/P&gt;&lt;P&gt;   internaltable-x = 'd'. &lt;/P&gt;&lt;P&gt;   internaltable-y = 34. &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;*storing value into internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;appene internaltable .  &lt;/P&gt;&lt;P&gt;appene internaltable . &lt;/P&gt;&lt;P&gt;appene internaltable . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*reading internal table &lt;/P&gt;&lt;P&gt;loop at itab . &lt;/P&gt;&lt;P&gt;   write: / internaltable-x, internaltable-y.  "writes to output list &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;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Fields of Internal Tables&lt;/STRONG&gt;&lt;/U&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TABIX &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEARCH &amp;lt;itab&amp;gt; FOR sets SY-TABIX to the index of the table line in which the search string is found. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TFILL &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL contains the number of lines in the relevant internal table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TLENG &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TLENG contains the length of the lines in the relevant internal table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TOCCU &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TLENG contains the initial amount of memory allocated to the relevant internal table. &lt;/P&gt;&lt;P&gt;&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>Fri, 04 Jan 2008 06:31:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273944#M782676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T06:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273945#M782677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can use a system field &lt;STRONG&gt;sy-tabix&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;the value of which which will give u the no of lines in the internal table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 08:27:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273945#M782677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T08:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273946#M782678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U can use the describe statement as said above &lt;/P&gt;&lt;P&gt;or u can run the loop and after the execution of the loop &lt;/P&gt;&lt;P&gt;SY-DBCNT will give the no. of times theloop is  executed or the No. of lines.&lt;/P&gt;&lt;P&gt;Reward points if found usefull.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 10:27:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3273946#M782678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T10:27:00Z</dc:date>
    </item>
  </channel>
</rss>

