Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Header Text

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

Look at demo program BCALV_GRID_01 which illustrates how print_top_of_page is used.

0 Kudos

Actually My issue is not For PRINT i need only Heading and I m not using RESUE_ALV_GRID_DISPLAY method plz check my above code its really apreciate if you amend the solution within my code.

Thanks

Regrads

Neha

0 Kudos

Use the CL_DD_DOCUMENT class to build the Table in the ALV Grid output. Create another container above the ur Grid output

0 Kudos

Thanks To All ,

My Issue is Solved

I wrote the below code only


layout-grid_title = 'Production Report From' 

Thats it