<?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/12217309#M1983328</link>
    <description>&lt;PRE&gt;&lt;CODE&gt; hi can anyone go through this below code and provide me solution for the header details as date time and username in the grid and list display. kindly ignore the flaws and please correct me. since i am a abap fresher.


REPORT zsdr_ord_detail.

TYPE-POOLS slis.

TABLES : zordh_t , zordi_t.


TYPES : BEGIN OF ty_out,
          zzsdoc  TYPE zordh_t-zzsdoc,
          zzsitm  TYPE zordi_t-zzsitm,
          zzdtyp  TYPE zordh_t-zzdtyp,
          zzcust  TYPE zordh_t-zzcust,
          zzmatr  TYPE zordi_t-zzmatr,
          zzcpur  TYPE zordh_t-zzcpur,
          zzmdes  TYPE zordi_t-zzmdes,
          zzoqty  TYPE zordi_t-zzoqty,
          zzunit  TYPE zordi_t-zzunit,
          zznamt  TYPE zordi_t-zznamt,
          zzdcur  TYPE zordh_t-zzdcur,
          zzerdat TYPE zordh_t-zzerdat,

        END OF ty_out.

TYPES : tt_out     TYPE TABLE OF ty_out,
        tt_zordh_t TYPE TABLE OF zordh_t,
        tt_zordi_t TYPE TABLE OF zordi_t.



PARAMETERS p_salo TYPE zzsorg DEFAULT '3000'.

SELECTION-SCREEN SKIP 2.

SELECT-OPTIONS : s_zzerdt  FOR zordh_t-zzerdat DEFAULT zordh_t-zzerdat TO sy-datum ,
                 s_zzcpur  FOR zordh_t-zzcpur.

SELECTION-SCREEN SKIP 2.

SELECT-OPTIONS : s_zzmatr FOR zordi_t-zzmatr.

SELECTION-SCREEN SKIP 2.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-001.

PARAMETERS : r1 RADIOBUTTON GROUP grp1 DEFAULT 'X' USER-COMMAND actn,
             r2 RADIOBUTTON GROUP grp1,
             r3 RADIOBUTTON GROUP grp1,
             r4 RADIOBUTTON GROUP grp1,
             r5 RADIOBUTTON GROUP grp1.

SELECTION-SCREEN END OF BLOCK b2.


TOP-OF-PAGE.

  PERFORM classical_header.

END-OF-PAGE.

START-OF-SELECTION.

  PERFORM run_report.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  RUN_REPORT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM run_report .

  DATA : lt_out     TYPE   tt_out,
         lt_zordh_t TYPE   tt_zordh_t,
         lt_zordi_t TYPE   tt_zordi_t.

  PERFORM get_data CHANGING lt_zordh_t lt_zordi_t.
  PERFORM join_data USING lt_zordh_t lt_zordi_t CHANGING lt_out.
  PERFORM write_data USING lt_out.


ENDFORM.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  GET_DATA
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      &amp;lt;--P_LT_ZTLIKP  text
*      &amp;lt;--P_LT_ZTLIPS  text
*----------------------------------------------------------------------*
FORM get_data
  CHANGING
    ct_zordh_t TYPE tt_zordh_t
    ct_zordi_t TYPE tt_zordi_t.

  SELECT * FROM zordh_t INTO TABLE ct_zordh_t WHERE zzcpur IN s_zzcpur AND zzerdat IN s_zzerdt. .


  IF ct_zordh_t IS NOT INITIAL.
    SELECT * FROM zordi_t INTO TABLE ct_zordi_t
    FOR ALL ENTRIES IN ct_zordh_t WHERE zzsdoc = ct_zordh_t-zzsdoc
                                      AND zzmatr IN s_zzmatr.

**    IF sy-subrc NE 0.
**
**      MESSAGE'enter valid records' TYPE 'E'.
**    ENDIF.
**  ELSE .
**    MESSAGE'enter records' TYPE 'E'.


  ENDIF.


ENDFORM.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  JOIN_DATA
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_LT_ZTLIKP  text
*      --&amp;gt;P_LT_ZTLIPS  text
*      &amp;lt;--P_LT_OUT  text
*----------------------------------------------------------------------*
FORM join_data
   USING
    it_zordh_t TYPE tt_zordh_t
    it_zordi_t TYPE tt_zordi_t

   CHANGING

   ct_out TYPE tt_out.

  DATA : ws_zordh_t TYPE zordh_t,
         ws_zordi_t TYPE zordi_t,
         ws_out     TYPE ty_out.

  LOOP AT it_zordi_t INTO ws_zordi_t.
    READ TABLE it_zordh_t INTO ws_zordh_t WITH KEY zzsdoc = ws_zordi_t-zzsdoc.

    IF sy-subrc = 0.

      ws_out-zzsdoc   =  ws_zordh_t-zzsdoc .
      ws_out-zzsitm   =  ws_zordi_t-zzsitm .
      ws_out-zzdtyp   =  ws_zordh_t-zzdtyp .
      ws_out-zzcust   =  ws_zordh_t-zzcust .
      ws_out-zzcpur   =  ws_zordh_t-zzcpur .
      ws_out-zzmatr   =  ws_zordi_t-zzmatr .
      ws_out-zzmdes   =  ws_zordi_t-zzmdes .
      ws_out-zzoqty   =  ws_zordi_t-zzoqty .
      ws_out-zzunit   =  ws_zordi_t-zzunit .
      ws_out-zznamt   =  ws_zordi_t-zznamt .
      ws_out-zzdcur   =  ws_zordh_t-zzdcur .
      ws_out-zzerdat  =  ws_zordh_t-zzerdat.

      APPEND ws_out TO ct_out.

    ENDIF.

  ENDLOOP.


ENDFORM.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  WRITE_DATA
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_LT_OUT  text
*----------------------------------------------------------------------*
FORM write_data
   USING
   it_out TYPE tt_out.

  DATA ws_out TYPE ty_out.



  DATA  : lt_fcat   TYPE  slis_t_fieldcat_alv,
          ls_fcat   TYPE  slis_fieldcat_alv,
          ls_layout TYPE  slis_layout_alv,
          lt_sort   TYPE slis_t_sortinfo_alv,
          ls_sort   TYPE slis_sortinfo_alv,
          lt_evnt   TYPE slis_t_event,
          ls_evnt   TYPE slis_alv_event,
          ls_vari   TYPE disvariant.
*          it_listheader TYPE slis_t_listheader,
*          wa_listheader TYPE slis_listheader.

  ls_layout-zebra = 'X'.
  ls_layout-colwidth_optimize = 'X'.


  ls_fcat-fieldname = 'zzsdoc'.
  ls_fcat-seltext_s = 'Sal.Doc' .
  ls_fcat-seltext_m = 'Sales Document'.
  ls_fcat-seltext_l = 'Sales Document'.
  ls_fcat-ddictxt       = 'M'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzsitm'.
  ls_fcat-seltext_s = 'Item' .
  ls_fcat-seltext_m = 'Item'.
  ls_fcat-seltext_l = 'Item'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.


  ls_fcat-fieldname = 'zzdtyp'.
  ls_fcat-seltext_s = 'Doc.Type' .
  ls_fcat-seltext_m = 'Document type'.
  ls_fcat-seltext_l = 'Document type'.

  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzcust'.
  ls_fcat-seltext_s = 'sold-to-pt' .
  ls_fcat-seltext_m = 'Sold-to party'.
  ls_fcat-seltext_l = 'Sold-to party'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzcpur'.
  ls_fcat-seltext_s = 'PO' .
  ls_fcat-seltext_m = 'Purchase order '.
  ls_fcat-seltext_l = 'Purchase order'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzmatr'.
  ls_fcat-seltext_s = 'Mat.No' .
  ls_fcat-seltext_m = 'Material Number '.
  ls_fcat-seltext_l = 'Material Number'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzmdes'.
  ls_fcat-seltext_s = 'Mat.decs' .
  ls_fcat-seltext_m = 'Material description '.
  ls_fcat-seltext_l = 'Material description'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzoqty'.
  ls_fcat-seltext_s = 'quantity' .
  ls_fcat-seltext_m = 'Order Quantity '.
  ls_fcat-seltext_l = 'Order Quantity'.

  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzunit'.
  ls_fcat-seltext_s = 'Sales unit' .
  ls_fcat-seltext_m = 'Sales unit '.
  ls_fcat-seltext_l = 'Sales unit'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zznamt'.
  ls_fcat-seltext_s = 'Net value' .
  ls_fcat-seltext_m = 'Net value'.
  ls_fcat-seltext_l = 'Net value'.
  ls_fcat-do_sum  =  'X'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzdcur'.
  ls_fcat-seltext_s = 'Currency' .
  ls_fcat-seltext_m = 'Currency '.
  ls_fcat-seltext_l = 'Currency'.

  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzerdat'.
  ls_fcat-seltext_s = 'Created on' .
  ls_fcat-seltext_m = 'Created on '.
  ls_fcat-seltext_l = 'Created on'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_sort-spos = 1.
  ls_sort-fieldname = 'zzdtyp'.
  ls_sort-up = 'X'.
  ls_sort-subtot = 'X'.
  APPEND ls_sort TO lt_sort.

**  ls_evnt-name = 'TOP_OF_PAGE'.
***  ls_evnt-form = 'TOP_OF_PAGE_GRID'.
**  APPEND ls_evnt TO lt_evnt.


  CASE 'X'.


    WHEN r1.


      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
        EXPORTING
          action    = 'S'
*         CORR_NUMBER                          = '          '
*         GENERATE_MAINT_TOOL_IF_MISSING       = ' '
*         SHOW_SELECTION_POPUP                 = ' '
          view_name = 'zordh_t'
*         NO_WARNING_FOR_CLIENTINDEP           = ' '
*         RFC_DESTINATION_FOR_UPGRADE          = ' '
*         CLIENT_FOR_UPGRADE                   = ' '
*         VARIANT_FOR_SELECTION                = ' '
*         COMPLEX_SELCONDS_USED                = ' '
*         CHECK_DDIC_MAINFLAG                  = ' '
*         SUPPRESS_WA_POPUP                    = ' '
*   TABLES
*         DBA_SELLIST                          =
*         EXCL_CUA_FUNCT                       =
*   EXCEPTIONS
*         CLIENT_REFERENCE                     = 1
*         FOREIGN_LOCK                         = 2
*         INVALID_ACTION                       = 3
*         NO_CLIENTINDEPENDENT_AUTH            = 4
*         NO_DATABASE_FUNCTION                 = 5
*         NO_EDITOR_FUNCTION                   = 6
*         NO_SHOW_AUTH                         = 7
*         NO_TVDIR_ENTRY                       = 8
*         NO_UPD_AUTH                          = 9
*         ONLY_SHOW_ALLOWED                    = 10
*         SYSTEM_FAILURE                       = 11
*         UNKNOWN_FIELD_IN_DBA_SELLIST         = 12
*         VIEW_NOT_FOUND                       = 13
*         MAINTENANCE_PROHIBITED               = 14
*         OTHERS    = 15
        .
      IF sy-subrc &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
      ENDIF.


    WHEN r2.

      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
        EXPORTING
          action    = 'S'
*         CORR_NUMBER                          = '          '
*         GENERATE_MAINT_TOOL_IF_MISSING       = ' '
*         SHOW_SELECTION_POPUP                 = ' '
          view_name = 'zordi_t'
*         NO_WARNING_FOR_CLIENTINDEP           = ' '
*         RFC_DESTINATION_FOR_UPGRADE          = ' '
*         CLIENT_FOR_UPGRADE                   = ' '
*         VARIANT_FOR_SELECTION                = ' '
*         COMPLEX_SELCONDS_USED                = ' '
*         CHECK_DDIC_MAINFLAG                  = ' '
*         SUPPRESS_WA_POPUP                    = ' '
*     TABLES
*         DBA_SELLIST                          =
*         EXCL_CUA_FUNCT                       =
*     EXCEPTIONS
*         CLIENT_REFERENCE                     = 1
*         FOREIGN_LOCK                         = 2
*         INVALID_ACTION                       = 3
*         NO_CLIENTINDEPENDENT_AUTH            = 4
*         NO_DATABASE_FUNCTION                 = 5
*         NO_EDITOR_FUNCTION                   = 6
*         NO_SHOW_AUTH                         = 7
*         NO_TVDIR_ENTRY                       = 8
*         NO_UPD_AUTH                          = 9
*         ONLY_SHOW_ALLOWED                    = 10
*         SYSTEM_FAILURE                       = 11
*         UNKNOWN_FIELD_IN_DBA_SELLIST         = 12
*         VIEW_NOT_FOUND                       = 13
*         MAINTENANCE_PROHIBITED               = 14
*         OTHERS    = 15
        .
      IF sy-subrc &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
      ENDIF.

    WHEN r3.

      LOOP AT it_out INTO ws_out.

        WRITE : / ws_out-zzsdoc , ws_out-zzsitm , ws_out-zzdtyp , ws_out-zzcust , ws_out-zzcpur, ws_out-zzmatr , ws_out-zzmdes , ws_out-zzoqty , ws_out-zzunit , ws_out-zznamt ,ws_out-zzdcur , ws_out-zzerdat.

      ENDLOOP.

    WHEN r4.

      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
*         I_INTERFACE_CHECK      = ' '
*         I_BYPASSING_BUFFER     = ' '
*         I_BUFFER_ACTIVE        = ' '
          i_callback_program     = 'sy-repid '
*         I_CALLBACK_PF_STATUS_SET          = ' '
*         I_CALLBACK_USER_COMMAND           = ' '
          i_callback_top_of_page = 'top-of-page'
*         I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*         I_CALLBACK_HTML_END_OF_LIST       = ' '
*         i_structure_name       =
*         I_BACKGROUND_ID        = ' '
*         i_grid_title           = ''
**         I_GRID_SETTINGS                   =
          is_layout              = ls_layout
          it_fieldcat            = lt_fcat
**         IT_EXCLUDING                      =
*         IT_SPECIAL_GROUPS      =
          it_sort                = lt_sort
*         IT_FILTER              =
*         IS_SEL_HIDE            =
*         I_DEFAULT              = 'X'
*         I_SAVE                 = 'A '
*         IS_VARIANT             =
*          it_events              = lt_evnt
*         IT_EVENT_EXIT          =
*         IS_PRINT               =
*         IS_REPREP_ID           =
*         I_SCREEN_START_COLUMN  = 0
*         I_SCREEN_START_LINE    = 0
*         I_SCREEN_END_COLUMN    = 0
*         I_SCREEN_END_LINE      = 0
*         I_HTML_HEIGHT_TOP      = 0
*         I_HTML_HEIGHT_END      = 0
*         IT_ALV_GRAPHICS        =
*         IT_HYPERLINK           =
*         IT_ADD_FIELDCAT        =
*         IT_EXCEPT_QINFO        =
*         IR_SALV_FULLSCREEN_ADAPTER        =
*       IMPORTING
*         E_EXIT_CAUSED_BY_CALLER           =
*         ES_EXIT_CAUSED_BY_USER =
        TABLES
          t_outtab               = it_out
*       EXCEPTIONS
*         PROGRAM_ERROR          = 1
*         OTHERS                 = 2
        .
      IF sy-subrc &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
      ENDIF.

    WHEN r5.

      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
***     I_INTERFACE_CHECK              = ' '
***     I_BYPASSING_BUFFER             =
***     I_BUFFER_ACTIVE                = ' '
          i_callback_program = 'sy-repid '
***     I_CALLBACK_PF_STATUS_SET       = ' '
***     I_CALLBACK_USER_COMMAND        = ' '
***     I_STRUCTURE_NAME               =
          is_layout          = ls_layout
          it_fieldcat        = lt_fcat
***     IT_EXCLUDING                   =
***     IT_SPECIAL_GROUPS              =
          it_sort            = lt_sort
***     IT_FILTER                      =
***     IS_SEL_HIDE                    =
***     I_DEFAULT                      = 'X'
***     I_SAVE                         = ' '
          is_variant         = ls_vari
          it_events          = lt_evnt
***     IT_EVENT_EXIT                  =
***     IS_PRINT                       =
***     IS_REPREP_ID                   =
***     I_SCREEN_START_COLUMN          = 0
***     I_SCREEN_START_LINE            = 0
***     I_SCREEN_END_COLUMN            = 0
***     I_SCREEN_END_LINE              = 0
***     IR_SALV_LIST_ADAPTER           =
***     IT_EXCEPT_QINFO                =
***     I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
***   IMPORTING
***     E_EXIT_CAUSED_BY_CALLER        =
***     ES_EXIT_CAUSED_BY_USER         =
        TABLES
          t_outtab           = it_out
***   EXCEPTIONS
***     PROGRAM_ERROR                  = 1
***     OTHERS                         = 2
        .
**  IF sy-subrc &amp;lt;&amp;gt; 0.
*** Implement suitable error handling here
**  ENDIF.




  ENDCASE.

ENDFORM.


**&amp;amp;---------------------------------------------------------------------*
**&amp;amp;      Form  HEADER
**&amp;amp;---------------------------------------------------------------------*
**       text
**----------------------------------------------------------------------*
**  --&amp;gt;  p1        text
**  &amp;lt;--  p2        text
**----------------------------------------------------------------------*
*FORM header .
*
*
*  WRITE : / 'Delivery' , 12 'CREATED BY' , 28 'CRTD.DAT' , 38 'D.CAT' , 44 'MAT' , 58 'MAT.GP' ,65 'PLANT' .
*
*ENDFORM.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  TOP-OF-PAGE
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM top_of_page.

  DATA : lt_head TYPE slis_t_listheader,
         ls_head TYPE slis_listheader.

  ls_head-TYP = 'H'.
  ls_head-KEY = 'Header'.
  ls_head-INFO = 'Details'.
  APPEND ls_head to lt_head.


  ls_head-typ = 'S'.
  ls_head-key = 'Date'.
  WRITE sy-datum TO ls_head-info.
  APPEND ls_head TO lt_head.

  ls_head-typ = 'S'.
  ls_head-key = 'Time'.
  WRITE sy-uzeit TO ls_head-info.
  APPEND ls_head TO lt_head.

  ls_head-typ = 'S'.
  ls_head-key = 'Name'.
  WRITE sy-uname TO ls_head-info.
  APPEND ls_head TO lt_head.



  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary = lt_head
      i_logo             = 'ENJOYSAP_LOGO'
*     I_END_OF_LIST_GRID =
*     I_ALV_FORM         =
    .


ENDFORM.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  CLASSICAL_HEADER
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM classical_header .

  WRITE : /  'Sales.Doc' ,12 'Item' ,16 'Doc.Type', 24'sold-to-pty' ,36 'pur.order' , 55'Material No' ,68 'Material.Desc' ,
                                                                            118 'Quantity' , 128'O.Unit' , 142'Net value' ,152 'Currency', 160'Created on'.

ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 28 Jun 2020 10:22:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2020-06-28T10:22:03Z</dc:date>
    <item>
      <title>alv header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/12217309#M1983328</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; hi can anyone go through this below code and provide me solution for the header details as date time and username in the grid and list display. kindly ignore the flaws and please correct me. since i am a abap fresher.


REPORT zsdr_ord_detail.

TYPE-POOLS slis.

TABLES : zordh_t , zordi_t.


TYPES : BEGIN OF ty_out,
          zzsdoc  TYPE zordh_t-zzsdoc,
          zzsitm  TYPE zordi_t-zzsitm,
          zzdtyp  TYPE zordh_t-zzdtyp,
          zzcust  TYPE zordh_t-zzcust,
          zzmatr  TYPE zordi_t-zzmatr,
          zzcpur  TYPE zordh_t-zzcpur,
          zzmdes  TYPE zordi_t-zzmdes,
          zzoqty  TYPE zordi_t-zzoqty,
          zzunit  TYPE zordi_t-zzunit,
          zznamt  TYPE zordi_t-zznamt,
          zzdcur  TYPE zordh_t-zzdcur,
          zzerdat TYPE zordh_t-zzerdat,

        END OF ty_out.

TYPES : tt_out     TYPE TABLE OF ty_out,
        tt_zordh_t TYPE TABLE OF zordh_t,
        tt_zordi_t TYPE TABLE OF zordi_t.



PARAMETERS p_salo TYPE zzsorg DEFAULT '3000'.

SELECTION-SCREEN SKIP 2.

SELECT-OPTIONS : s_zzerdt  FOR zordh_t-zzerdat DEFAULT zordh_t-zzerdat TO sy-datum ,
                 s_zzcpur  FOR zordh_t-zzcpur.

SELECTION-SCREEN SKIP 2.

SELECT-OPTIONS : s_zzmatr FOR zordi_t-zzmatr.

SELECTION-SCREEN SKIP 2.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-001.

PARAMETERS : r1 RADIOBUTTON GROUP grp1 DEFAULT 'X' USER-COMMAND actn,
             r2 RADIOBUTTON GROUP grp1,
             r3 RADIOBUTTON GROUP grp1,
             r4 RADIOBUTTON GROUP grp1,
             r5 RADIOBUTTON GROUP grp1.

SELECTION-SCREEN END OF BLOCK b2.


TOP-OF-PAGE.

  PERFORM classical_header.

END-OF-PAGE.

START-OF-SELECTION.

  PERFORM run_report.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  RUN_REPORT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM run_report .

  DATA : lt_out     TYPE   tt_out,
         lt_zordh_t TYPE   tt_zordh_t,
         lt_zordi_t TYPE   tt_zordi_t.

  PERFORM get_data CHANGING lt_zordh_t lt_zordi_t.
  PERFORM join_data USING lt_zordh_t lt_zordi_t CHANGING lt_out.
  PERFORM write_data USING lt_out.


ENDFORM.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  GET_DATA
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      &amp;lt;--P_LT_ZTLIKP  text
*      &amp;lt;--P_LT_ZTLIPS  text
*----------------------------------------------------------------------*
FORM get_data
  CHANGING
    ct_zordh_t TYPE tt_zordh_t
    ct_zordi_t TYPE tt_zordi_t.

  SELECT * FROM zordh_t INTO TABLE ct_zordh_t WHERE zzcpur IN s_zzcpur AND zzerdat IN s_zzerdt. .


  IF ct_zordh_t IS NOT INITIAL.
    SELECT * FROM zordi_t INTO TABLE ct_zordi_t
    FOR ALL ENTRIES IN ct_zordh_t WHERE zzsdoc = ct_zordh_t-zzsdoc
                                      AND zzmatr IN s_zzmatr.

**    IF sy-subrc NE 0.
**
**      MESSAGE'enter valid records' TYPE 'E'.
**    ENDIF.
**  ELSE .
**    MESSAGE'enter records' TYPE 'E'.


  ENDIF.


ENDFORM.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  JOIN_DATA
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_LT_ZTLIKP  text
*      --&amp;gt;P_LT_ZTLIPS  text
*      &amp;lt;--P_LT_OUT  text
*----------------------------------------------------------------------*
FORM join_data
   USING
    it_zordh_t TYPE tt_zordh_t
    it_zordi_t TYPE tt_zordi_t

   CHANGING

   ct_out TYPE tt_out.

  DATA : ws_zordh_t TYPE zordh_t,
         ws_zordi_t TYPE zordi_t,
         ws_out     TYPE ty_out.

  LOOP AT it_zordi_t INTO ws_zordi_t.
    READ TABLE it_zordh_t INTO ws_zordh_t WITH KEY zzsdoc = ws_zordi_t-zzsdoc.

    IF sy-subrc = 0.

      ws_out-zzsdoc   =  ws_zordh_t-zzsdoc .
      ws_out-zzsitm   =  ws_zordi_t-zzsitm .
      ws_out-zzdtyp   =  ws_zordh_t-zzdtyp .
      ws_out-zzcust   =  ws_zordh_t-zzcust .
      ws_out-zzcpur   =  ws_zordh_t-zzcpur .
      ws_out-zzmatr   =  ws_zordi_t-zzmatr .
      ws_out-zzmdes   =  ws_zordi_t-zzmdes .
      ws_out-zzoqty   =  ws_zordi_t-zzoqty .
      ws_out-zzunit   =  ws_zordi_t-zzunit .
      ws_out-zznamt   =  ws_zordi_t-zznamt .
      ws_out-zzdcur   =  ws_zordh_t-zzdcur .
      ws_out-zzerdat  =  ws_zordh_t-zzerdat.

      APPEND ws_out TO ct_out.

    ENDIF.

  ENDLOOP.


ENDFORM.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  WRITE_DATA
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_LT_OUT  text
*----------------------------------------------------------------------*
FORM write_data
   USING
   it_out TYPE tt_out.

  DATA ws_out TYPE ty_out.



  DATA  : lt_fcat   TYPE  slis_t_fieldcat_alv,
          ls_fcat   TYPE  slis_fieldcat_alv,
          ls_layout TYPE  slis_layout_alv,
          lt_sort   TYPE slis_t_sortinfo_alv,
          ls_sort   TYPE slis_sortinfo_alv,
          lt_evnt   TYPE slis_t_event,
          ls_evnt   TYPE slis_alv_event,
          ls_vari   TYPE disvariant.
*          it_listheader TYPE slis_t_listheader,
*          wa_listheader TYPE slis_listheader.

  ls_layout-zebra = 'X'.
  ls_layout-colwidth_optimize = 'X'.


  ls_fcat-fieldname = 'zzsdoc'.
  ls_fcat-seltext_s = 'Sal.Doc' .
  ls_fcat-seltext_m = 'Sales Document'.
  ls_fcat-seltext_l = 'Sales Document'.
  ls_fcat-ddictxt       = 'M'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzsitm'.
  ls_fcat-seltext_s = 'Item' .
  ls_fcat-seltext_m = 'Item'.
  ls_fcat-seltext_l = 'Item'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.


  ls_fcat-fieldname = 'zzdtyp'.
  ls_fcat-seltext_s = 'Doc.Type' .
  ls_fcat-seltext_m = 'Document type'.
  ls_fcat-seltext_l = 'Document type'.

  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzcust'.
  ls_fcat-seltext_s = 'sold-to-pt' .
  ls_fcat-seltext_m = 'Sold-to party'.
  ls_fcat-seltext_l = 'Sold-to party'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzcpur'.
  ls_fcat-seltext_s = 'PO' .
  ls_fcat-seltext_m = 'Purchase order '.
  ls_fcat-seltext_l = 'Purchase order'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzmatr'.
  ls_fcat-seltext_s = 'Mat.No' .
  ls_fcat-seltext_m = 'Material Number '.
  ls_fcat-seltext_l = 'Material Number'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzmdes'.
  ls_fcat-seltext_s = 'Mat.decs' .
  ls_fcat-seltext_m = 'Material description '.
  ls_fcat-seltext_l = 'Material description'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzoqty'.
  ls_fcat-seltext_s = 'quantity' .
  ls_fcat-seltext_m = 'Order Quantity '.
  ls_fcat-seltext_l = 'Order Quantity'.

  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzunit'.
  ls_fcat-seltext_s = 'Sales unit' .
  ls_fcat-seltext_m = 'Sales unit '.
  ls_fcat-seltext_l = 'Sales unit'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zznamt'.
  ls_fcat-seltext_s = 'Net value' .
  ls_fcat-seltext_m = 'Net value'.
  ls_fcat-seltext_l = 'Net value'.
  ls_fcat-do_sum  =  'X'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzdcur'.
  ls_fcat-seltext_s = 'Currency' .
  ls_fcat-seltext_m = 'Currency '.
  ls_fcat-seltext_l = 'Currency'.

  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_fcat-fieldname = 'zzerdat'.
  ls_fcat-seltext_s = 'Created on' .
  ls_fcat-seltext_m = 'Created on '.
  ls_fcat-seltext_l = 'Created on'.
  APPEND  ls_fcat TO lt_fcat[].
  CLEAR ls_fcat.

  ls_sort-spos = 1.
  ls_sort-fieldname = 'zzdtyp'.
  ls_sort-up = 'X'.
  ls_sort-subtot = 'X'.
  APPEND ls_sort TO lt_sort.

**  ls_evnt-name = 'TOP_OF_PAGE'.
***  ls_evnt-form = 'TOP_OF_PAGE_GRID'.
**  APPEND ls_evnt TO lt_evnt.


  CASE 'X'.


    WHEN r1.


      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
        EXPORTING
          action    = 'S'
*         CORR_NUMBER                          = '          '
*         GENERATE_MAINT_TOOL_IF_MISSING       = ' '
*         SHOW_SELECTION_POPUP                 = ' '
          view_name = 'zordh_t'
*         NO_WARNING_FOR_CLIENTINDEP           = ' '
*         RFC_DESTINATION_FOR_UPGRADE          = ' '
*         CLIENT_FOR_UPGRADE                   = ' '
*         VARIANT_FOR_SELECTION                = ' '
*         COMPLEX_SELCONDS_USED                = ' '
*         CHECK_DDIC_MAINFLAG                  = ' '
*         SUPPRESS_WA_POPUP                    = ' '
*   TABLES
*         DBA_SELLIST                          =
*         EXCL_CUA_FUNCT                       =
*   EXCEPTIONS
*         CLIENT_REFERENCE                     = 1
*         FOREIGN_LOCK                         = 2
*         INVALID_ACTION                       = 3
*         NO_CLIENTINDEPENDENT_AUTH            = 4
*         NO_DATABASE_FUNCTION                 = 5
*         NO_EDITOR_FUNCTION                   = 6
*         NO_SHOW_AUTH                         = 7
*         NO_TVDIR_ENTRY                       = 8
*         NO_UPD_AUTH                          = 9
*         ONLY_SHOW_ALLOWED                    = 10
*         SYSTEM_FAILURE                       = 11
*         UNKNOWN_FIELD_IN_DBA_SELLIST         = 12
*         VIEW_NOT_FOUND                       = 13
*         MAINTENANCE_PROHIBITED               = 14
*         OTHERS    = 15
        .
      IF sy-subrc &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
      ENDIF.


    WHEN r2.

      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
        EXPORTING
          action    = 'S'
*         CORR_NUMBER                          = '          '
*         GENERATE_MAINT_TOOL_IF_MISSING       = ' '
*         SHOW_SELECTION_POPUP                 = ' '
          view_name = 'zordi_t'
*         NO_WARNING_FOR_CLIENTINDEP           = ' '
*         RFC_DESTINATION_FOR_UPGRADE          = ' '
*         CLIENT_FOR_UPGRADE                   = ' '
*         VARIANT_FOR_SELECTION                = ' '
*         COMPLEX_SELCONDS_USED                = ' '
*         CHECK_DDIC_MAINFLAG                  = ' '
*         SUPPRESS_WA_POPUP                    = ' '
*     TABLES
*         DBA_SELLIST                          =
*         EXCL_CUA_FUNCT                       =
*     EXCEPTIONS
*         CLIENT_REFERENCE                     = 1
*         FOREIGN_LOCK                         = 2
*         INVALID_ACTION                       = 3
*         NO_CLIENTINDEPENDENT_AUTH            = 4
*         NO_DATABASE_FUNCTION                 = 5
*         NO_EDITOR_FUNCTION                   = 6
*         NO_SHOW_AUTH                         = 7
*         NO_TVDIR_ENTRY                       = 8
*         NO_UPD_AUTH                          = 9
*         ONLY_SHOW_ALLOWED                    = 10
*         SYSTEM_FAILURE                       = 11
*         UNKNOWN_FIELD_IN_DBA_SELLIST         = 12
*         VIEW_NOT_FOUND                       = 13
*         MAINTENANCE_PROHIBITED               = 14
*         OTHERS    = 15
        .
      IF sy-subrc &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
      ENDIF.

    WHEN r3.

      LOOP AT it_out INTO ws_out.

        WRITE : / ws_out-zzsdoc , ws_out-zzsitm , ws_out-zzdtyp , ws_out-zzcust , ws_out-zzcpur, ws_out-zzmatr , ws_out-zzmdes , ws_out-zzoqty , ws_out-zzunit , ws_out-zznamt ,ws_out-zzdcur , ws_out-zzerdat.

      ENDLOOP.

    WHEN r4.

      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
*         I_INTERFACE_CHECK      = ' '
*         I_BYPASSING_BUFFER     = ' '
*         I_BUFFER_ACTIVE        = ' '
          i_callback_program     = 'sy-repid '
*         I_CALLBACK_PF_STATUS_SET          = ' '
*         I_CALLBACK_USER_COMMAND           = ' '
          i_callback_top_of_page = 'top-of-page'
*         I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*         I_CALLBACK_HTML_END_OF_LIST       = ' '
*         i_structure_name       =
*         I_BACKGROUND_ID        = ' '
*         i_grid_title           = ''
**         I_GRID_SETTINGS                   =
          is_layout              = ls_layout
          it_fieldcat            = lt_fcat
**         IT_EXCLUDING                      =
*         IT_SPECIAL_GROUPS      =
          it_sort                = lt_sort
*         IT_FILTER              =
*         IS_SEL_HIDE            =
*         I_DEFAULT              = 'X'
*         I_SAVE                 = 'A '
*         IS_VARIANT             =
*          it_events              = lt_evnt
*         IT_EVENT_EXIT          =
*         IS_PRINT               =
*         IS_REPREP_ID           =
*         I_SCREEN_START_COLUMN  = 0
*         I_SCREEN_START_LINE    = 0
*         I_SCREEN_END_COLUMN    = 0
*         I_SCREEN_END_LINE      = 0
*         I_HTML_HEIGHT_TOP      = 0
*         I_HTML_HEIGHT_END      = 0
*         IT_ALV_GRAPHICS        =
*         IT_HYPERLINK           =
*         IT_ADD_FIELDCAT        =
*         IT_EXCEPT_QINFO        =
*         IR_SALV_FULLSCREEN_ADAPTER        =
*       IMPORTING
*         E_EXIT_CAUSED_BY_CALLER           =
*         ES_EXIT_CAUSED_BY_USER =
        TABLES
          t_outtab               = it_out
*       EXCEPTIONS
*         PROGRAM_ERROR          = 1
*         OTHERS                 = 2
        .
      IF sy-subrc &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
      ENDIF.

    WHEN r5.

      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
***     I_INTERFACE_CHECK              = ' '
***     I_BYPASSING_BUFFER             =
***     I_BUFFER_ACTIVE                = ' '
          i_callback_program = 'sy-repid '
***     I_CALLBACK_PF_STATUS_SET       = ' '
***     I_CALLBACK_USER_COMMAND        = ' '
***     I_STRUCTURE_NAME               =
          is_layout          = ls_layout
          it_fieldcat        = lt_fcat
***     IT_EXCLUDING                   =
***     IT_SPECIAL_GROUPS              =
          it_sort            = lt_sort
***     IT_FILTER                      =
***     IS_SEL_HIDE                    =
***     I_DEFAULT                      = 'X'
***     I_SAVE                         = ' '
          is_variant         = ls_vari
          it_events          = lt_evnt
***     IT_EVENT_EXIT                  =
***     IS_PRINT                       =
***     IS_REPREP_ID                   =
***     I_SCREEN_START_COLUMN          = 0
***     I_SCREEN_START_LINE            = 0
***     I_SCREEN_END_COLUMN            = 0
***     I_SCREEN_END_LINE              = 0
***     IR_SALV_LIST_ADAPTER           =
***     IT_EXCEPT_QINFO                =
***     I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
***   IMPORTING
***     E_EXIT_CAUSED_BY_CALLER        =
***     ES_EXIT_CAUSED_BY_USER         =
        TABLES
          t_outtab           = it_out
***   EXCEPTIONS
***     PROGRAM_ERROR                  = 1
***     OTHERS                         = 2
        .
**  IF sy-subrc &amp;lt;&amp;gt; 0.
*** Implement suitable error handling here
**  ENDIF.




  ENDCASE.

ENDFORM.


**&amp;amp;---------------------------------------------------------------------*
**&amp;amp;      Form  HEADER
**&amp;amp;---------------------------------------------------------------------*
**       text
**----------------------------------------------------------------------*
**  --&amp;gt;  p1        text
**  &amp;lt;--  p2        text
**----------------------------------------------------------------------*
*FORM header .
*
*
*  WRITE : / 'Delivery' , 12 'CREATED BY' , 28 'CRTD.DAT' , 38 'D.CAT' , 44 'MAT' , 58 'MAT.GP' ,65 'PLANT' .
*
*ENDFORM.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  TOP-OF-PAGE
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM top_of_page.

  DATA : lt_head TYPE slis_t_listheader,
         ls_head TYPE slis_listheader.

  ls_head-TYP = 'H'.
  ls_head-KEY = 'Header'.
  ls_head-INFO = 'Details'.
  APPEND ls_head to lt_head.


  ls_head-typ = 'S'.
  ls_head-key = 'Date'.
  WRITE sy-datum TO ls_head-info.
  APPEND ls_head TO lt_head.

  ls_head-typ = 'S'.
  ls_head-key = 'Time'.
  WRITE sy-uzeit TO ls_head-info.
  APPEND ls_head TO lt_head.

  ls_head-typ = 'S'.
  ls_head-key = 'Name'.
  WRITE sy-uname TO ls_head-info.
  APPEND ls_head TO lt_head.



  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary = lt_head
      i_logo             = 'ENJOYSAP_LOGO'
*     I_END_OF_LIST_GRID =
*     I_ALV_FORM         =
    .


ENDFORM.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  CLASSICAL_HEADER
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM classical_header .

  WRITE : /  'Sales.Doc' ,12 'Item' ,16 'Doc.Type', 24'sold-to-pty' ,36 'pur.order' , 55'Material No' ,68 'Material.Desc' ,
                                                                            118 'Quantity' , 128'O.Unit' , 142'Net value' ,152 'Currency', 160'Created on'.

ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 28 Jun 2020 10:22:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/12217309#M1983328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-06-28T10:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: alv header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/12217310#M1983329</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;karoncdas_31&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;When i skimmed through your code lines i find few places where the code can be improved:&lt;/P&gt;&lt;P&gt;1) Don't use obsolete statements eg;TABLES.&lt;/P&gt;&lt;P&gt;2) Try using inline declarations.&lt;/P&gt;&lt;P&gt;3) Your Code can be improvised by using efficient syntax for example using FOR keyword instead of looping.&lt;/P&gt;&lt;P&gt;4) Before applying FOR ALL ENTRIES ensure the internal table does not have duplicate entries.&lt;/P&gt;&lt;P&gt;Coming back to your question i find these mistakes listed below:&lt;/P&gt;&lt;P&gt;1) While filling the Field Catalog you must input the field name in Caps, for eg: &lt;STRONG&gt;'ZZDTYP'&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;2) While calling &lt;STRONG&gt;'REUSE_ALV_GRID_DISPLAY' &lt;/STRONG&gt;, you are passing the call back program value in single quotes like this &lt;STRONG&gt;'sy-repid '&lt;/STRONG&gt; rather you just need to pass &lt;STRONG&gt;sy-repid&lt;/STRONG&gt; without any single quotes.&lt;/P&gt;&lt;P&gt;3) The subroutine name that you pass for top of page parameter must be passed in caps, you must replace&lt;STRONG&gt; &lt;/STRONG&gt;&lt;STRONG&gt;'top-of-page' &lt;/STRONG&gt;with&lt;STRONG&gt; &lt;/STRONG&gt;&lt;STRONG&gt;'TOP-OF-PAGE' --&amp;gt; Your actual question&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Wish you all the Best!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jun 2020 12:47:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/12217310#M1983329</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2020-06-28T12:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: alv header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/12217311#M1983330</link>
      <description>&lt;P&gt;Your code would be much MORE simple and short if you would just use &lt;STRONG&gt;CL_SALV_TABLE &lt;/STRONG&gt;instead of those obsolete function modules... And consequently, more people would look at your code. Please don't post commented-out lines of statements too.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jun 2020 17:08:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/12217311#M1983330</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-06-28T17:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: alv header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/12217312#M1983331</link>
      <description>&lt;P&gt;Maybe another way....&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Select .....
       from Z.....
       into @data(myTable).


    try.
        cl_salv_table=&amp;gt;factory( exporting list_display   = if_salv_c_bool_sap=&amp;gt;false
                                importing r_salv_table   = data(salv)
                                changing t_table        =  myTable ).

        salv-&amp;gt;get_functions( )-&amp;gt;set_all( ).

        salv-&amp;gt;set_top_of_list( build_header( ) ).

* Change 
        salv-&amp;gt;get_columns( )-&amp;gt;get_column( 'columnname' )-&amp;gt;set_medium_text( 'Bla' ).
        salv-&amp;gt;get_columns( )-&amp;gt;get_column( 'columnname' )-&amp;gt;set_long_text( 'Bla' ).

        salv-&amp;gt;display( ).
      catch cx_salv_msg cx_salv_not_found.
    endtry.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;methods build_header
        returning value(r_grid_header) type ref to cl_salv_form_layout_grid.


method build_header.

    r_grid_header  = new cl_salv_form_layout_grid( ).
    data(groupbox) = new cl_salv_form_groupbox( header = 'NameOfGroupbox' ).
    r_grid_header-&amp;gt;set_element( row = 3 column = 21 r_element = groupbox ).

    data(groupbox_grid) = groupbox-&amp;gt;create_grid( ).
    groupbox_grid-&amp;gt;set_grid_lines( if_salv_form_c_grid_lines=&amp;gt;no_lines ).

    groupbox_grid-&amp;gt;create_label( row = 1 column = 1 
                                 text = |Date { sy-date date = user }| ).
    groupbox_grid-&amp;gt;create_label( row = 2 column = 1 
                                 text = |Time { sy-uzeit time = user }| ).
    groupbox_grid-&amp;gt;create_label( row = 3 column = 1 
                                 text = |Name { sy-uname }| ).
endmethod&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Jun 2020 08:35:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-header/m-p/12217312#M1983331</guid>
      <dc:creator>ascm</dc:creator>
      <dc:date>2020-06-29T08:35:39Z</dc:date>
    </item>
  </channel>
</rss>

