Skip to Content
0
Former Member
Dec 19, 2011 at 09:32 AM

ALV Header Text

41 Views

Hellow experts,

I have one ALV GRid and i need to put the Headeing , I ned Out Put Like Below * this is heading i want


Student Marit Report From Date1 To Date 2

StdudentID      Day1   day2
112              20     23

I m using Fiekld catalog and below is my alv code

DATA: alv_container  TYPE REF TO cl_gui_docking_container.
DATA : CDINUM TYPE KDPOS.

DATA : gr_aggr    TYPE REF TO cl_salv_aggregations.
*SET_COL_HEADER_STYLE
DATA: alv_grid       TYPE REF TO cl_gui_alv_grid.
DATA:alv_grid_ref type ref to CL_GUI_ALV_GRID.
DATA: layout    TYPE lvc_s_layo.
DATA: fieldcat  TYPE lvc_t_fcat.

DATA : w_repid LIKE sy-repid.

this is ALV Exporting data

DATA: variant TYPE  disvariant.
  DATA: repid TYPE sy-repid.
    repid = sy-repid.
      variant-report = sy-repid.
  variant-username = sy-uname.  layout-zebra = 'X'.
*BREAK-POINT.
  layout-edit_mode = 'X'.  CHECK alv_container IS INITIAL.



CREATE OBJECT alv_container
              EXPORTING repid     = repid
                        dynnr     = sy-dynnr
                        side      = alv_container->dock_at_left
                        extension = 1500.


  CREATE OBJECT alv_grid
    EXPORTING
      i_parent = alv_container.
  PERFORM get_fieldcatalog.



  CALL METHOD alv_grid->set_table_for_first_display
    EXPORTING
 is_layout        = layout
      is_variant       = variant
      i_structure_name = 'I_ALV2'

    CHANGING

      it_outtab        = i_alv2[]
      it_fieldcatalog  = fieldcat[].
ENDMODULE.   

As per my above code i m not using 'REUSE_ALV_GRID_DISPLAY function.

PLz advoice me within my code.

Edited by: Neha.Servade on Dec 19, 2011 10:40 AM