<?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: REUSE_ALV_GRID_DISPLAY -  Count functionality in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079419#M431317</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I checked in my Netweaver system, and it does appear there, but you need to turn it on.  It appears that you can do so using the IS_layout parameter.   Set the COUNTFNAME field to 'X' and pass the layout parameter to the function call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2007 14:53:19 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-03-28T14:53:19Z</dc:date>
    <item>
      <title>REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079418#M431316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used REUSE_ALV_GRID_DISPLAY in one of my ALV report. My requirement is to activate the Count functionality seen under&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Edit -&amp;gt; Calculate -&amp;gt; Count
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now this count is greyed out. How can we activate it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 14:47:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079418#M431316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T14:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079419#M431317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I checked in my Netweaver system, and it does appear there, but you need to turn it on.  It appears that you can do so using the IS_layout parameter.   Set the COUNTFNAME field to 'X' and pass the layout parameter to the function call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 14:53:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079419#M431317</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-28T14:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079420#M431318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still unable to figure this out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone help me out with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:07:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079420#M431318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T17:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079421#M431319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry,  try to fille the COUNTFNAME with a valid field name from your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:09:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079421#M431319</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-28T17:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079422#M431320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do u have a PF status for the ALV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:10:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079422#M431320</guid>
      <dc:creator>aakash_neelaperumal2</dc:creator>
      <dc:date>2007-03-28T17:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079423#M431321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, I do not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:13:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079423#M431321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T17:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079424#M431322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See this example, works good in my system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT  zrich_0001.


* Global ALV Data Declarations
TYPE-POOLS: slis.

* Internal Tables
DATA: BEGIN OF ialv OCCURS 0,
      test1(10) TYPE c,
      test2(10) TYPE c,
      count TYPE i,                        "&amp;lt;-----  HERE
      END OF ialv.

DATA: fieldcat  TYPE slis_t_fieldcat_alv.
DATA: layout    TYPE slis_layout_alv.

START-OF-SELECTION.

  PERFORM get_data.
  PERFORM call_alv.

*********************************************************************
*      Form  GET_DATA
*********************************************************************
FORM get_data.

  ialv-test1 = 'ABC'.
  ialv-test2 = 'DEF'.
  ialv-count = '1'.                 "&amp;lt;-----  HERE
  APPEND ialv.

  ialv-test1 = 'GHI'.
  ialv-test2 = 'JKL'.
  ialv-count = '1'.                "&amp;lt;-----  HERE
  APPEND ialv.


  ialv-test1 = '123'.
  ialv-test2 = '456'.
  ialv-count = '1'.                   "&amp;lt;-----  HERE
  APPEND ialv.


ENDFORM.                    "GET_DATA

************************************************************************

*  CALL_ALV
************************************************************************

FORM call_alv.

  PERFORM build_field_catalog.

layout-countfname = 'COUNT'.              "&amp;lt;-----  HERE

* Call ABAP List Viewer (ALV)
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      is_layout    = layout
      it_fieldcat  = fieldcat
    TABLES
      t_outtab     = ialv.

ENDFORM.                    "CALL_ALV

************************************************************************

* BUILD_FIELD_CATALOG
************************************************************************

FORM build_field_catalog.


  CLEAR: fieldcat. REFRESH: fieldcat.

  DATA: tmp_fc TYPE slis_fieldcat_alv.

  tmp_fc-reptext_ddic = 'Test1'.
  tmp_fc-fieldname    = 'TEST1'.
  tmp_fc-tabname      = 'IALV'.
  tmp_fc-outputlen    = '10'.
  APPEND tmp_fc TO fieldcat.

  tmp_fc-reptext_ddic = 'Test2'.
  tmp_fc-fieldname    = 'TEST2'.
  tmp_fc-tabname      = 'IALV'.
  tmp_fc-outputlen    = '10'.
  APPEND tmp_fc TO fieldcat.


ENDFORM.                    "BUILD_FIELD_CATALOG

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the output, you can now choose the "Count" option from the menu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich HEilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:19:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079424#M431322</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-28T17:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079425#M431323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even if you would not fill the COUNT field in your internal table, the total line would still show 3 as the total count of lines.    So comment out the lines which fill the COUNT field when building the internal table in the sample program, and see that the count function works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:20:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079425#M431323</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-28T17:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079426#M431324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your sample code. Initially we would see only two columns. Thats good. When I go with Count we will get Count column as extra (we see 3 columns now) and we see the count in the count column. Makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what I was thinking is we would select any one column and press the count in menu and we would get the count in the same coulmn at the bottom. I don't know if this is possible. What do you think Rich?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried something like this earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a MENGE column in the output which has sub totals. I gave MENGE to layout-countfname and I got the count properly but subtotals were missing in this column. So I think its not good to pass columns which have totals to layout-countfname as it may disturb the totals.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:47:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079426#M431324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T17:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079427#M431325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sounds like I have answered my own  question in  my last reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bottom line is I think your idea makes sense Rich. I gotto have a seperate column for count in order to not to disturb other columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you have any other ideas other than this approach Rich?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:51:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079427#M431325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T17:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079428#M431326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if that is the suggested funtionality,  meaning, not sure if that is how they meant it to work,  I've been playing with it, and the more I do, the less I like it. I find it a little miss leading.  Why do you require this functionality?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rich HEilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:52:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079428#M431326</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-28T17:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079429#M431327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont know I am waiting for more information from my functional guy. Earlier he just asked to activate the Count in menu. Thats how all this mess started.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, one more think what I observed is if you go wtih Count for the second time in your approach the count column disappears. So it is not a good idea to pass the actual internal table fields to layout-coutnfname as there is chance of them disappearing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your earlier approach with seperate column for Count makes more sense to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:57:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079429#M431327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T17:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079430#M431328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ohhhhhh....... and a little buggy.   &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;  Yikes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 17:58:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079430#M431328</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-28T17:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079431#M431329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a requirement for the same functionality &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a report which shows the employee absences for a month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you have an alv with in every row an employee number and in the colums all the days of a month&lt;/P&gt;&lt;P&gt;every day can be filled with nothing, an absence or workschedule parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now an projectmanager sees the list and wants to know how many employees are available on a certain day and how many are absent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I can use count as the requirment is also above then the column would seperate all the possibilities &lt;/P&gt;&lt;P&gt;like &lt;/P&gt;&lt;P&gt;10 available&lt;/P&gt;&lt;P&gt;5 abscent&lt;/P&gt;&lt;P&gt;2 ill&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;still looking for a solution &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;arthur de smidt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 12:24:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079431#M431329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T12:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: REUSE_ALV_GRID_DISPLAY -  Count functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079432#M431330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I followed Rich's advice above and this worked perfectly for me.  It was the solution I was looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help Rich!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Robin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2010 23:06:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reuse-alv-grid-display-count-functionality/m-p/2079432#M431330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-09T23:06:53Z</dc:date>
    </item>
  </channel>
</rss>

