<?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 ALV Header in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/2248498#M485725</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Expert ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want Comapny name and Date interval (in selection screen ) in ALV header,&lt;/P&gt;&lt;P&gt;pls give me some code or program .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;abaper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 May 2007 07:25:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-30T07:25:18Z</dc:date>
    <item>
      <title>ALV Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/2248498#M485725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Expert ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want Comapny name and Date interval (in selection screen ) in ALV header,&lt;/P&gt;&lt;P&gt;pls give me some code or program .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;abaper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 07:25:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/2248498#M485725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T07:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/2248499#M485726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check this sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZALV_DEMO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: slis.&lt;/P&gt;&lt;P&gt;DATA: x_fieldcat TYPE slis_fieldcat_alv,&lt;/P&gt;&lt;P&gt;it_fieldcat TYPE slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;l_layout TYPE slis_layout_alv,&lt;/P&gt;&lt;P&gt;x_events TYPE slis_alv_event,&lt;/P&gt;&lt;P&gt;it_events TYPE slis_t_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;vbeln LIKE vbak-vbeln,&lt;/P&gt;&lt;P&gt;posnr LIKE vbap-posnr,&lt;/P&gt;&lt;P&gt;male TYPE i,&lt;/P&gt;&lt;P&gt;female TYPE i,&lt;/P&gt;&lt;P&gt;END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables:vbap.&lt;/P&gt;&lt;P&gt;select-options:s_vbeln for vbap-vbeln.&lt;/P&gt;&lt;P&gt;data:v_l(15) type c,&lt;/P&gt;&lt;P&gt;v_h(15) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT vbeln&lt;/P&gt;&lt;P&gt;posnr&lt;/P&gt;&lt;P&gt;FROM vbap&lt;/P&gt;&lt;P&gt;INTO TABLE itab where vbeln in s_vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_l = s_vbeln-low.&lt;/P&gt;&lt;P&gt;v_h = s_vbeln-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fieldcat-fieldname = 'VBELN'.&lt;/P&gt;&lt;P&gt;x_fieldcat-seltext_l = 'VBELN'.&lt;/P&gt;&lt;P&gt;x_fieldcat-tabname = 'ITAB'.&lt;/P&gt;&lt;P&gt;x_fieldcat-col_pos = 1.&lt;/P&gt;&lt;P&gt;APPEND x_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR x_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_fieldcat-fieldname = 'POSNR'.&lt;/P&gt;&lt;P&gt;x_fieldcat-seltext_l = 'POSNR'.&lt;/P&gt;&lt;P&gt;x_fieldcat-tabname = 'ITAB'.&lt;/P&gt;&lt;P&gt;x_fieldcat-col_pos = 2.&lt;/P&gt;&lt;P&gt;APPEND x_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR x_fieldcat.&lt;/P&gt;&lt;P&gt;x_fieldcat-fieldname = 'MALE'.&lt;/P&gt;&lt;P&gt;x_fieldcat-seltext_l = 'MALE'.&lt;/P&gt;&lt;P&gt;x_fieldcat-tabname = 'ITAB'.&lt;/P&gt;&lt;P&gt;x_fieldcat-col_pos = 3.&lt;/P&gt;&lt;P&gt;APPEND x_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR x_fieldcat.&lt;/P&gt;&lt;P&gt;x_fieldcat-fieldname = 'FEMALE'.&lt;/P&gt;&lt;P&gt;x_fieldcat-seltext_l = 'FEMALE'.&lt;/P&gt;&lt;P&gt;x_fieldcat-tabname = 'ITAB'.&lt;/P&gt;&lt;P&gt;x_fieldcat-col_pos = 3.&lt;/P&gt;&lt;P&gt;APPEND x_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR x_fieldcat.&lt;/P&gt;&lt;P&gt;x_events-name = slis_ev_top_of_page.&lt;/P&gt;&lt;P&gt;x_events-form = 'TOP_OF_PAGE'.&lt;/P&gt;&lt;P&gt;APPEND x_events TO it_events.&lt;/P&gt;&lt;P&gt;CLEAR x_events .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_layout-no_colhead = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_LIST_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;is_layout = l_layout&lt;/P&gt;&lt;P&gt;it_fieldcat = it_fieldcat&lt;/P&gt;&lt;P&gt;it_events = it_events&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;t_outtab = itab&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;&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;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 top_of_page&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;FORM top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-To display the headers for main list&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_HEADING.&lt;/P&gt;&lt;P&gt;WRITE: / sy-uline(103).&lt;/P&gt;&lt;P&gt;WRITE: / sy-vline.&lt;/P&gt;&lt;P&gt;write: v_l, 'to', v_h.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / sy-vline,&lt;/P&gt;&lt;P&gt;(8) 'VBELN'(013) ,&lt;/P&gt;&lt;P&gt;sy-vline,&lt;/P&gt;&lt;P&gt;(8) 'POSNR'(014) ,&lt;/P&gt;&lt;P&gt;sy-vline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORMAT COLOR OFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "top_of_page&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 15:23:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/2248499#M485726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T15:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/2248500#M485727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;check the sample code.&lt;/P&gt;&lt;P&gt;**Global ALV Data Declarations&lt;/P&gt;&lt;P&gt;type-pools slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of i_alv occurs 0,&lt;/P&gt;&lt;P&gt;      matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;      end of i_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Miscellanous Data Declarations&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: fieldcat type slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;      events   type slis_t_event,&lt;/P&gt;&lt;P&gt;      list_top_of_page type slis_t_listheader,&lt;/P&gt;&lt;P&gt;      top_of_page  type slis_formname value 'TOP_OF_PAGE'.&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;  perform initialization.&lt;/P&gt;&lt;P&gt;  perform get_data.&lt;/P&gt;&lt;P&gt;  perform call_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&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; Form  Initialization&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;form initialization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear i_alv.       refresh i_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform eventtab_build using events[].&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Form  Get_Data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;form  get_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select matnr into table i_alv&lt;/P&gt;&lt;P&gt;              from mara up to 100 rows.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL_ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;form call_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: variant type  disvariant.&lt;/P&gt;&lt;P&gt;  data: repid type sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  repid = sy-repid.&lt;/P&gt;&lt;P&gt;  variant-report = sy-repid.&lt;/P&gt;&lt;P&gt;  variant-username = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform build_field_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform comment_build using list_top_of_page[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call ABAP List Viewer (ALV)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            it_fieldcat        = fieldcat&lt;/P&gt;&lt;P&gt;            i_callback_program = repid&lt;/P&gt;&lt;P&gt;            is_variant         = variant&lt;/P&gt;&lt;P&gt;            it_events          = events[]&lt;/P&gt;&lt;P&gt;            i_save             = 'U'&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            t_outtab           = i_alv.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EVENTTAB_BUILD&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;form eventtab_build using events type slis_t_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Registration of events to happen during list display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  data: tmp_event type slis_alv_event.&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   = events.&lt;/P&gt;&lt;P&gt;  read table events with key name = slis_ev_top_of_page&lt;/P&gt;&lt;P&gt;                           into tmp_event.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    move top_of_page to tmp_event-form.&lt;/P&gt;&lt;P&gt;    append tmp_event to events.&lt;/P&gt;&lt;P&gt;  endif.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BUILD_FIELD_CATALOG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;form build_field_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fieldcat. refresh: fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: tmp_fc type slis_fieldcat_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  tmp_fc-reptext_ddic = 'Material'.&lt;/P&gt;&lt;P&gt;  tmp_fc-fieldname    = 'MATNR'.&lt;/P&gt;&lt;P&gt;  tmp_fc-tabname      = 'I_ALV'.&lt;/P&gt;&lt;P&gt;  tmp_fc-outputlen    = 18.&lt;/P&gt;&lt;P&gt;  append tmp_fc to fieldcat.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;COMMENT_BUILD&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;form comment_build using list_top_of_page type&lt;/P&gt;&lt;P&gt;                                        slis_t_listheader.&lt;/P&gt;&lt;P&gt;  data: tmp_line type slis_listheader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear tmp_line.&lt;/P&gt;&lt;P&gt;  tmp_line-typ  = 'H'.&lt;/P&gt;&lt;P&gt;  tmp_line-info = 'Here is a line of text'.&lt;/P&gt;&lt;P&gt;  append tmp_line to list_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear tmp_line.&lt;/P&gt;&lt;P&gt;  tmp_line-typ  = 'S'.&lt;/P&gt;&lt;P&gt;  tmp_line-key  = 'Key1'.&lt;/P&gt;&lt;P&gt;  tmp_line-info = 'Here is a value'.&lt;/P&gt;&lt;P&gt;  append tmp_line to list_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear tmp_line.&lt;/P&gt;&lt;P&gt;  tmp_line-typ  = 'A'.&lt;/P&gt;&lt;P&gt;  tmp_line-key  = 'Key2'.&lt;/P&gt;&lt;P&gt;  tmp_line-info = 'Here is another value'.&lt;/P&gt;&lt;P&gt;  append tmp_line to list_top_of_page.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TOP_OF_PAGE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;form top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'REUSE_ALV_COMMENTARY_WRITE'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            i_logo             = 'ENJOYSAP_LOGO'&lt;/P&gt;&lt;P&gt;            it_list_commentary = list_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2007 04:57:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/2248500#M485727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-31T04:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/2248501#M485728</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;Do like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data :EVENTS  TYPE SLIS_T_EVENT.

PERFORM create_event USING EVENTS[].

g_repid = sy-repid.
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program       = g_repid
            i_callback_pf_status_set = 'SET_PF_STATUS'
            is_layout                = ls_layout
            it_fieldcat              = it_fieldcat_lst1[]
*            it_sort                  = it_sort_lst
            IT_EVENTS                = events[]
       tables
            t_outtab                 = it_lst1
       exceptions
            program_error            = 1
            others                   = 2.

FORM create_event USING P_EVENTS type SLIS_T_EVENT.


DATA: LS_EVENT TYPE SLIS_ALV_EVENT.


   CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
      EXPORTING
             I_LIST_TYPE = 0
      IMPORTING
             ET_EVENTS   = P_EVENTS.


   READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                            INTO LS_EVENT.
   IF SY-SUBRC = 0.
     MOVE FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
     APPEND LS_EVENT TO P_EVENTS.
   ENDIF.
endform.                    " create_event


*************************
FORM TOP_OF_PAGE.
 clear l_string.
 l_string = 'MMS Test Report'
.
  wa_header-typ  = 'H'.
  wa_header-info = l_string.
  append wa_header to heading." index 1.

data:text(150),
     text1(20),
     text2(20),
     text3(20),
     text4(20),
     text5(20),
     text6(40),
     text7(40).

  if not so_budat is initial.

    text1 = 'Posting Date:'.
    text2 = 'from'.
    text3 = so_budat-low.
    text4 = 'To'.
    text5 = so_budat-high.
if not so_budat-high is initial.
*CONCATENATE text1 text2 text3 text4  text5 INTO text SEPARATED BY space
*.
CONCATENATE text1 text3 space text4 space text4
            INTO text SEPARATED BY space
.
else.
      CONCATENATE text1 text3 INTO text SEPARATED BY space.
endif.

    wa_header-typ  = 'S'.
    wa_header-info = text.
    APPEND wa_header TO heading.
    CLEAR: text1,text2,text3,text4,text5.

  endif.

*

   CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
         I_LOGO = 'MYSAPCOM'
             IT_LIST_COMMENTARY = HEADING.
clear heading.

  clear l_string.

endform.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if it is Useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Manjunath MS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2007 05:24:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/2248501#M485728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-31T05:24:37Z</dc:date>
    </item>
  </channel>
</rss>

