<?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 Header in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3389522#M813838</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try this code,it meets your requirement. Execute the code.&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;select vbeln&lt;/P&gt;&lt;P&gt;       posnr&lt;/P&gt;&lt;P&gt;       from vbap&lt;/P&gt;&lt;P&gt;       up to 20 rows&lt;/P&gt;&lt;P&gt;       into table itab.&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;  &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;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;          (8) ' ' ,&lt;/P&gt;&lt;P&gt;               sy-vline,&lt;/P&gt;&lt;P&gt;          (8)  ' ' ,&lt;/P&gt;&lt;P&gt;               sy-vline,&lt;/P&gt;&lt;P&gt;          (19) 'SEX'(015) centered,&lt;/P&gt;&lt;P&gt;               sy-vline.&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;          (8) 'MALE'(016) ,&lt;/P&gt;&lt;P&gt;               sy-vline,&lt;/P&gt;&lt;P&gt;           (8)  'FMALE'(017) ,&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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;chandu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Feb 2008 12:58:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-22T12:58:29Z</dc:date>
    <item>
      <title>ALV Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3389520#M813836</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;In ALVs, I need multiple coloms in header ( list header / top of page)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am getting multile lines, how to get multiple columns?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 12:21:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3389520#M813836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T12:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3389521#M813837</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 think its not possible...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 12:23:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3389521#M813837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T12:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3389522#M813838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try this code,it meets your requirement. Execute the code.&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;select vbeln&lt;/P&gt;&lt;P&gt;       posnr&lt;/P&gt;&lt;P&gt;       from vbap&lt;/P&gt;&lt;P&gt;       up to 20 rows&lt;/P&gt;&lt;P&gt;       into table itab.&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;  &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;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;          (8) ' ' ,&lt;/P&gt;&lt;P&gt;               sy-vline,&lt;/P&gt;&lt;P&gt;          (8)  ' ' ,&lt;/P&gt;&lt;P&gt;               sy-vline,&lt;/P&gt;&lt;P&gt;          (19) 'SEX'(015) centered,&lt;/P&gt;&lt;P&gt;               sy-vline.&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;          (8) 'MALE'(016) ,&lt;/P&gt;&lt;P&gt;               sy-vline,&lt;/P&gt;&lt;P&gt;           (8)  'FMALE'(017) ,&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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;chandu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 12:58:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3389522#M813838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T12:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3389523#M813839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Try the following:&lt;/P&gt;&lt;P&gt;write this in alv_reuse_grid_display parameter:&lt;/P&gt;&lt;P&gt;   --&amp;gt;  i_callback_top_of_page   = 'TOP-OF-PAGE'&lt;/P&gt;&lt;P&gt; In top_of_page write foll code:&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;&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;P&gt;&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;&lt;/P&gt;&lt;P&gt;  wa_header-info = 'PURCHASE ORDER DETAILS'.&lt;/P&gt;&lt;P&gt;&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 = 'Report generated By : '.&lt;/P&gt;&lt;P&gt;  CONCATENATE  'xyz '&lt;/P&gt;&lt;P&gt;               'pqr COMPANY : ABC TECHNOLOGIES LIMITED'&lt;/P&gt;&lt;P&gt;               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;  wa_header-typ  = 'A'.&lt;/P&gt;&lt;P&gt;  wa_header-info = '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.&lt;/P&gt;&lt;P&gt;&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;Edited by: Rohan Hardikar on Feb 22, 2008 2:39 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 13:38:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/3389523#M813839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T13:38:25Z</dc:date>
    </item>
  </channel>
</rss>

