<?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 count in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718617#M1579781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the offset concept, so that you can compare the each record from the internal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aahbha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Mar 2011 10:32:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-03-14T10:32:15Z</dc:date>
    <item>
      <title>internal table count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718616#M1579780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I hav one requirment. Please no needful help.. &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;=&amp;gt; How can I not oblige?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;i have one internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aaa           bbb                 ccc                 &lt;/P&gt;&lt;P&gt;1              abc                  20 &lt;/P&gt;&lt;P&gt;1              abc                  21&lt;/P&gt;&lt;P&gt;1              abc                 23&lt;/P&gt;&lt;P&gt;1              abc                 24&lt;/P&gt;&lt;P&gt;1              abc                 25&lt;/P&gt;&lt;P&gt;1              abc                26&lt;/P&gt;&lt;P&gt;2              bca                 30 &lt;/P&gt;&lt;P&gt;2              bca                 31&lt;/P&gt;&lt;P&gt;2              bca                 32&lt;/P&gt;&lt;P&gt;2               bca                33&lt;/P&gt;&lt;P&gt;3              cab                 40&lt;/P&gt;&lt;P&gt;3              cab                 41&lt;/P&gt;&lt;P&gt;3              cab                 42&lt;/P&gt;&lt;P&gt;3              cab                 43&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i have want to count the same lines and have to display in another field in ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;required output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aaa           bbb                 ccc        ddd         &lt;/P&gt;&lt;P&gt;1              abc                  20          6&lt;/P&gt;&lt;P&gt;1              abc                  21&lt;/P&gt;&lt;P&gt;1              abc                 23&lt;/P&gt;&lt;P&gt;1              abc                 24&lt;/P&gt;&lt;P&gt;1              abc                 25&lt;/P&gt;&lt;P&gt;1              abc                26&lt;/P&gt;&lt;P&gt;2              bca                 30          4&lt;/P&gt;&lt;P&gt;2              bca                 31&lt;/P&gt;&lt;P&gt;2              bca                 32&lt;/P&gt;&lt;P&gt;2               bca                33&lt;/P&gt;&lt;P&gt;3              cab                 40          4&lt;/P&gt;&lt;P&gt;3              cab                 41&lt;/P&gt;&lt;P&gt;3              cab                 42&lt;/P&gt;&lt;P&gt;3              cab                 43&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;total 1's are 6 &lt;/P&gt;&lt;P&gt;        2's are 4&lt;/P&gt;&lt;P&gt;       3's are  4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to display in ALV?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;Moderator Message: Spec-dumping is not allowed. Please put some effort of your own first&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kishan P on Mar 14, 2011 4:53 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 10:24:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718616#M1579780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-14T10:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: internal table count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718617#M1579781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the offset concept, so that you can compare the each record from the internal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aahbha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 10:32:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718617#M1579781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-14T10:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: internal table count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718618#M1579782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii...&lt;/P&gt;&lt;P&gt; can u send a sample code plss...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 10:34:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718618#M1579782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-14T10:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: internal table count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718619#M1579783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please have a glane on this webpage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb341a358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb341a358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 10:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718619#M1579783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-14T10:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: internal table count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718620#M1579784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please see i have did like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln ebelp statu aedat matnr menge meins netpr peinh&lt;/P&gt;&lt;P&gt; up to 10 rows&lt;/P&gt;&lt;P&gt;  from ekpo&lt;/P&gt;&lt;P&gt;  into table it_ekko.&lt;/P&gt;&lt;P&gt;  sort it_ekko by ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT_EKKO1[] = IT_EKKO[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_EKKO INTO WA_EKKO.&lt;/P&gt;&lt;P&gt;  WA_EKKO2-EBELN = WA_EKKO-EBELN.&lt;/P&gt;&lt;P&gt; WA_EKKO2-cnt1 = WA_EKKO2-cnt1 + 1.&lt;/P&gt;&lt;P&gt; COLLECT WA_EKKO2 INTO IT_EKKO2.&lt;/P&gt;&lt;P&gt; clear wa_ekko2-cnt1.&lt;/P&gt;&lt;P&gt; clear wa_ekko2.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 10:50:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718620#M1579784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-14T10:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: internal table count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718621#M1579785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;now i have to display the count in it_ekko &lt;/P&gt;&lt;P&gt;loop at it_ekko into wa_ekko where ebeln = wa_ekko2-ebeln.&lt;/P&gt;&lt;P&gt;  wa_ekko-cnt = wa_ekko2-cnt1.&lt;/P&gt;&lt;P&gt; modify it_ekko from wa_ekko.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm not getting the output&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 10:52:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718621#M1579785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-14T10:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: internal table count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718622#M1579786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to implement below logic...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; pass the internla table data into temp internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; sort temp internal table by aaa bbb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear count.&lt;/P&gt;&lt;P&gt; loop at temp internal table into workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-tabix EQ 1.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   lv_aaa = workarea-aaa.&lt;/P&gt;&lt;P&gt;   lv_bbb = workarea-bbb.&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;  if lv_aaa EQ workarea-aaa and lv_bbb EQ workarea-bbb.&lt;/P&gt;&lt;P&gt;   count = count + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    update the final table column with the variable COUNT.&lt;/P&gt;&lt;P&gt;    clear count.&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;  claer workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLoop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 10:53:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718622#M1579786</guid>
      <dc:creator>nirajgadre</dc:creator>
      <dc:date>2011-03-14T10:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: internal table count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718623#M1579787</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 internal table by first field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; And then loop itab. Within that loop, use control break statement 'AT END OF' first field. within that AT END..ENDAT. increase the record count. Update your other internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab into wa.
 wa2-fleid1 = wa1-field1.
 wa2-fleid2 = wa1-field2.
 wa2-fleid3 = wa1-field3.
 count = count + 1.
 at end  of wa-filed1.
  wa2-fleid4 = count.
  clear count.
 endat.
append wa2 to itab2.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen Inuganti.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 10:56:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718623#M1579787</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2011-03-14T10:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: internal table count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718624#M1579788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i have to display in ALV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 10:58:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718624#M1579788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-14T10:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: internal table count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718625#M1579789</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;Use the function module 'REUSE_ALV_GRID_DISPLAY' for ALV grid display .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_callback_program = g_repid&lt;/P&gt;&lt;P&gt;        i_grid_title       = g_c_grid_title&lt;/P&gt;&lt;P&gt;        is_layout          = g_s_layout&lt;/P&gt;&lt;P&gt;        it_fieldcat        = g_t_fieldcat&lt;/P&gt;&lt;P&gt;        i_save             = 'A'&lt;/P&gt;&lt;P&gt;        is_variant         = g_variant&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        t_outtab           = g_t_outtab   -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;&amp;gt; give your final internal table here&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        program_error      = 1&lt;/P&gt;&lt;P&gt;        OTHERS             = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Soumya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 11:22:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718625#M1579789</guid>
      <dc:creator>soumya_jose3</dc:creator>
      <dc:date>2011-03-14T11:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: internal table count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718626#M1579790</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;Use the logic below and before calling the function module to display ALV, pass the internal table with all 4 fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT it_test BY aaa ASCENDING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_test INTO wa_test.&lt;/P&gt;&lt;P&gt;          lv_index = sy-tabix.&lt;/P&gt;&lt;P&gt;  AT NEW aaa.&lt;/P&gt;&lt;P&gt;    LOOP AT it_test INTO wa_test_temp WHERE aaa = wa_test-aaa.&lt;/P&gt;&lt;P&gt;      lv_count = lv_count + 1.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;    MOVE lv_count TO wa_test-ddd.&lt;/P&gt;&lt;P&gt;    MODIFY it_test FROM wa_test INDEX lv_index TRANSPORTING ddd.&lt;/P&gt;&lt;P&gt;    CLEAR lv_count.&lt;/P&gt;&lt;P&gt;  ENDAT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 11:26:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-count/m-p/7718626#M1579790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-14T11:26:56Z</dc:date>
    </item>
  </channel>
</rss>

