<?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: problem in ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988865#M73712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why dont you calculate your average in ABAP and then pass it to ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new internal table &lt;/P&gt;&lt;P&gt;VBELN, VBPOS, COUNT, ATTMNT,&lt;/P&gt;&lt;P&gt;( Use Collect to populate this table . While collecting always sset count as '1'. After populating this table calculate average as ATTMNT / COUNT  and modify this table. Loop at your original table, and modify individual lines by matching VBELN/VBPOS from second table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then pass this table to ALV.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Oct 2005 09:01:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-10-05T09:01:52Z</dc:date>
    <item>
      <title>problem in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988858#M73705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;   I am having a problem in which suppose if i am getting duplicate records on the basis of vbeln and zposn, i have to sum up all the fields related to currency. and also there is field called zattnmnt which is numeric and the average of all duplicate records of this field should be displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg., my records are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vbeln-zposn-zattnmnt-tot&lt;/P&gt;&lt;P&gt;001&lt;DEL&gt;-10001-70&lt;/DEL&gt;-----5000&lt;/P&gt;&lt;P&gt;001&lt;DEL&gt;-10001-100&lt;/DEL&gt;----4000&lt;/P&gt;&lt;P&gt;001&lt;DEL&gt;-10001-50&lt;/DEL&gt;-----3000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the o/p should be displayed as&lt;/P&gt;&lt;P&gt;001&lt;DEL&gt;-10001-73&lt;/DEL&gt;-----12000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;help me in this context&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2005 06:59:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988858#M73705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-05T06:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988859#M73706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ALV cant condense rows, it can add summarizing rows. You have to code that for your own. See online help fot statement collect, this might by helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2005 07:01:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988859#M73706</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2005-10-05T07:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988860#M73707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ateeq,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this inside the ALV itself using the SORT option. Here is that sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:   wa_layout  TYPE slis_layout_alv,&lt;/P&gt;&lt;P&gt;        it_sort  TYPE slis_t_sortinfo_alv,&lt;/P&gt;&lt;P&gt;        wa_sort  TYPE slis_sortinfo_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR wm_sort.&lt;/P&gt;&lt;P&gt;  wm_sort-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;  wm_sort-tabname = 'IT_SORT'.&lt;/P&gt;&lt;P&gt;  wm_sort-up = 'X'.&lt;/P&gt;&lt;P&gt;  wm_sort-subtot = 'X'.&lt;/P&gt;&lt;P&gt;  APPEND wa_sort TO it_sort.&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          = w_repid&lt;/P&gt;&lt;P&gt;      i_callback_top_of_page      = 'ALV_TOP_OF_PAGE'&lt;/P&gt;&lt;P&gt;      i_callback_html_top_of_page = 'ALV_HTML_TOP_OF_PAGE'&lt;/P&gt;&lt;P&gt;      is_layout                   = wa_layout&lt;/P&gt;&lt;P&gt;      it_fieldcat                 = it_fieldcat&lt;/P&gt;&lt;P&gt;      it_events                   = it_events&lt;/P&gt;&lt;P&gt;      it_sort                     = it_sort&lt;/P&gt;&lt;P&gt;      i_default                   = 'X'&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Vinod C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2005 07:09:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988860#M73707</guid>
      <dc:creator>Vinod_Chandran</dc:creator>
      <dc:date>2005-10-05T07:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988861#M73708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You then will have 4 rows, not one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2005 07:11:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988861#M73708</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2005-10-05T07:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988862#M73709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;with collect statement my problem is half solved. remaining is i have to find the average of the field &lt;/P&gt;&lt;P&gt;%atmnt if 3 records were printed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e., %atmnt/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz help me in this work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2005 08:21:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988862#M73709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-05T08:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988863#M73710</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 can use the event ALV GROUPLEVEL_CHANGE to calucalate and write the average.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2005 08:27:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988863#M73710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-05T08:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988864#M73711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, i couldn't specify the problem to u..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are 3 duplicate records. only the summarized record will be displayed. the duplicate records will not be be displayed. the totals are the sum of 3 records and the %attmnt (numeric field) is also showing the sum. now i have to find the average of the %attmnt and display it instead of sum. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx 4 ur spirit in responding quickly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2005 08:37:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988864#M73711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-05T08:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988865#M73712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why dont you calculate your average in ABAP and then pass it to ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new internal table &lt;/P&gt;&lt;P&gt;VBELN, VBPOS, COUNT, ATTMNT,&lt;/P&gt;&lt;P&gt;( Use Collect to populate this table . While collecting always sset count as '1'. After populating this table calculate average as ATTMNT / COUNT  and modify this table. Loop at your original table, and modify individual lines by matching VBELN/VBPOS from second table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then pass this table to ALV.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2005 09:01:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-alv/m-p/988865#M73712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-05T09:01:52Z</dc:date>
    </item>
  </channel>
</rss>

