<?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: simple Grid display in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281929#M784882</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all I would like to explain you the various ways of creating an ALV grid for displayng purposes.&lt;/P&gt;&lt;P&gt;1) It can be prepared using ABAP Objects.&lt;/P&gt;&lt;P&gt;2) It can be done through Standard Predefined Type Pools avaliable to us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are few other ways also, but putting down the simplest of all for you.&lt;/P&gt;&lt;P&gt;Out of these two the second option is the easiest one according to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will explain you the steps you need to follow in creating an ALV grid using an Executable program / Report Program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create a Report Program&lt;/P&gt;&lt;P&gt;2) Define an Intialization event in your Report program to Define all your variables, types and type-pools.&lt;/P&gt;&lt;P&gt;( Here you need to mention your type pool: SLIS.)&lt;/P&gt;&lt;P&gt;3) Now comes your validations if required in your application. This can be done using At Selection-Screen event.&lt;/P&gt;&lt;P&gt;4) Next is your Start-Of-Selection Event where in you populate the data in to your internal table which will be defined in your Initialization event.&lt;/P&gt;&lt;P&gt;5) Here in this event you need to populate the Field-Catalog also for ALV recognition purpose.&lt;/P&gt;&lt;P&gt;6) Atlast comes your End-Of-Selection Event. Here you will call the ALV function module "REUSE_ ALV_GRID_DISPLAY"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jan 2008 07:32:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-21T07:32:17Z</dc:date>
    <item>
      <title>simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281920#M784873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;help me how to create  simple ALV grid display&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 06:10:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281920#M784873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T06:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281921#M784874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi nitin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see the below link and it will automatically generates the ALV grid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.alvrobot.ar.com" target="test_blank"&gt;www.alvrobot.ar.com&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;reward if its useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 06:12:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281921#M784874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T06:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281922#M784875</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;check the below link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdev.co.uk/reporting/alv/alvgrid.htm" target="test_blank"&gt;http://www.sapdev.co.uk/reporting/alv/alvgrid.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 06:14:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281922#M784875</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2008-01-21T06:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281923#M784876</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;check out this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-POOLs: slis.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;--&lt;/STRONG&gt;&lt;DEL&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="--------------" /&gt;ALV Related Variables--&lt;HR originaltext="--------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lt_fcat          TYPE slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;      lw_fcat          TYPE slis_fieldcat_alv,&lt;/P&gt;&lt;P&gt;      lv_variant       TYPE disvariant,&lt;/P&gt;&lt;P&gt;      lv_layout        TYPE slis_layout_alv,&lt;/P&gt;&lt;P&gt;      lt_sort          type slis_t_sortinfo_alv,&lt;/P&gt;&lt;P&gt;      lw_sort          type slis_sortinfo_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of ty_vbap,&lt;/P&gt;&lt;P&gt;       vbeln type vbap-vbeln,&lt;/P&gt;&lt;P&gt;       posnr type vbap-posnr,&lt;/P&gt;&lt;P&gt;       zmeng type vbap-zmeng,&lt;/P&gt;&lt;P&gt;       umzin type vbap-umzin,&lt;/P&gt;&lt;P&gt;       end  of ty_vbap.&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;data: lt_vbap type table of ty_vbap.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbeln posnr zmeng umzin&lt;/P&gt;&lt;P&gt;       from  vbap&lt;/P&gt;&lt;P&gt;       into  table lt_vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort lt_vbap descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear lw_fcat.&lt;/P&gt;&lt;P&gt;lw_fcat-fieldname = 'VBELN'.&lt;/P&gt;&lt;P&gt;lw_fcat-seltext_l = 'Sales document'.&lt;/P&gt;&lt;P&gt;append lw_fcat to lt_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear lw_fcat.&lt;/P&gt;&lt;P&gt;lw_fcat-fieldname = 'POSNR'.&lt;/P&gt;&lt;P&gt;lw_fcat-seltext_l = 'Sales document'.&lt;/P&gt;&lt;P&gt;append lw_fcat to lt_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear lw_fcat.&lt;/P&gt;&lt;P&gt;lw_fcat-fieldname = 'ZMENG'.&lt;/P&gt;&lt;P&gt;lw_fcat-seltext_l = 'Sales document'.&lt;/P&gt;&lt;P&gt;lw_fcat-do_sum = 'X'.&lt;/P&gt;&lt;P&gt;append lw_fcat to lt_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear lw_fcat.&lt;/P&gt;&lt;P&gt;lw_fcat-fieldname = 'UMZIN'.&lt;/P&gt;&lt;P&gt;lw_fcat-seltext_l = 'Sales document'.&lt;/P&gt;&lt;P&gt;lw_fcat-do_sum = 'X'.&lt;/P&gt;&lt;P&gt;append lw_fcat to lt_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*lw_sort-spos = 1.&lt;/P&gt;&lt;P&gt;*lw_sort-fieldname = 'VBELN'.&lt;/P&gt;&lt;P&gt;*LW_SORT-Up = 'X'.&lt;/P&gt;&lt;P&gt;*append lw_sort to lt_sort.&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;clear lw_sort.&lt;/P&gt;&lt;P&gt;lw_sort-spos = 2.&lt;/P&gt;&lt;P&gt;lw_sort-fieldname = 'ZMENG'.&lt;/P&gt;&lt;P&gt;LW_SORT-Up = 'X'.&lt;/P&gt;&lt;P&gt;lw_sort-subtot = 'X'.&lt;/P&gt;&lt;P&gt;append lw_sort to lt_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear lw_sort.&lt;/P&gt;&lt;P&gt;lw_sort-spos = 3.&lt;/P&gt;&lt;P&gt;lw_sort-fieldname = 'UMZIN'.LW_SORT-Up = 'X'.&lt;/P&gt;&lt;P&gt;lw_sort-subtot = 'X'.&lt;/P&gt;&lt;P&gt;append lw_sort to lt_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_layout-totals_text = 'Santosh'.&lt;/P&gt;&lt;P&gt;lv_layout-subtotals_text = 'Thorat'.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_INTERFACE_CHECK                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_BYPASSING_BUFFER                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_BUFFER_ACTIVE                   = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_PROGRAM                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_PF_STATUS_SET          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_USER_COMMAND           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_TOP_OF_PAGE            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_HTML_TOP_OF_PAGE       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_HTML_END_OF_LIST       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_STRUCTURE_NAME                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_BACKGROUND_ID                   = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_GRID_TITLE                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_GRID_SETTINGS                   =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   IS_LAYOUT                         = lv_layout&lt;/P&gt;&lt;P&gt;   IT_FIELDCAT                       = lt_fcat[]&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_EXCLUDING                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_SPECIAL_GROUPS                 =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   IT_SORT                           = lt_sort[]&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_FILTER                         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_SEL_HIDE                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_DEFAULT                         = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SAVE                            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_VARIANT                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_EVENTS                         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_EVENT_EXIT                     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_PRINT                          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_REPREP_ID                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_START_COLUMN             = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_START_LINE               = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_END_COLUMN               = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_END_LINE                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_HTML_HEIGHT_TOP                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_HTML_HEIGHT_END                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_ALV_GRAPHICS                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_HYPERLINK                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_ADD_FIELDCAT                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_EXCEPT_QINFO                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IR_SALV_FULLSCREEN_ADAPTER        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  E_EXIT_CAUSED_BY_CALLER           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ES_EXIT_CAUSED_BY_USER            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    T_OUTTAB                          = lt_vbap&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;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;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Santosh Thorat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 06:14:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281923#M784876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T06:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281924#M784877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this website.&lt;/P&gt;&lt;P&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Niyaz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 06:15:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281924#M784877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T06:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281925#M784878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at below links. It contains sample code for alv grid.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abap/controls/alvgrid.htm#Complete%20code%20for%20the%20ALV%20grid%20example" target="test_blank"&gt;http://www.erpgenie.com/abap/controls/alvgrid.htm#Complete%20code%20for%20the%20ALV%20grid%20example&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm" target="test_blank"&gt;http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.niraj.tripod.com/id64.html" target="test_blank"&gt;http://sap.niraj.tripod.com/id64.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also have a look at below for OO alv grid:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b5533cd30911d2b467006094192fe3/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b5533cd30911d2b467006094192fe3/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;REUSE_ALV_GRID _DISPLAY   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Heirarchial &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a simple example of such an ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zrich_0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of head occurs 0,&lt;/P&gt;&lt;P&gt;matnr type afpo-matnr,&lt;/P&gt;&lt;P&gt;maktx type makt-maktx,&lt;/P&gt;&lt;P&gt;EXPAND type c,&lt;/P&gt;&lt;P&gt;end of head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of detail occurs 0,&lt;/P&gt;&lt;P&gt;aufnr type afpo-aufnr,&lt;/P&gt;&lt;P&gt;matnr type afpo-matnr,&lt;/P&gt;&lt;P&gt;werks type aufk-werks,&lt;/P&gt;&lt;P&gt;pwerk type afpo-pwerk,&lt;/P&gt;&lt;P&gt;psmng type afpo-psmng,&lt;/P&gt;&lt;P&gt;end of detail.&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 * into corresponding fields of table detail&lt;/P&gt;&lt;P&gt;from afpo&lt;/P&gt;&lt;P&gt;inner join aufk&lt;/P&gt;&lt;P&gt;on afpo~aufnr = aufk~aufnr&lt;/P&gt;&lt;P&gt;inner join afko&lt;/P&gt;&lt;P&gt;on afpo~aufnr = afko~aufnr&lt;/P&gt;&lt;P&gt;up to 500 rows&lt;/P&gt;&lt;P&gt;where aufk~auart = 'PP01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not detail[] is initial.&lt;/P&gt;&lt;P&gt;sort detail ascending by matnr.&lt;/P&gt;&lt;P&gt;select distinct * into corresponding fields of table head&lt;/P&gt;&lt;P&gt;from makt&lt;/P&gt;&lt;P&gt;for all entries in detail&lt;/P&gt;&lt;P&gt;where matnr = detail-matnr&lt;/P&gt;&lt;P&gt;and spras = sy-langu.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform call_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM call_alv * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;........ * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;form call_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gt_fieldcat type slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;gs_keyinfo type slis_keyinfo_alv,&lt;/P&gt;&lt;P&gt;gs_layout type slis_layout_alv.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;data: ls_fieldcat type slis_fieldcat_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear gs_keyinfo.&lt;/P&gt;&lt;P&gt;gs_keyinfo-header01 = 'MATNR'.&lt;/P&gt;&lt;P&gt;gs_keyinfo-item01 = 'MATNR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear ls_fieldcat.&lt;/P&gt;&lt;P&gt;ls_fieldcat-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-reptext_ddic = 'Material'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-tabname = 'HEAD'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-outputlen = 18.&lt;/P&gt;&lt;P&gt;append ls_fieldcat to gt_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear ls_fieldcat.&lt;/P&gt;&lt;P&gt;ls_fieldcat-fieldname = 'MAKTX'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-reptext_ddic = 'Description'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-tabname = 'HEAD'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-outputlen = 40.&lt;/P&gt;&lt;P&gt;append ls_fieldcat to gt_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear ls_fieldcat.&lt;/P&gt;&lt;P&gt;ls_fieldcat-fieldname = 'AUFNR'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-reptext_ddic = 'Production Order'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-tabname = 'DETAIL'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-outputlen = 12.&lt;/P&gt;&lt;P&gt;append ls_fieldcat to gt_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear ls_fieldcat.&lt;/P&gt;&lt;P&gt;ls_fieldcat-fieldname = 'WERKS'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-reptext_ddic = 'Production Plant'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-tabname = 'DETAIL'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-outputlen = 4.&lt;/P&gt;&lt;P&gt;append ls_fieldcat to gt_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear ls_fieldcat.&lt;/P&gt;&lt;P&gt;ls_fieldcat-fieldname = 'PWERK'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-reptext_ddic = 'Planning Plant'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-tabname = 'DETAIL'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-outputlen = 4.&lt;/P&gt;&lt;P&gt;append ls_fieldcat to gt_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear ls_fieldcat.&lt;/P&gt;&lt;P&gt;ls_fieldcat-fieldname = 'PSMNG'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-reptext_ddic = 'Quantity'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-tabname = 'DETAIL'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-outputlen = 20.&lt;/P&gt;&lt;P&gt;append ls_fieldcat to gt_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gs_layout-expand_fieldname = 'EXPAND'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;it_fieldcat = gt_fieldcat[]&lt;/P&gt;&lt;P&gt;is_layout = gs_layout&lt;/P&gt;&lt;P&gt;i_tabname_header = 'HEAD'&lt;/P&gt;&lt;P&gt;i_tabname_item = 'DETAIL'&lt;/P&gt;&lt;P&gt;is_keyinfo = gs_keyinfo&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;t_outtab_header = head&lt;/P&gt;&lt;P&gt;t_outtab_item = detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP List Viewer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV). &lt;/P&gt;&lt;P&gt;This helps us to implement all the features mentioned very effectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using ALV, We can have three types of reports:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Simple Report&lt;/P&gt;&lt;P&gt;2. Block Report&lt;/P&gt;&lt;P&gt;3. Hierarchical Sequential Report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some function modules which will enable to produce the above reports without much effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. SIMPLE REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important function modules are &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a. Reuse_alv_list_display&lt;/P&gt;&lt;P&gt;b. Reuse_alv_fieldcatalog_merge&lt;/P&gt;&lt;P&gt;c. Reuse_alv_events_get&lt;/P&gt;&lt;P&gt;d. Reuse_alv_commentary_write&lt;/P&gt;&lt;P&gt;e. Reuse_alv_grid_display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important parameters are :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I. Export :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. I_callback_program : report id&lt;/P&gt;&lt;P&gt;ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status&lt;/P&gt;&lt;P&gt;iii. I_callback_user_command : routine where the function codes are handled&lt;/P&gt;&lt;P&gt;iv. I_structure name : name of the dictionary table &lt;/P&gt;&lt;P&gt;v. Is_layout : structure to set the layout of the report&lt;/P&gt;&lt;P&gt;vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE&lt;/P&gt;&lt;P&gt;vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;II. Tables :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. t_outtab : internal table with the data to be output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Important Parameters are :&lt;/P&gt;&lt;P&gt;I. Export :&lt;/P&gt;&lt;P&gt;i. I_program_name : report id&lt;/P&gt;&lt;P&gt;ii. I_internal_tabname : the internal output table&lt;/P&gt;&lt;P&gt;iii. I_inclname : include or the report name where all the dynamic forms are handled.&lt;/P&gt;&lt;P&gt;II Changing&lt;/P&gt;&lt;P&gt;ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is &lt;/P&gt;&lt;P&gt;declared in the type pool SLIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;I. Import :&lt;/P&gt;&lt;P&gt;Et_Events : The event table is returned with all possible CALLBACK events &lt;/P&gt;&lt;P&gt;for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV. &lt;/P&gt;&lt;P&gt;II. Export :&lt;/P&gt;&lt;P&gt;I_List_type : &lt;/P&gt;&lt;P&gt;0 = simple list REUSE_ALV_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND &lt;/P&gt;&lt;P&gt;3 = hierarchical-sequential block list &lt;/P&gt;&lt;P&gt;REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I. it_list_commentary : internal table with the headings of the type slis_t_listheader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This internal table has three fields :&lt;/P&gt;&lt;P&gt;Typ : &amp;#145;H&amp;#146; &amp;#150; header, &amp;#145;S&amp;#146; &amp;#150; selection , &amp;#145;A&amp;#146; - action&lt;/P&gt;&lt;P&gt;Key : only when typ is &amp;#145;S&amp;#146;.&lt;/P&gt;&lt;P&gt;Info : the text to be printed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : same as reuse_alv_list_display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an example for simple list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. BLOCK REPORT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is used to have multiple lists continuously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important functions used in this report are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_BLOCK_LIST_INIT&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_BLOCK_LIST_APPEND&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_BLOCK_LIST_DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_BLOCK_LIST_INIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters: &lt;/P&gt;&lt;P&gt;I. I_CALLBACK_PROGRAM &lt;/P&gt;&lt;P&gt;II. I_CALLBACK_PF_STATUS_SET &lt;/P&gt;&lt;P&gt;III. I_CALLBACK_USER_COMMAND &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module is used to set the default gui status etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_BLOCK_LIST_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export : &lt;/P&gt;&lt;P&gt;I. is_layout : layout settings for block &lt;/P&gt;&lt;P&gt;II. it_fieldcat : field catalog &lt;/P&gt;&lt;P&gt;III. i_tabname : internal table name with output data &lt;/P&gt;&lt;P&gt;IV. it_events : internal table with all possible events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables :&lt;/P&gt;&lt;P&gt;i. t_outtab : internal table with output data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module adds the data to the block. &lt;/P&gt;&lt;P&gt;Repeat this function for all the different blocks to be displayed one after the other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module is used for hierarchical sequential blocks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_BLOCK_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : All the parameters are optional. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module display the list with data appended by the above function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Hierarchical reports : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hierarchical sequential list output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_HIERSEQ_LIST_DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters: &lt;/P&gt;&lt;P&gt;I. Export: &lt;/P&gt;&lt;P&gt;i. I_CALLBACK_PROGRAM &lt;/P&gt;&lt;P&gt;ii. I_CALLBACK_PF_STATUS_SET &lt;/P&gt;&lt;P&gt;iii. I_CALLBACK_USER_COMMAND &lt;/P&gt;&lt;P&gt;iv. IS_LAYOUT &lt;/P&gt;&lt;P&gt;v. IT_FIELDCAT &lt;/P&gt;&lt;P&gt;vi. IT_EVENTS &lt;/P&gt;&lt;P&gt;vii. i_tabname_header : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the highest hierarchy level.&lt;/P&gt;&lt;P&gt;viii. i_tabname_item : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the lowest hierarchy level.&lt;/P&gt;&lt;P&gt;ix. is_keyinfo : This structure contains the header and item table field &lt;/P&gt;&lt;P&gt;names which link the two tables (shared key). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;II. Tables&lt;/P&gt;&lt;P&gt;i. t_outtab_header : Header table with data to be output&lt;/P&gt;&lt;P&gt;ii. t_outtab_item : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the lowest hierarchy level. &lt;/P&gt;&lt;P&gt;slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using &amp;#145;REUSE_ALV_FIELDCATALOG_MERGE&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important Attributes :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. col_pos : position of the column&lt;/P&gt;&lt;P&gt;B. fieldname : internal fieldname&lt;/P&gt;&lt;P&gt;C. tabname : internal table name&lt;/P&gt;&lt;P&gt;D. ref_fieldname : fieldname (dictionary)&lt;/P&gt;&lt;P&gt;E. ref_tabname : table (dictionary)&lt;/P&gt;&lt;P&gt;F. key(1) : column with key-color&lt;/P&gt;&lt;P&gt;G. icon(1) : icon&lt;/P&gt;&lt;P&gt;H. symbol(1) : symbol&lt;/P&gt;&lt;P&gt;I. checkbox(1) : checkbox&lt;/P&gt;&lt;P&gt;J. just(1) : (R)ight (L)eft (C)ent.&lt;/P&gt;&lt;P&gt;K. do_sum(1) : sum up&lt;/P&gt;&lt;P&gt;L. no_out(1) : (O)blig.(X)no out&lt;/P&gt;&lt;P&gt;M. outputlen : output length&lt;/P&gt;&lt;P&gt;N. seltext_l : long key word&lt;/P&gt;&lt;P&gt;O. seltext_m : middle key word&lt;/P&gt;&lt;P&gt;P. seltext_s : short key word&lt;/P&gt;&lt;P&gt;Q. reptext_ddic : heading (ddic)&lt;/P&gt;&lt;P&gt;R. ddictxt(1) : (S)hort (M)iddle (L)ong&lt;/P&gt;&lt;P&gt;S. datatype : datatype&lt;/P&gt;&lt;P&gt;T. hotspot(1) : hotspot &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple ALV report&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/controls/alvgrid.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/controls/alvgrid.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox" target="test_blank"&gt;http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox&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;/P&gt;&lt;P&gt;&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;/P&gt;&lt;P&gt;&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;/P&gt;&lt;P&gt;&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;Go thru these programs they may help u to try on some hands on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV Demo program&lt;/P&gt;&lt;P&gt;BCALV_DEMO_HTML&lt;/P&gt;&lt;P&gt;BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode&lt;/P&gt;&lt;P&gt;BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode&lt;/P&gt;&lt;P&gt;BCALV_GRID_DEMO Simple ALV Control Call Demo Program&lt;/P&gt;&lt;P&gt;BCALV_TREE_DEMO Demo for ALV tree control&lt;/P&gt;&lt;P&gt;BCALV_TREE_SIMPLE_DEMO&lt;/P&gt;&lt;P&gt;BC_ALV_DEMO_HTML_D0100&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;STRONG&gt;Reward If useful&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 06:16:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281925#M784878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T06:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281926#M784879</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;Goto SE38 give BCALV* and press F4 it will display the list of all standard alv programs just refer that n also refer this code&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_field_catalog&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;      text&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;&lt;/P&gt;&lt;P&gt;FORM sub_field_catalog .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'BELNR'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-003.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 0.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 10.&lt;/P&gt;&lt;P&gt;  it_fieldcat-key         = 'X'.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'BLART'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-002.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 1.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 2.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'BLDAT'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-004.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 2.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 8.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'BUDAT'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-005.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 3.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 8.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'LIFNR'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-006.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 4.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 10.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'NAME1'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-007.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 5.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 35.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'XREF3'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-008.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 6.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 20.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'ZUONR'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-009.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 7.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 18.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'DMBTR'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-010.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 8.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 13.&lt;/P&gt;&lt;P&gt;  it_fieldcat-do_sum      = 'X'.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'EBELN'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-011.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 9.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 10.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'TXZ01'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-012.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 10.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 40.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'ERFMG'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-013.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 11.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 13.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'MENGE'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-014.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 12.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 13.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_fieldcat-fieldname   = 'MBLNR'.&lt;/P&gt;&lt;P&gt;  it_fieldcat-seltext_m   = text-015.&lt;/P&gt;&lt;P&gt;  it_fieldcat-col_pos     = 13.&lt;/P&gt;&lt;P&gt;  it_fieldcat-outputlen   = 10.&lt;/P&gt;&lt;P&gt;  APPEND it_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR  it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " sub_field_catalog&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_display_data&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;      text&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;&lt;/P&gt;&lt;P&gt;FORM sub_display_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Local Variables&lt;/P&gt;&lt;P&gt;  DATA : lv_repid LIKE sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Pass the Report name&lt;/P&gt;&lt;P&gt;  lv_repid = sy-repid.&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_final[] 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;        i_callback_program = lv_repid&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;        i_default          = 'X'&lt;/P&gt;&lt;P&gt;        i_save             = 'A'&lt;/P&gt;&lt;P&gt;        i_callback_user_command = 'USER_COMMAND'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       is_variant         = wa_variant&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        it_events          = it_events&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       is_print           = wa_print&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       it_sort            = li_sort&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;        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;*--No data found for the given selection criteria.&lt;/P&gt;&lt;P&gt;    MESSAGE text-016 TYPE 'I'.&lt;/P&gt;&lt;P&gt;    LEAVE LIST-PROCESSING.&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;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 06:17:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281926#M784879</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2008-01-21T06:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281927#M784880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The FM used is: "REUSE_ALV_GRID_DISPLAY"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. prepare your final internal table with all your data  eg: gt_output as shown in the below  FM.&lt;/P&gt;&lt;P&gt;2. prepare the field catalog for the structure to be displayed as.  Repeat the below code for every output     &lt;/P&gt;&lt;P&gt;    field to be displayed.&lt;/P&gt;&lt;P&gt;  clear gwa_fieldcat.&lt;/P&gt;&lt;P&gt;  gwa_fieldcat-fieldname  = 'WERKS'.&lt;/P&gt;&lt;P&gt;  gwa_fieldcat-tabname   = 'GT_OUTPUT'.&lt;/P&gt;&lt;P&gt;  gwa_fieldcat-seltext_l    = 'PLANT'.&lt;/P&gt;&lt;P&gt;  append gwa_fieldcat to gt_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools : slis.&lt;/P&gt;&lt;P&gt;data: gt_fieldcat   type slis_t_fieldcat_alv&lt;/P&gt;&lt;P&gt;        gwa_fieldcat   type slis_fieldcat_alv.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;There are other parameters in the  FM  like Variant, SORt, SAVE, LAYOUT etc. which you can explore further on your own. This is simple 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  = sy-repid&lt;/P&gt;&lt;P&gt;            it_fieldcat                = gt_fieldcat[]&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            t_outtab                = gt_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 06:45:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281927#M784880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T06:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281928#M784881</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;Below is an example ABAP program which will populate a simple internal table(it_ekpo) with data and&lt;/P&gt;&lt;P&gt;display it using the basic ALV grid functionality(including column total). The example details the main&lt;/P&gt;&lt;P&gt;sections of coding required to implement the ALV grid functionality:&lt;/P&gt;&lt;P&gt;				Data declaration&lt;/P&gt;&lt;P&gt;				Data retrieval&lt;/P&gt;&lt;P&gt;				Build fieldcatalog&lt;/P&gt;&lt;P&gt;				Build layout setup&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; Report  ZDEMO_ALVGRID                                               *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&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;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp; Example of a simple ALV Grid Report                                 *&lt;/P&gt;&lt;P&gt;*&amp;amp; ...................................                                 *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp; The basic requirement for this demo is to display a number of       *&lt;/P&gt;&lt;P&gt;*&amp;amp; fields from the EKKO table.                                         *&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;REPORT  zdemo_alvgrid                 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES:     ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: slis.                                 "ALV Declarations&lt;/P&gt;&lt;P&gt;*Data Declaration&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;&lt;P&gt;TYPES: BEGIN OF t_ekko,&lt;/P&gt;&lt;P&gt;  ebeln TYPE ekpo-ebeln,&lt;/P&gt;&lt;P&gt;  ebelp TYPE ekpo-ebelp,&lt;/P&gt;&lt;P&gt;  statu TYPE ekpo-statu,&lt;/P&gt;&lt;P&gt;  aedat TYPE ekpo-aedat,&lt;/P&gt;&lt;P&gt;  matnr TYPE ekpo-matnr,&lt;/P&gt;&lt;P&gt;  menge TYPE ekpo-menge,&lt;/P&gt;&lt;P&gt;  meins TYPE ekpo-meins,&lt;/P&gt;&lt;P&gt;  netpr TYPE ekpo-netpr,&lt;/P&gt;&lt;P&gt;  peinh TYPE ekpo-peinh,&lt;/P&gt;&lt;P&gt; END OF t_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;      wa_ekko TYPE t_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*ALV data declarations&lt;/P&gt;&lt;P&gt;data: fieldcatalog type slis_t_fieldcat_alv with header line,&lt;/P&gt;&lt;P&gt;      gd_tab_group type slis_t_sp_group_alv,&lt;/P&gt;&lt;P&gt;      gd_layout    type slis_layout_alv,&lt;/P&gt;&lt;P&gt;      gd_repid     like sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*Start-of-selection.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform data_retrieval.&lt;/P&gt;&lt;P&gt;perform build_fieldcatalog.&lt;/P&gt;&lt;P&gt;perform build_layout.&lt;/P&gt;&lt;P&gt;perform display_alv_report.&lt;/P&gt;&lt;P&gt;&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  BUILD_FIELDCATALOG&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;      Build Fieldcatalog for ALV Report&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 build_fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;There are a number of ways to create a fieldcat.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;For the purpose of this example i will build the fieldcatalog manualy&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;by populating the internal table fields individually and then&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;appending the rows. This method can be the most time consuming but can&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;also allow you  more control of the final product.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Beware though, you need to ensure that all fields required are&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;populated. When using some of functionality available via ALV, such as&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;total. You may need to provide more information than if you were&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;simply displaying the result&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              I.e. Field type may be required in-order for&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                   the 'TOTAL' function to work.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'EBELN'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Purchase Order'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 0.&lt;/P&gt;&lt;P&gt;  fieldcatalog-outputlen   = 10.&lt;/P&gt;&lt;P&gt;  fieldcatalog-emphasize   = 'X'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-key         = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fieldcatalog-do_sum      = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fieldcatalog-no_zero     = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'EBELP'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'PO Item'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 1.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'STATU'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Status'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 2.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'AEDAT'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Item change date'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 3.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'MATNR'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Material Number'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 4.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'MENGE'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'PO quantity'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 5.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'MEINS'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Order Unit'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 6.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'NETPR'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Net Price'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 7.&lt;/P&gt;&lt;P&gt;  fieldcatalog-outputlen   = 15.&lt;/P&gt;&lt;P&gt;  fieldcatalog-do_sum      = 'X'.        "Display column total&lt;/P&gt;&lt;P&gt;  fieldcatalog-datatype     = 'CURR'.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'PEINH'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Price Unit'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 8.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;endform.                    " BUILD_FIELDCATALOG&lt;/P&gt;&lt;P&gt;&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  BUILD_LAYOUT&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;      Build layout for ALV grid report&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 build_layout.&lt;/P&gt;&lt;P&gt;  gd_layout-no_input          = 'X'.&lt;/P&gt;&lt;P&gt;  gd_layout-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;  gd_layout-totals_text       = 'Totals'(201).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; gd_layout-totals_only        = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; gd_layout-f2code            = 'DISP'.  "Sets fcode for when double&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                                        "click(press f2)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; gd_layout-zebra             = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; gd_layout-group_change_edit = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; gd_layout-header_text       = 'helllllo'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endform.                    " BUILD_LAYOUT&lt;/P&gt;&lt;P&gt;&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  DISPLAY_ALV_REPORT&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;      Display report using ALV grid&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 display_alv_report.&lt;/P&gt;&lt;P&gt;  gd_repid = sy-repid.&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      = gd_repid&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           i_callback_user_command = 'USER_COMMAND'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           i_grid_title           = outtext&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            is_layout               = gd_layout&lt;/P&gt;&lt;P&gt;            it_fieldcat             = fieldcatalog[]&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           it_special_groups       = gd_tabgroup&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           IT_EVENTS                = GT_XEVENTS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            i_save                  = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           is_variant              = z_template&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            t_outtab                = it_ekko&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endform.                    " DISPLAY_ALV_REPORT&lt;/P&gt;&lt;P&gt;&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  DATA_RETRIEVAL&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;      Retrieve data form EKPO table and populate itab it_ekko&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 data_retrieval.&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;endform.                    " DATA_RETRIEVAL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:02:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281928#M784881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281929#M784882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all I would like to explain you the various ways of creating an ALV grid for displayng purposes.&lt;/P&gt;&lt;P&gt;1) It can be prepared using ABAP Objects.&lt;/P&gt;&lt;P&gt;2) It can be done through Standard Predefined Type Pools avaliable to us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are few other ways also, but putting down the simplest of all for you.&lt;/P&gt;&lt;P&gt;Out of these two the second option is the easiest one according to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will explain you the steps you need to follow in creating an ALV grid using an Executable program / Report Program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create a Report Program&lt;/P&gt;&lt;P&gt;2) Define an Intialization event in your Report program to Define all your variables, types and type-pools.&lt;/P&gt;&lt;P&gt;( Here you need to mention your type pool: SLIS.)&lt;/P&gt;&lt;P&gt;3) Now comes your validations if required in your application. This can be done using At Selection-Screen event.&lt;/P&gt;&lt;P&gt;4) Next is your Start-Of-Selection Event where in you populate the data in to your internal table which will be defined in your Initialization event.&lt;/P&gt;&lt;P&gt;5) Here in this event you need to populate the Field-Catalog also for ALV recognition purpose.&lt;/P&gt;&lt;P&gt;6) Atlast comes your End-Of-Selection Event. Here you will call the ALV function module "REUSE_ ALV_GRID_DISPLAY"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:32:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281929#M784882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281930#M784883</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;Please refer to the link below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdev.co.uk/reporting/alv/alvgrid_basic.htm" target="test_blank"&gt;http://www.sapdev.co.uk/reporting/alv/alvgrid_basic.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:43:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281930#M784883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: simple Grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281931#M784884</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;see the following example...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report  zalvtest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables zprod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of product occurs 0,&lt;/P&gt;&lt;P&gt;            pno like zprod-pno,&lt;/P&gt;&lt;P&gt;            pname like zprod-pname,&lt;/P&gt;&lt;P&gt;            qty like zprod-qty,&lt;/P&gt;&lt;P&gt;            rate like zprod-rate1,&lt;/P&gt;&lt;P&gt;        end of product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:  fldhead type slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;         fldwa type slis_fieldcat_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;product-pno = 10.&lt;/P&gt;&lt;P&gt;product-pname = 'xxx'.&lt;/P&gt;&lt;P&gt;product-qty = 3.&lt;/P&gt;&lt;P&gt;product-rate = 100.&lt;/P&gt;&lt;P&gt;append product to product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;product-pno = 20.&lt;/P&gt;&lt;P&gt;product-pname = 'yyy'.&lt;/P&gt;&lt;P&gt;product-qty = 3.&lt;/P&gt;&lt;P&gt;product-rate = 10.&lt;/P&gt;&lt;P&gt;append product to product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fldwa-fieldname = 'PNO'.&lt;/P&gt;&lt;P&gt;fldwa-seltext_l = 'Prod No'.&lt;/P&gt;&lt;P&gt;append fldwa to fldhead.&lt;/P&gt;&lt;P&gt;clear fldwa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fldwa-fieldname = 'PNAME'.&lt;/P&gt;&lt;P&gt;fldwa-seltext_l = 'Prod Name'.&lt;/P&gt;&lt;P&gt;append fldwa to fldhead.&lt;/P&gt;&lt;P&gt;clear fldwa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fldwa-fieldname = 'QTY'.&lt;/P&gt;&lt;P&gt;fldwa-seltext_l = 'Qty'.&lt;/P&gt;&lt;P&gt;append fldwa to fldhead.&lt;/P&gt;&lt;P&gt;clear fldwa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fldwa-fieldname = 'RATE'.&lt;/P&gt;&lt;P&gt;fldwa-seltext_l = 'Rate'.&lt;/P&gt;&lt;P&gt;append fldwa to fldhead.&lt;/P&gt;&lt;P&gt;clear fldwa.&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                = sy-repid&lt;/P&gt;&lt;P&gt;     it_fieldcat                       = fldhead&lt;/P&gt;&lt;P&gt; tables&lt;/P&gt;&lt;P&gt;    t_outtab                          = product&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;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shanthi. P&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Reward points if useful ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:47:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-grid-display/m-p/3281931#M784884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:47:14Z</dc:date>
    </item>
  </channel>
</rss>

