Skip to Content
0
Former Member
Feb 19, 2009 at 08:37 AM

how many ways to make a alv grid?

385 Views

so I found a lot of ways to make a alv grid .I donl't know the different , so pls help me .

1.

i_list_comments type slis_t_listheader,

w_list_comments like line of i_list_comments,

w_list_comments-typ = 'H'.

w_list_comments-key = ''.

w_list_comments-info = 'report title'.

append w_list_comments to i_list_comments.

clear w_list_comments.

data: data_temp(16).

write sy-datum to: data_temp mm/dd/yyyy.

concatenate 'data: ' data_temp into data_temp.

concatenate data_temp ' ' into data_temp.

w_list_comments-typ = 'S'.

w_list_comments-key = ''.

w_list_comments-info = data_temp.

append w_list_comments to i_list_comments.

clear w_list_comments.

call function 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = i_list_comments

I_LOGO = 'ENJOYSAP_LOGO'

i_end_of_list_grid = 'X'.

  • i_logo = 'ENJOYSAP_LOGO'.

2.

DATA :gt_events TYPE slis_t_event .

DATA: lr_content TYPE REF TO cl_salv_form_element.

PERFORM create_alv_form_content_top CHANGING lr_content.

cl_salv_form_content=>set( lr_content ).

DATA: lr_grid TYPE REF TO cl_salv_form_layout_grid,

lr_flow TYPE REF TO cl_salv_form_layout_flow,

l_text(500) TYPE c.

*... create a grid

CREATE OBJECT lr_grid.

lr_flow = lr_grid->create_flow(

row = 1

column = 1 ).

l_text = 'name:'.

*create text in cell

lr_flow->create_text( text = l_text ).

lr_flow = lr_grid->create_flow(

row = 1

column = 2 ).

l_text = 'zhangchao' .

lr_flow->create_text( text = l_text ).

cr_content = lr_grid.

3 there is a html_top_of_page

so which I could use normal ? and could you give me some

document about alv grid ?

thank you .!