<?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: CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-reuse-alv-grid-display/m-p/3945452#M943544</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;Just check out the below code and see the required solution accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report  zalvcall.&lt;/P&gt;&lt;P&gt;type-pools:slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:inttab type standard table of zemptab1 with header line ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      int_tab type standard table of zemptab2 with header line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      in_tab type standard table of zemptab2 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:fieldcat type slis_t_fieldcat_alv with header line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      fieldcat1 type slis_t_fieldcat_alv with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from zemptab1 into corresponding fields of table inttab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from zemptab2 into corresponding fields of table int_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform buildfieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform displayfieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form buildfieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'ID'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'EMPID'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'NAME'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'EMPNAME'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'QUALIFICATION'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'QUAL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'CITY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'CITY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'AGE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'AGE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "buildfileldcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form displayfieldcat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     i_callback_program                = sy-repid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     i_callback_user_command           = 'USECOMMAND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     it_fieldcat                       = fieldcat[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      t_outtab                          = int_tab.&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;&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;endform. "displayfieldcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form usecommand using r_ucomm like sy-ucomm rs_selfield type&lt;/P&gt;&lt;P&gt;slis_selfield .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  case r_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  when '&amp;amp;IC1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table int_tab  index&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs_selfield-tabindex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"loop at int_tab where id eq rs_selfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    in_tab-zempid = int_tab-zempid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   in_tab-dcode = int_tab-dcode.&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;   in_tab-desig = int_tab-desig.&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;   in_tab-exp = int_tab-exp.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    append in_tab.&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; endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; " endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; clear fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; refresh fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform build_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform display_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "USECOMMAND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'DCODE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'Desigcode'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'ID'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'EMPID'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'DESIG'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'Designation'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'EXP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'EXPERIENCE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "build_fieldcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form display_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   exporting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     i_callback_program                = sy-repid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     it_fieldcat                       = fieldcat[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      t_outtab                          = in_tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     program_error                     = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     others                            = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     endform. "display_fieldcat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 May 2008 05:48:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-29T05:48:37Z</dc:date>
    <item>
      <title>CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-reuse-alv-grid-display/m-p/3945451#M943543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the FM  'REUSE_ALV_GRID_DISPLAY'.  The alv gets created and the field catolog apparently works cause the columns have their names.  The ALV has got the exact quantity of rows as the populated internal table, but the info does not get displayed.  I've debugged this forever and cannot see what I should do differently.  The FM receives the table with all the info in it.  It passes it to the different calls within itself, but still does not display the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code looks like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab_struct,&lt;/P&gt;&lt;P&gt;      custn TYPE kna1-name1,      "Customer name&lt;/P&gt;&lt;P&gt;      cust TYPE vbak-kunnr,       "Customer number&lt;/P&gt;&lt;P&gt;      plant TYPE vbap-werks,      "Plant&lt;/P&gt;&lt;P&gt;      type TYPE vbak-auart,       "Sales Order type&lt;/P&gt;&lt;P&gt;      sales_no TYPE vbap-vbeln,   "Sales Order number&lt;/P&gt;&lt;P&gt;      so_date TYPE string,        "Sales Order Date created&lt;/P&gt;&lt;P&gt;      so_time TYPE string,        "Sales Order Entry time&lt;/P&gt;&lt;P&gt;      dl_no TYPE vbfa-vbeln,      "Goods issue number&lt;/P&gt;&lt;P&gt;      dl_date TYPE string,        "Goods issue date created&lt;/P&gt;&lt;P&gt;      dl_time TYPE string,        "Goods issue time created&lt;/P&gt;&lt;P&gt;      tot_time TYPE string,       "Total time spent&lt;/P&gt;&lt;P&gt;      so_av TYPE string,          "Sales Order average&lt;/P&gt;&lt;P&gt;      cust_av TYPE string,        "Average by customer&lt;/P&gt;&lt;P&gt;      av_time TYPE string,        "Average time spent&lt;/P&gt;&lt;P&gt;      END OF itab_struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab LIKE TABLE OF itab_struct WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... and then I populate the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_list_type = 0&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_events   = i_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_callback_program      = w_pgm&lt;/P&gt;&lt;P&gt;      i_structure_name         = 'itab_struct'&lt;/P&gt;&lt;P&gt;      it_events                     = i_event[]&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     i_callback_user_command = 'USER_COMMAND'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      it_fieldcat                    = wa_fcat[]&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     i_bypassing_buffer        = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     is_layout                      = printtab_layout&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     is_print                        = print&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     i_save                  = save&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      t_outtab                = itab[].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 05:41:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-reuse-alv-grid-display/m-p/3945451#M943543</guid>
      <dc:creator>teresa_vanrooyen</dc:creator>
      <dc:date>2008-05-29T05:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-reuse-alv-grid-display/m-p/3945452#M943544</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;Just check out the below code and see the required solution accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report  zalvcall.&lt;/P&gt;&lt;P&gt;type-pools:slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:inttab type standard table of zemptab1 with header line ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      int_tab type standard table of zemptab2 with header line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      in_tab type standard table of zemptab2 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:fieldcat type slis_t_fieldcat_alv with header line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      fieldcat1 type slis_t_fieldcat_alv with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from zemptab1 into corresponding fields of table inttab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from zemptab2 into corresponding fields of table int_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform buildfieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform displayfieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form buildfieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'ID'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'EMPID'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'NAME'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'EMPNAME'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'QUALIFICATION'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'QUAL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'CITY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'CITY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'AGE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'AGE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "buildfileldcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form displayfieldcat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     i_callback_program                = sy-repid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     i_callback_user_command           = 'USECOMMAND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     it_fieldcat                       = fieldcat[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      t_outtab                          = int_tab.&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;&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;endform. "displayfieldcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form usecommand using r_ucomm like sy-ucomm rs_selfield type&lt;/P&gt;&lt;P&gt;slis_selfield .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  case r_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  when '&amp;amp;IC1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table int_tab  index&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs_selfield-tabindex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"loop at int_tab where id eq rs_selfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    in_tab-zempid = int_tab-zempid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   in_tab-dcode = int_tab-dcode.&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;   in_tab-desig = int_tab-desig.&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;   in_tab-exp = int_tab-exp.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    append in_tab.&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; endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; " endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; clear fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; refresh fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform build_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform display_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "USECOMMAND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'DCODE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'Desigcode'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'ID'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'EMPID'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'DESIG'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'Designation'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-fieldname = 'EXP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcat-seltext_m = 'EXPERIENCE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fieldcat to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "build_fieldcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form display_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   exporting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     i_callback_program                = sy-repid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     it_fieldcat                       = fieldcat[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      t_outtab                          = in_tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     program_error                     = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     others                            = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     endform. "display_fieldcat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 05:48:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-reuse-alv-grid-display/m-p/3945452#M943544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T05:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-reuse-alv-grid-display/m-p/3945453#M943545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
Hi,

Please remove &lt;STRONG&gt;i_structure_name = 'itab_struct'&lt;/STRONG&gt; , when you are calling REUSE_ALV_GRID_DISPLAY and try.

Here is the sample simple code to create ALV.

&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF i_mard OCCURS 0,
        matnr LIKE mard-matnr,
        werks LIKE mard-werks,
        lgort LIKE mard-lgort,
        pstat LIKE mard-pstat,
      END OF i_mard.
TYPE-POOLS:slis.
DATA:i_fieldcat TYPE slis_t_fieldcat_alv.

SELECT matnr
       werks
       lgort
       pstat
  FROM mard
  INTO CORRESPONDING FIELDS OF TABLE i_mard
  UP TO 100 ROWS.
"Use function module create  Fieldcat.
DATA:
      l_program TYPE sy-repid VALUE sy-repid.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
  EXPORTING
    i_program_name     = l_program
    i_internal_tabname = 'I_MARD'
    i_inclname         = l_program
    i_bypassing_buffer = 'X'
  CHANGING
    ct_fieldcat        = i_fieldcat.
IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    i_callback_program = l_program
    it_fieldcat        = i_fieldcat
  TABLES
    t_outtab           = i_mard.
IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;

Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 06:07:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-reuse-alv-grid-display/m-p/3945453#M943545</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2008-05-29T06:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-reuse-alv-grid-display/m-p/3945454#M943546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Teresa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In FM REUSE_ALV_GRID_DISPLAY, u have given i_structure_name = 'itab_struc'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a zstructure in se11 with the required fields of itab_struc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also dont give structure name in small letters. Give it in caps&lt;/P&gt;&lt;P&gt;i.e i_structure_name = 'ZSTRUCTURE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this and get back to me incase of any queries.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dont forget to reward points if found useful.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Satyesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 07:07:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-reuse-alv-grid-display/m-p/3945454#M943546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T07:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-reuse-alv-grid-display/m-p/3945455#M943547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx for your replies.  But it seems my problem was with the detail of my field catalogue.  Didn't know it is case sensitive for one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 11:46:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-reuse-alv-grid-display/m-p/3945455#M943547</guid>
      <dc:creator>teresa_vanrooyen</dc:creator>
      <dc:date>2008-06-04T11:46:39Z</dc:date>
    </item>
  </channel>
</rss>

