<?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/3423228#M822196</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement in ALV Report where i want to display the some title,current date and starting date of every week for which the records should be displayed.These records which will be displayed will be only for a week with the starting date.I am not able to get how to display the starting date of the week on the header.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Feb 2008 17:47:35 GMT</pubDate>
    <dc:creator>sudhir_uppalapati</dc:creator>
    <dc:date>2008-02-23T17:47:35Z</dc:date>
    <item>
      <title>ALV Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3423228#M822196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement in ALV Report where i want to display the some title,current date and starting date of every week for which the records should be displayed.These records which will be displayed will be only for a week with the starting date.I am not able to get how to display the starting date of the week on the header.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2008 17:47:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3423228#M822196</guid>
      <dc:creator>sudhir_uppalapati</dc:creator>
      <dc:date>2008-02-23T17:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3423229#M822197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In order to insert a report heading in to the ALV grid you need to perform the following steps:&lt;/P&gt;&lt;P&gt;1. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include 'top-of-page' FORM&lt;/P&gt;&lt;P&gt;2. Create 'top-of-page' FORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
 
 
-------------------------------------------------------------------

Form TOP-OF-PAGE *
------------------------------------------------------------------- 
ALV Report Header *
-------------------------------------------------------------------
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
  
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
  
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
  
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
 
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header. 
i_logo = 'Z_LOGO'.
endform.
  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandru&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2008 17:51:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3423229#M822197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-23T17:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3423230#M822198</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;You can do as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the FM &lt;STRONG&gt;DATE_TO_DAY&lt;/STRONG&gt; "Input the date 23/02/2008 --&amp;gt; Saturday 23, 2007 ouptut.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And refer to the code below to display the in ALV Header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

 call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
            i_save                  = 'X'
       tables
            t_outtab                = it_ekko
       exceptions
            program_error           = 1
            others                  = 2.

*-------------------------------------------------------------------*
* Form  TOP-OF-PAGE                                                 *
*-------------------------------------------------------------------*
* ALV Report Header                                                 *
*-------------------------------------------------------------------*
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
      wa_header type slis_listheader,
      t_line like wa_header-info,
      ld_lines type i,
      ld_linesc(10) type c.

* Title
  wa_header-typ  = 'H'.
  wa_header-info = 'EKKO Table Report'.
  append wa_header to t_header.
  clear wa_header.

* Date
  wa_header-typ  = 'S'.
  wa_header-key = 'Date: '.
  CONCATENATE  sy-datum+6(2) '.'
               sy-datum+4(2) '.'
               sy-datum(4) INTO wa_header-info.   "todays date
  append wa_header to t_header.
  clear: wa_header.

* Total No. of Records Selected
  describe table it_ekko lines ld_lines.
  ld_linesc = ld_lines.
  concatenate 'Total No. of Records Selected: ' ld_linesc
                    into t_line separated by space.
  wa_header-typ  = 'A'.
  wa_header-info = t_line.
  append wa_header to t_header.
  clear: wa_header, t_line.

  call function 'REUSE_ALV_COMMENTARY_WRITE'
       exporting
            it_list_commentary = t_header.
*            i_logo             = 'Z_LOGO'.
endform.
&lt;/CODE&gt;&lt;/PRE&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>Sat, 23 Feb 2008 17:54:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3423230#M822198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-23T17:54:16Z</dc:date>
    </item>
  </channel>
</rss>

