<?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: alv reports in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/3054123#M723183</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;&lt;/P&gt;&lt;P&gt;   U can do only total n subtotal in alv report for that refer this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Pass the values to the table&lt;/P&gt;&lt;P&gt;  lwa_sort-fieldname = 'PERNR'.             "Field name in o/p inttable&lt;/P&gt;&lt;P&gt;  lwa_sort-tabname   = 'it_final2'.         "Output Internal table&lt;/P&gt;&lt;P&gt;  lwa_sort-spos      = '1'.                 "Sort  sequence&lt;/P&gt;&lt;P&gt;  lwa_sort-up        = 'X'.                 "Sort in ascending order&lt;/P&gt;&lt;P&gt;  lwa_sort-down      = ' '.                 "Sort in descending order&lt;/P&gt;&lt;P&gt;  lwa_sort-subtot    = 'X'.                 "Subtotal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND lwa_sort TO lit_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Pass the values to the table&lt;/P&gt;&lt;P&gt;  lwa_sort-fieldname = 'WORKDATE'.          "Field name in o/p inttable&lt;/P&gt;&lt;P&gt;  lwa_sort-tabname   = 'it_final2'.         "Output Internal table&lt;/P&gt;&lt;P&gt;  lwa_sort-spos      = '2'.                 "Sort  sequence&lt;/P&gt;&lt;P&gt;  lwa_sort-up        = 'X'.                 "Sort in ascending order&lt;/P&gt;&lt;P&gt;  lwa_sort-down      = ' '.                 "Sort in descending order&lt;/P&gt;&lt;P&gt;  lwa_sort-subtot    = ' '.                 "Subtotal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND lwa_sort TO lit_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Pass the values to the table&lt;/P&gt;&lt;P&gt;  lwa_sort-fieldname = 'WEKLY'.             "Field name in o/p inttable&lt;/P&gt;&lt;P&gt;  lwa_sort-tabname   = 'it_final2'.         "Output Internal table&lt;/P&gt;&lt;P&gt;  lwa_sort-spos      = '3'.                 "Sort  sequence&lt;/P&gt;&lt;P&gt;  lwa_sort-up        = 'X'.                 "Sort in ascending order&lt;/P&gt;&lt;P&gt;  lwa_sort-down      = ' '.                 "Sort in descending order&lt;/P&gt;&lt;P&gt;  lwa_sort-subtot    = ' '.                 "Subtotal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND lwa_sort TO lit_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_layout-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT it_final2[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Call the function module to display the ALV report&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;        is_layout          = wa_layout&lt;/P&gt;&lt;P&gt;        i_callback_program = v_repid&lt;/P&gt;&lt;P&gt;        it_fieldcat        = it_fieldcat1[]&lt;/P&gt;&lt;P&gt;        i_default          = c_chk&lt;/P&gt;&lt;P&gt;        i_save             = c_save&lt;/P&gt;&lt;P&gt;        it_sort            = lit_sort&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        t_outtab           = it_final2&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;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&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;*--Message No data found&lt;/P&gt;&lt;P&gt;    MESSAGE i888 WITH text-017.&lt;/P&gt;&lt;P&gt;    LEAVE LIST-PROCESSING.&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;ENDFORM.                    " sub_display_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u want to average n percentage also then do it manually store it in one internal table n use block alv to display 2 internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  sub_alv_display                                          *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; This form displays the output using REUSE_ALV_GRID_DISPLAY          *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; function module                                                     *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM sub_alv_display .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Local Variables&lt;/P&gt;&lt;P&gt;  DATA : lv_index LIKE sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_callback_program = v_repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_layout1-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            is_layout                  = wa_layout1&lt;/P&gt;&lt;P&gt;            it_fieldcat                = it_fieldcat[]&lt;/P&gt;&lt;P&gt;            i_tabname                  = 'it_final'&lt;/P&gt;&lt;P&gt;            it_events                  = it_events&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab                   = it_final&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            program_error              = 1&lt;/P&gt;&lt;P&gt;            maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;            OTHERS                     = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_fieldcat INTO wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    lv_index = sy-tabix.&lt;/P&gt;&lt;P&gt;    IF wa_fieldcat-fieldname = 'ERDAT'.&lt;/P&gt;&lt;P&gt;      wa_fieldcat-fieldname = 'TITLE'.&lt;/P&gt;&lt;P&gt;      wa_fieldcat-seltext_m = text-026.&lt;/P&gt;&lt;P&gt;      wa_fieldcat-outputlen = 10.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODIFY it_fieldcat FROM wa_fieldcat INDEX lv_index TRANSPORTING&lt;/P&gt;&lt;P&gt;                                        fieldname seltext_m outputlen.&lt;/P&gt;&lt;P&gt;    CLEAR : wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  wa_layout2-no_colhead = 'X'.&lt;/P&gt;&lt;P&gt;  wa_layout2-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            is_layout                  = wa_layout2&lt;/P&gt;&lt;P&gt;            it_fieldcat                = it_fieldcat[]&lt;/P&gt;&lt;P&gt;            i_tabname                  = 'it_total'&lt;/P&gt;&lt;P&gt;            it_events                  = it_event1&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab                   = it_total&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            program_error              = 1&lt;/P&gt;&lt;P&gt;            maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;            OTHERS                     = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_layout3-no_colhead = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            is_layout                  = wa_layout3&lt;/P&gt;&lt;P&gt;            it_fieldcat                = it_fieldcat2[]&lt;/P&gt;&lt;P&gt;            i_tabname                  = 'it_ship'&lt;/P&gt;&lt;P&gt;            it_events                  = it_event2&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab                   = it_ship&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            program_error              = 1&lt;/P&gt;&lt;P&gt;            maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;            OTHERS                     = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT it_final IS INITIAL OR&lt;/P&gt;&lt;P&gt;     NOT it_total IS INITIAL OR&lt;/P&gt;&lt;P&gt;     NOT it_ship IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'&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;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                                  "sub_alv_display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also see this standard program  ALV Block List  BALVBT01 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Nov 2007 12:17:35 GMT</pubDate>
    <dc:creator>former_member386202</dc:creator>
    <dc:date>2007-11-28T12:17:35Z</dc:date>
    <item>
      <title>alv reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/3054119#M723179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;i have problem how to do total ,subtotal and average and percentage of individual,&lt;/P&gt;&lt;P&gt;please can any body give me the solution if possible reference code.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;sasi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 12:11:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/3054119#M723179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T12:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: alv reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/3054120#M723180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Follow the steps below .....to get Subtotals and Grand totals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;Define SORT table and FIELDCATALOG table .&lt;/P&gt;&lt;P&gt;Data :i_field type slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;w_field like line of i_field,&lt;/P&gt;&lt;P&gt;i_sort type slis_t_sortinfo_alv,&lt;/P&gt;&lt;P&gt;w_sort like line of i_sort.&lt;/P&gt;&lt;P&gt;2.Grand Total&lt;/P&gt;&lt;P&gt;While buildingfieldcatalog,We have to set DO_SUM = 'X' for quantity field .&lt;/P&gt;&lt;P&gt;ex.&lt;/P&gt;&lt;P&gt;w_field-fieldname = 'MENGE'.&lt;/P&gt;&lt;P&gt;w_field-tabname = 'I_TAB'.&lt;/P&gt;&lt;P&gt;w_field-DO_SUM = 'X'.&lt;/P&gt;&lt;P&gt;append w_field to i_field.&lt;/P&gt;&lt;P&gt;clear w_field.&lt;/P&gt;&lt;P&gt;3.Subtotal&lt;/P&gt;&lt;P&gt;Whenever WERKS is changed Subtotal is displayed .&lt;/P&gt;&lt;P&gt;Build sort table .&lt;/P&gt;&lt;P&gt;Clear: w_sort,i_sort[].&lt;/P&gt;&lt;P&gt;w_sort-spos = 1.&lt;/P&gt;&lt;P&gt;w_sort-fieldname = 'WERKS'.&lt;/P&gt;&lt;P&gt;w_sort-up = 'X'.&lt;/P&gt;&lt;P&gt;w_sort-subtot = 'X'.&lt;/P&gt;&lt;P&gt;append w_sort to i_sort.&lt;/P&gt;&lt;P&gt;clear w_sort. &lt;/P&gt;&lt;P&gt;4.&lt;/P&gt;&lt;P&gt;Pass this I_SORT table thru REUSE_ALV_LIST_DISPLAY function module ..like fieldcatalog table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want average then use DO_SUM = 'C'."instead of 'X'&lt;/P&gt;&lt;P&gt;then totals will be shown interms of average.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can't get percentage in ALV by default because ALV don't provide this functionality. You can write the simple code: value/ total * 100 and then display the same in the ALV.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 12:13:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/3054120#M723180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T12:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: alv reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/3054121#M723181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for totalsin slis_T_fieldcat_alv in that table u have field named DO_SUM = 'X' set this for &lt;/P&gt;&lt;P&gt;the field which are u want to calculate total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for subtotal in slis_t_sortinfo_alv in that structure u have field named&lt;/P&gt;&lt;P&gt;SUBTOT = 'X' set this field which are u want to calculate subtotal. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and plz do refer to the links also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer this link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=20386" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=20386&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=85191" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=85191&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=88401" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=88401&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=17335" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=17335&lt;/A&gt; &lt;/P&gt;&lt;P&gt;ALV Group Heading&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/fu037.htm" target="test_blank"&gt;http://www.sap-img.com/fu037.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm" target="test_blank"&gt;http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/sample-alv-heading-in-alv.htm" target="test_blank"&gt;http://www.sap-img.com/abap/sample-alv-heading-in-alv.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 12:14:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/3054121#M723181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T12:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: alv reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/3054122#M723182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reprots&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/reports.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/reports.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/material.html" target="test_blank"&gt;http://www.allsaplinks.com/material.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/reportinghome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/reportinghome.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Please give me general info on ALV.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=58286" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=58286&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=76490" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=76490&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=20591" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=20591&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=66305" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=66305&lt;/A&gt; - this one discusses which way should you use - ABAP Objects calls or simple function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. How do I program double click in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=11601" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=11601&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=23010" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=23010&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. How do I add subtotals (I have problem to add them)...&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=20386" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=20386&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=85191" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=85191&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=88401" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=88401&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=17335" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=17335&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. How to add list heading like top-of-page in ABAP lists?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=58775" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=58775&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=60550" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=60550&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=16629" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=16629&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. How to print page number / total number of pages X/XX in ALV? &lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=29597" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=29597&lt;/A&gt; (no direct solution)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=64320" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=64320&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=44477" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=44477&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. How can I set the cell color in ALV? &lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=52107" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=52107&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. How do I print a logo/graphics in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=81149" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=81149&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=35498" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=35498&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=5013" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=5013&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9. How do I create and use input-enabled fields in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=84933" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=84933&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=69878" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=69878&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10. How can I use ALV for reports that are going to be run in background?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=83243" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=83243&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=19224" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=19224&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11. How can I display an icon in ALV? (Common requirement is traffic light icon).&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=79424" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=79424&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=24512" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=24512&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12. How can I display a checkbox in ALV? &lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=88376" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=88376&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=40968" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=40968&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=6919" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=6919&lt;/A&gt;&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;/P&gt;&lt;P&gt;Check this for basic concepts of OOPS&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tabstrip&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Editable ALV&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tree&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;General Tutorial for OOPS&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alvhome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alvhome.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/what-is-alv-programming.htm" target="test_blank"&gt;http://www.sap-img.com/abap/what-is-alv-programming.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap-function.htm" target="test_blank"&gt;http://www.sap-img.com/abap-function.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/mpioud/Abap_programs.html" target="test_blank"&gt;http://www.geocities.com/mpioud/Abap_programs.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alvtree%5Calvtree_basic.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alvtree%5Calvtree_basic.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf" target="test_blank"&gt;http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap-function.htm" target="test_blank"&gt;http://www.sap-img.com/abap-function.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 12:15:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/3054122#M723182</guid>
      <dc:creator>abdulazeez12</dc:creator>
      <dc:date>2007-11-28T12:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: alv reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/3054123#M723183</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;&lt;/P&gt;&lt;P&gt;   U can do only total n subtotal in alv report for that refer this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Pass the values to the table&lt;/P&gt;&lt;P&gt;  lwa_sort-fieldname = 'PERNR'.             "Field name in o/p inttable&lt;/P&gt;&lt;P&gt;  lwa_sort-tabname   = 'it_final2'.         "Output Internal table&lt;/P&gt;&lt;P&gt;  lwa_sort-spos      = '1'.                 "Sort  sequence&lt;/P&gt;&lt;P&gt;  lwa_sort-up        = 'X'.                 "Sort in ascending order&lt;/P&gt;&lt;P&gt;  lwa_sort-down      = ' '.                 "Sort in descending order&lt;/P&gt;&lt;P&gt;  lwa_sort-subtot    = 'X'.                 "Subtotal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND lwa_sort TO lit_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Pass the values to the table&lt;/P&gt;&lt;P&gt;  lwa_sort-fieldname = 'WORKDATE'.          "Field name in o/p inttable&lt;/P&gt;&lt;P&gt;  lwa_sort-tabname   = 'it_final2'.         "Output Internal table&lt;/P&gt;&lt;P&gt;  lwa_sort-spos      = '2'.                 "Sort  sequence&lt;/P&gt;&lt;P&gt;  lwa_sort-up        = 'X'.                 "Sort in ascending order&lt;/P&gt;&lt;P&gt;  lwa_sort-down      = ' '.                 "Sort in descending order&lt;/P&gt;&lt;P&gt;  lwa_sort-subtot    = ' '.                 "Subtotal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND lwa_sort TO lit_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Pass the values to the table&lt;/P&gt;&lt;P&gt;  lwa_sort-fieldname = 'WEKLY'.             "Field name in o/p inttable&lt;/P&gt;&lt;P&gt;  lwa_sort-tabname   = 'it_final2'.         "Output Internal table&lt;/P&gt;&lt;P&gt;  lwa_sort-spos      = '3'.                 "Sort  sequence&lt;/P&gt;&lt;P&gt;  lwa_sort-up        = 'X'.                 "Sort in ascending order&lt;/P&gt;&lt;P&gt;  lwa_sort-down      = ' '.                 "Sort in descending order&lt;/P&gt;&lt;P&gt;  lwa_sort-subtot    = ' '.                 "Subtotal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND lwa_sort TO lit_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_layout-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT it_final2[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Call the function module to display the ALV report&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;        is_layout          = wa_layout&lt;/P&gt;&lt;P&gt;        i_callback_program = v_repid&lt;/P&gt;&lt;P&gt;        it_fieldcat        = it_fieldcat1[]&lt;/P&gt;&lt;P&gt;        i_default          = c_chk&lt;/P&gt;&lt;P&gt;        i_save             = c_save&lt;/P&gt;&lt;P&gt;        it_sort            = lit_sort&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        t_outtab           = it_final2&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;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&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;*--Message No data found&lt;/P&gt;&lt;P&gt;    MESSAGE i888 WITH text-017.&lt;/P&gt;&lt;P&gt;    LEAVE LIST-PROCESSING.&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;ENDFORM.                    " sub_display_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u want to average n percentage also then do it manually store it in one internal table n use block alv to display 2 internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  sub_alv_display                                          *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; This form displays the output using REUSE_ALV_GRID_DISPLAY          *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; function module                                                     *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM sub_alv_display .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Local Variables&lt;/P&gt;&lt;P&gt;  DATA : lv_index LIKE sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_callback_program = v_repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_layout1-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            is_layout                  = wa_layout1&lt;/P&gt;&lt;P&gt;            it_fieldcat                = it_fieldcat[]&lt;/P&gt;&lt;P&gt;            i_tabname                  = 'it_final'&lt;/P&gt;&lt;P&gt;            it_events                  = it_events&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab                   = it_final&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            program_error              = 1&lt;/P&gt;&lt;P&gt;            maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;            OTHERS                     = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_fieldcat INTO wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    lv_index = sy-tabix.&lt;/P&gt;&lt;P&gt;    IF wa_fieldcat-fieldname = 'ERDAT'.&lt;/P&gt;&lt;P&gt;      wa_fieldcat-fieldname = 'TITLE'.&lt;/P&gt;&lt;P&gt;      wa_fieldcat-seltext_m = text-026.&lt;/P&gt;&lt;P&gt;      wa_fieldcat-outputlen = 10.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODIFY it_fieldcat FROM wa_fieldcat INDEX lv_index TRANSPORTING&lt;/P&gt;&lt;P&gt;                                        fieldname seltext_m outputlen.&lt;/P&gt;&lt;P&gt;    CLEAR : wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  wa_layout2-no_colhead = 'X'.&lt;/P&gt;&lt;P&gt;  wa_layout2-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            is_layout                  = wa_layout2&lt;/P&gt;&lt;P&gt;            it_fieldcat                = it_fieldcat[]&lt;/P&gt;&lt;P&gt;            i_tabname                  = 'it_total'&lt;/P&gt;&lt;P&gt;            it_events                  = it_event1&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab                   = it_total&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            program_error              = 1&lt;/P&gt;&lt;P&gt;            maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;            OTHERS                     = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_layout3-no_colhead = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            is_layout                  = wa_layout3&lt;/P&gt;&lt;P&gt;            it_fieldcat                = it_fieldcat2[]&lt;/P&gt;&lt;P&gt;            i_tabname                  = 'it_ship'&lt;/P&gt;&lt;P&gt;            it_events                  = it_event2&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab                   = it_ship&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            program_error              = 1&lt;/P&gt;&lt;P&gt;            maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;            OTHERS                     = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT it_final IS INITIAL OR&lt;/P&gt;&lt;P&gt;     NOT it_total IS INITIAL OR&lt;/P&gt;&lt;P&gt;     NOT it_ship IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'&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;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                                  "sub_alv_display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also see this standard program  ALV Block List  BALVBT01 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 12:17:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/3054123#M723183</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2007-11-28T12:17:35Z</dc:date>
    </item>
  </channel>
</rss>

