<?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: ALV GRID DISPLAY in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237677#M482071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i got solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Apr 2007 03:43:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-27T03:43:48Z</dc:date>
    <item>
      <title>ALV GRID DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237672#M482066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI GURUS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THIS IS MY CODE. I NEED TO DISPLAY SOME HEADER DATA IN THE HEADER SPACE OF THE GRID DISPLAY. WHERE CAN I PUT THE CODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLS.  GIVE ME A SOLUTION.... THANK YOU.&lt;/P&gt;&lt;P&gt;&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;    i_callback_top_of_page   = 'TOP-OF-PAGE'&lt;/P&gt;&lt;P&gt;    is_layout                = GS_layout&lt;/P&gt;&lt;P&gt;    it_fieldcat              = it_fieldcat[]&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   it_events                = it_events[]&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    t_outtab                 = T_BOM_STATUS&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;/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-page.&lt;/P&gt;&lt;P&gt;*ALV Header declarations&lt;/P&gt;&lt;P&gt;data: t_header type slis_t_listheader,&lt;/P&gt;&lt;P&gt;      wa_header type slis_listheader,&lt;/P&gt;&lt;P&gt;      t_line like wa_header-info,&lt;/P&gt;&lt;P&gt;      ld_lines type i,&lt;/P&gt;&lt;P&gt;      ld_linesc(10) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Title&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  wa_header-typ  = 'H'.&lt;/P&gt;&lt;P&gt;  wa_header-info = 'BILL OF MATERIAL AVAILABLITY STATUS'.&lt;/P&gt;&lt;P&gt;  append wa_header to t_header.&lt;/P&gt;&lt;P&gt;  clear wa_header.&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;Date&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  wa_header-typ  = 'S'.&lt;/P&gt;&lt;P&gt;  wa_header-key = 'Date: '.&lt;/P&gt;&lt;P&gt;  CONCATENATE  sy-datum+6(2) '.'&lt;/P&gt;&lt;P&gt;               sy-datum+4(2) '.'&lt;/P&gt;&lt;P&gt;               sy-datum(4) INTO wa_header-info.   "todays date&lt;/P&gt;&lt;P&gt;  append wa_header to t_header.&lt;/P&gt;&lt;P&gt;  clear: wa_header.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Total No. of Records Selected&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  describe table t_bom_status lines ld_lines.&lt;/P&gt;&lt;P&gt;  ld_linesc = ld_lines.&lt;/P&gt;&lt;P&gt;  concatenate 'Total No. of Records Selected: ' ld_linesc&lt;/P&gt;&lt;P&gt;                    into t_line separated by space.&lt;/P&gt;&lt;P&gt;  wa_header-typ  = 'A'.&lt;/P&gt;&lt;P&gt;  wa_header-info = t_line.&lt;/P&gt;&lt;P&gt;  append wa_header to t_header.&lt;/P&gt;&lt;P&gt;  clear: wa_header, t_line.&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;&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_COMMENTARY_WRITE'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            it_list_commentary = t_header&lt;/P&gt;&lt;P&gt;            i_logo             = 'ENJOYSAP_LOGO'.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 11:04:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237672#M482066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T11:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: ALV GRID DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237673#M482067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;chk this

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  Y_TOP_PAGE                                                  *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

REPORT  y_top_page                              .

TABLES : mara.
TYPE-POOLS: slis.

DATA : w_repid LIKE sy-repid.
  w_repid = sy-repid.

DATA : BEGIN OF it_mara OCCURS 0,
       matnr LIKE mara-matnr,
       END OF it_mara.

*layout
DATA: wa_layout           TYPE SLIS_LAYOUT_ALV.
*field catalog
DATA: it_fieldcat_wrt_off TYPE slis_t_fieldcat_alv,
      wa_fieldcat_wrt_off TYPE slis_fieldcat_alv.

START-OF-SELECTION.

  SELECT matnr FROM mara INTO CORRESPONDING FIELDS OF TABLE it_mara.

END-OF-SELECTION.


  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
   EXPORTING
     i_program_name               = w_repid
   I_INTERNAL_TABNAME           = 'IT_MARA'
*     i_structure_name             = 'IT_MARA'
*   I_CLIENT_NEVER_DISPLAY       = 'X'
   I_INCLNAME                   = w_repid
*   I_BYPASSING_BUFFER           =
*   I_BUFFER_ACTIVE              =
    CHANGING
      ct_fieldcat                  = it_fieldcat_wrt_off[]
   EXCEPTIONS
     inconsistent_interface       = 1
     program_error                = 2
     OTHERS                       = 3
            .
  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     = w_repid
      i_callback_top_of_page = 'TOP-OF-PAGE'
      is_layout              = wa_layout
      it_fieldcat            = it_fieldcat_wrt_off
    TABLES
      t_outtab               = it_mara
    EXCEPTIONS
      program_error          = 1
      OTHERS                 = 2.
  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.



*-------------------------------------------------------------------*
* 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 = 'CHANDU 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.                    "top-of-page&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 11:05:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237673#M482067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T11:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: ALV GRID DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237674#M482068</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;I NEED TO DISPLAY SOME FIELD INFORMATION NOT HEADINGS AND DATE......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THAT IS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have i_data table with matnr, maktx , etc....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to display matnr, maktx in the header space of the grid display.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 11:10:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237674#M482068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T11:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: ALV GRID DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237675#M482069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try the same way!!!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for one record u can do this , but if u want multiple records loop at the table and append the headerinfo tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;read table itab index 1.

wa_header-typ  = 'S'.
  wa_header-key = 'Date: '.
  CONCATENATE  itab-matnr 
                            itab-maktx  INTO wa_header-info.   
                           APPEND wa_header TO t_header.
  CLEAR: wa_header.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 11:18:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237675#M482069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T11:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: ALV GRID DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237676#M482070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through this program which ll give you complete idea baout about header and footer.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm" target="test_blank"&gt;http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 11:21:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237676#M482070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T11:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: ALV GRID DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237677#M482071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i got solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2007 03:43:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237677#M482071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-27T03:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: ALV GRID DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237678#M482072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my question is answerd.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 07:10:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/2237678#M482072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T07:10:41Z</dc:date>
    </item>
  </channel>
</rss>

