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: 

To display Top of page using CL_GUI_ALV_GRID class

Former Member
0 Kudos

Dear Experts,

I want to display top of page in my alv grid display. I am using CL_GUI_ALV_GRID class and method SET_TABLE_FOR_FIRST_DISPLAY.

Can any one guide me how to display top of page in this.It would be better if any one can give a sample code.

Regards

Siddhesh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Check the blog for Top-of-page in Grid Control

/people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid

Regards

Navneet

4 REPLIES 4

Former Member
0 Kudos

Hi

Check this thread

Also check the demo program BCALV_GRID_01

Thanks

Naren

Former Member
0 Kudos

Hi siddesh

check this format ...it will be useful for displaying data on top of the page

TYPE-POOLS: SLIS.

DATA: EVENT TYPE SLIS_T_EVENT WITH HEADER LINE.

START-OF-SELECTION.

EVENT-NAME = 'TOP_OF_PAGE'.

EVENT-FORM = 'TOP'.

APPEND EVENT.

END-OF-SELECTION.

FORM TOP.

DATA: LIST TYPE SLIS_T_LISTHEADER WITH HEADER LINE.

LIST-TYP = 'H'.

LIST-INFO = 'Plant/Crop/Variety Wise Seed Arrival Report from Prd.Centers'.

APPEND LIST.

reward if useful

Vikram

Former Member
0 Kudos

Hi

Check the blog for Top-of-page in Grid Control

/people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid

Regards

Navneet

Former Member
0 Kudos

If you just want to set the grid title then check

DATA: lv_date TYPE c LENGTH 10 ,

lv_time TYPE c LENGTH 8 ,

lv_text TYPE string.

  • Set table for First Display

WRITE sy-datum TO lv_date DD/MM/YYYY.

WRITE sy-uzeit TO lv_time USING EDIT MASK '__:__:__'.

CONCATENATE 'Report' 'Date' lv_date 'Time' lv_time INTO lv_text RESPECTING BLANKS.

gs_layo-grid_title = lv_text.

gs_layo-smalltitle = gc_flag .

IF gs_variant-report IS INITIAL.

gs_variant-report = sy-repid.

ENDIF.

IF NOT p_layout IS INITIAL.

gs_variant-variant = p_layout.

ENDIF.

CALL METHOD go_grid->set_table_for_first_display

EXPORTING

is_variant = gs_variant

i_save = gc_save

i_default = abap_true

is_layout = gs_layo

CHANGING

it_outtab = gt_final[]

it_fieldcatalog = gt_fcat.

But if you want to do the split screen with two parts and show the top of page seperately then check

RSDEMO_EASY_SPLITTER_CONTROL Program RSDEMO_EASY_SPLITTER_CONTROL

RSDEMO_SPLITTER_CONTROL Program RSDEMO_SPLITTER_CONTROL

Rewards if useful....................

Minal