<?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: Multiple ALV lists in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197274#M130041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use block alv  ...&lt;/P&gt;&lt;P&gt;if  u want   to display  one alv grid bellow another......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zanid_test MESSAGE-ID zz.&lt;/P&gt;&lt;P&gt;*&lt;/P&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declarations for BLOCK ALV DISPLAY&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&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;*--type pools&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:x_layout TYPE slis_layout_alv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_field TYPE slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--field catalog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat LIKE LINE OF t_field,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--to hold all the events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_events TYPE slis_t_event,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_events TYPE slis_alv_event,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_sort TYPE slis_t_sortinfo_alv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_sort LIKE LINE OF t_sort ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Print Layout&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_print_layout TYPE slis_print_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----Macro to add field catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE add_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear x_fldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-fieldname = &amp;amp;1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = &amp;amp;2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-outputlen = &amp;amp;3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-tech = &amp;amp;4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-col_pos = &amp;amp;5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-no_zero = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = 'M'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-datatype = &amp;amp;6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-ddic_outputlen = &amp;amp;7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if &amp;amp;6 = 'N'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-lzero = 'X'.&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;*--build field catalog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append x_fldcat to t_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&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 declerations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_repid like sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ernam like mara-ernam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;meins like mara-meins,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end of itab.&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: begin of jtab occurs 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matnr like makt-matnr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maktx like makt-maktx,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end of jtab.&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;&lt;/P&gt;&lt;P&gt;select matnr ernam meins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;up to 20 rows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from mara&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr maktx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;up to 20 rows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from makt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into table jtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_repid = 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;*DISPLAY alv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Initialize Block&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_BLOCK_LIST_INIT'&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 = v_repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Block 1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*INITIALIZE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh t_field. clear t_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh t_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add_catalog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MATNR' 'Material' '18' '' '1' 'C' '18',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'ERNAM' 'Created By' '12' '' '2' 'C' '12',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MEINS' 'Unit' '5' '' '3' 'C' '3'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--build table for events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_events-form = 'TOP_OF_LIST1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_events-name = slis_ev_top_of_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append x_events to t_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_layout = x_layout&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_fieldcat = t_field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_tabname = 'ITAB'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_events = t_events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_sort = t_sort&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 = itab&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;maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;others = 3.&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;message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--BLOCK 2(SUMMARY REPORT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*INITIALIZE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh t_field. clear t_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh t_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add_catalog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MATNR' 'Material' '20' '' '1' 'C' '18',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MAKTX' 'Description' '40' '' '2' 'C' '40'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--build table for events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_events-form = 'TOP_OF_LIST2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_events-name = slis_ev_top_of_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append x_events to t_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append table block.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_BLOCK_LIST_APPEND'&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;is_layout = x_layout&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_fieldcat = t_field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_tabname = 'JTAB'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_events = t_events&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 = jtab&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;maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;others = 3.&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;message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;&lt;/P&gt;&lt;P&gt;*--CALL FM TO DISPLAY THE BLOCK REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;exporting&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;is_print = x_print_layout&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form top_of_list1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;skip 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: 10 'List 1',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/5 '----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;skip 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format reset.&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; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form top_of_list2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;skip 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: 10 'List 2',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/5 '----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;skip 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format reset.&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;&lt;/P&gt;&lt;P&gt;Message was edited by: kishan negi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Feb 2006 05:52:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-07T05:52:32Z</dc:date>
    <item>
      <title>Multiple ALV lists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197268#M130035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to display 2 ALV grids on the same screen one below another with headings. Can some1 throw light how to do that??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2006 17:37:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197268#M130035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-06T17:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple ALV lists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197269#M130036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can put two containers on the same screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2006 17:39:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197269#M130036</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-02-06T17:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple ALV lists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197270#M130037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example,  implement this sample program.  Create the screen 100, put two containers on the screen.  Call the first one 'ALV_CONTAINER' and the second 'ALV_CONTAINER2'.  Create the gui status with the BACK button.    Now click on a record of the first grid, the second grid will be populated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0006.

tables: mara.

type-pools: slis.

* Internal Tables
data: begin of ialv occurs 0,
      matnr type mara-matnr,
      maktx type makt-maktx,
      end of ialv .

* Internal Tables
data: begin of ialv2 occurs 0,
      matnr type mard-matnr,
      werks type mard-werks,
      lgort type mard-lgort,
      end of ialv2 .


***********************************************************************
*       CLASS lcl_event_receiver DEFINITION      Handles Double Click
***********************************************************************
class lcl_event_receiver definition.
  public section.
    methods handle_hotspot_click
       for event hotspot_click of cl_gui_alv_grid
      importing e_row_id.
  private section.
endclass.

***********************************************************************
*       CLASS lCL_EVENT_RECEIVER IMPLEMENTATION    Handles Double Click
***********************************************************************
class lcl_event_receiver implementation.
  method handle_hotspot_click.
    perform get_details using e_row_id-index.
  endmethod.
endclass.

data: alv_container type ref to cl_gui_custom_container,
      event_receiver type ref to lcl_event_receiver,
      alv_grid type ref to cl_gui_alv_grid,
      alv_container2 type ref to cl_gui_custom_container,
      alv_grid2 type ref to cl_gui_alv_grid,
      ok_code like sy-ucomm,
      fieldcat type lvc_t_fcat,
      fieldcat2 type lvc_t_fcat.

select-options: s_matnr for mara-matnr.

start-of-selection.

  perform get_data.


  call screen 100.





************************************************************************
*      Module  status_0100  OUTPUT
************************************************************************
module status_0100 output.

  data: variant type  disvariant.
  data: lt_exclude type ui_functions.
  data: ls_fcat type lvc_s_fcat.

  set pf-status '0100'.
  set titlebar '0100'.

  check alv_container is initial.

***   Code for first ALV Grid

* Create Controls
  create object alv_container
         exporting container_name = 'ALV_CONTAINER'.


  create object alv_grid
         exporting  i_parent =  alv_container.



*   create Event Receiver
  create object event_receiver.

  clear fieldcat.  refresh: fieldcat.

  clear: ls_fcat.
  ls_fcat-reptext    = 'Material Number'.
  ls_fcat-coltext    = 'Material Number'.
  ls_fcat-fieldname  = 'MATNR'.
  ls_fcat-ref_table  = 'IALV'.
  ls_fcat-hotspot    = 'X'.
  ls_fcat-outputlen  = '18'.
  ls_fcat-col_pos    = 1.
  append ls_fcat to fieldcat.

  clear: ls_fcat.
  ls_fcat-reptext    = 'Material Description'.
  ls_fcat-coltext    = 'Material Description'.
  ls_fcat-fieldname  = 'MATKX'.
  ls_fcat-ref_table  = 'IALV'.
  ls_fcat-outputlen  = '40'.
  ls_fcat-col_pos    = 2.
  append ls_fcat to fieldcat.

  call method alv_grid-&amp;gt;set_table_for_first_display
      changing
           it_outtab       = ialv[]
           it_fieldcatalog = fieldcat[].

*   handler for ALV grid
  set handler event_receiver-&amp;gt;handle_hotspot_click for alv_grid.



***   Code for second ALV Grid

* Create Controls
  create object alv_container2
         exporting container_name = 'ALV_CONTAINER2'.

*   create Event Receiver
  create object alv_grid2
         exporting  i_parent =  alv_container2.

  clear fieldcat.  refresh: fieldcat.

  clear: ls_fcat.
  ls_fcat-reptext    = 'Material Number'.
  ls_fcat-coltext    = 'Material Number'.
  ls_fcat-fieldname  = 'MATNR'.
  ls_fcat-ref_table  = 'IALV2'.
  ls_fcat-outputlen  = '18'.
  append ls_fcat to fieldcat2.

  clear: ls_fcat.
  ls_fcat-reptext    = 'Plant'.
  ls_fcat-coltext    = 'Plant'.
  ls_fcat-fieldname  = 'MATNR'.
  ls_fcat-ref_table  = 'IALV2'.
  ls_fcat-outputlen  = '4'.
  append ls_fcat to fieldcat2.

  clear: ls_fcat.
  ls_fcat-reptext    = 'Store Loc'.
  ls_fcat-coltext    = 'Store Loc'.
  ls_fcat-fieldname  = 'LGORT'.
  ls_fcat-ref_table  = 'IALV2'.
  ls_fcat-outputlen  = '4'.
  append ls_fcat to fieldcat2.

  call method alv_grid2-&amp;gt;set_table_for_first_display
       changing
           it_outtab       = ialv2[]
           it_fieldcatalog = fieldcat2[].


endmodule.

************************************************************************
*      Module  USER_COMMAND_0100  INPUT
************************************************************************
module user_command_0100 input.

  case sy-ucomm.

    when 'BACK' or 'CANC'.
      if not alv_container is initial.
        call method alv_container-&amp;gt;free.
        clear: alv_container.
        free : alv_container.
      endif.
      if not alv_container2 is initial.
        call method alv_container2-&amp;gt;free.
        clear: alv_container2.
        free : alv_container2.
      endif.
      if sy-subrc = 0.
        set screen 0.
        leave screen.
      else.
        leave program.
      endif.

  endcase.

endmodule.


*********************************************************************
*       FORM GET_DATA.
*********************************************************************
form get_data.

  select mara~matnr makt~maktx
             into corresponding fields of table ialv
                 from mara
                      inner join makt
                         on mara~matnr = makt~matnr
                                where mara~matnr in s_matnr
                                  and makt~spras = sy-langu.

  sort ialv ascending by matnr.

endform.

*********************************************************************
*       FORM GET_MORE_DATA.
*********************************************************************
form get_more_data.

  select matnr werks lgort
             into corresponding fields of table ialv2
                 from mard
                           where matnr = ialv-matnr.

  sort ialv2 ascending by matnr.

endform.



************************************************************************
* GET_DETAILS
************************************************************************
form get_details using index.

  read table ialv index index.
  if sy-subrc = 0.

    perform get_more_data.
    call method alv_grid2-&amp;gt;refresh_table_display.

  endif.

endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2006 17:42:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197270#M130037</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-02-06T17:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple ALV lists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197271#M130038</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 this Demo program &amp;lt;b&amp;gt;BCALV_TEST_GRID_DRAG_DROP&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2006 17:59:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197271#M130038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-06T17:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple ALV lists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197272#M130039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can check with demo program BALVBT01 for multiple ALV display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sunil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 05:45:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197272#M130039</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T05:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple ALV lists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197273#M130040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ALV LIST&lt;/P&gt;&lt;P&gt;   or &lt;/P&gt;&lt;P&gt;   ALV Grid ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If list is required, then&lt;/P&gt;&lt;P&gt;   its quite simple.&lt;/P&gt;&lt;P&gt;   U have to use the concept of&lt;/P&gt;&lt;P&gt;   BLOCK ALV (there are 2 FMS for it - thats all)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. If grid is required,&lt;/P&gt;&lt;P&gt;   then ofcourse,&lt;/P&gt;&lt;P&gt;   two containers are required. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. If u require alv list,&lt;/P&gt;&lt;P&gt;  then pls clarify so that&lt;/P&gt;&lt;P&gt;  the FMS details can be provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 05:50:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197273#M130040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T05:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple ALV lists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197274#M130041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use block alv  ...&lt;/P&gt;&lt;P&gt;if  u want   to display  one alv grid bellow another......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zanid_test MESSAGE-ID zz.&lt;/P&gt;&lt;P&gt;*&lt;/P&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declarations for BLOCK ALV DISPLAY&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&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;*--type pools&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:x_layout TYPE slis_layout_alv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_field TYPE slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--field catalog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat LIKE LINE OF t_field,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--to hold all the events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_events TYPE slis_t_event,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_events TYPE slis_alv_event,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_sort TYPE slis_t_sortinfo_alv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_sort LIKE LINE OF t_sort ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Print Layout&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_print_layout TYPE slis_print_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----Macro to add field catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE add_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear x_fldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-fieldname = &amp;amp;1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = &amp;amp;2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-outputlen = &amp;amp;3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-tech = &amp;amp;4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-col_pos = &amp;amp;5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-no_zero = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = 'M'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-datatype = &amp;amp;6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-ddic_outputlen = &amp;amp;7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if &amp;amp;6 = 'N'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fldcat-lzero = 'X'.&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;*--build field catalog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append x_fldcat to t_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&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 declerations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_repid like sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ernam like mara-ernam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;meins like mara-meins,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end of itab.&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: begin of jtab occurs 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matnr like makt-matnr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maktx like makt-maktx,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end of jtab.&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;&lt;/P&gt;&lt;P&gt;select matnr ernam meins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;up to 20 rows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from mara&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr maktx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;up to 20 rows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from makt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into table jtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_repid = 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;*DISPLAY alv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Initialize Block&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_BLOCK_LIST_INIT'&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 = v_repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Block 1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*INITIALIZE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh t_field. clear t_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh t_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add_catalog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MATNR' 'Material' '18' '' '1' 'C' '18',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'ERNAM' 'Created By' '12' '' '2' 'C' '12',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MEINS' 'Unit' '5' '' '3' 'C' '3'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--build table for events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_events-form = 'TOP_OF_LIST1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_events-name = slis_ev_top_of_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append x_events to t_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_layout = x_layout&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_fieldcat = t_field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_tabname = 'ITAB'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_events = t_events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_sort = t_sort&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 = itab&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;maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;others = 3.&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;message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--BLOCK 2(SUMMARY REPORT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*INITIALIZE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh t_field. clear t_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh t_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add_catalog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MATNR' 'Material' '20' '' '1' 'C' '18',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MAKTX' 'Description' '40' '' '2' 'C' '40'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--build table for events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_events-form = 'TOP_OF_LIST2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_events-name = slis_ev_top_of_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append x_events to t_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append table block.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_BLOCK_LIST_APPEND'&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;is_layout = x_layout&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_fieldcat = t_field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_tabname = 'JTAB'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_events = t_events&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 = jtab&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;maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;others = 3.&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;message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;&lt;/P&gt;&lt;P&gt;*--CALL FM TO DISPLAY THE BLOCK REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;exporting&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;is_print = x_print_layout&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form top_of_list1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;skip 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: 10 'List 1',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/5 '----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;skip 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format reset.&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; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form top_of_list2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;skip 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: 10 'List 2',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/5 '----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;skip 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format reset.&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;&lt;/P&gt;&lt;P&gt;Message was edited by: kishan negi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 05:52:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197274#M130041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T05:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple ALV lists</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197275#M130042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Multiple ALV list display&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;The SAP program BALVBT01 provides an example of displying multiple ALV LIST reports on one page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can also place two containers on the screen if u want a grid display. First try to display data in one grid and then repeat the same code for the other too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alvhome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alvhome.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly reward points for those who helped to solve ur problem and close the thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 06:07:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-alv-lists/m-p/1197275#M130042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T06:07:17Z</dc:date>
    </item>
  </channel>
</rss>

