Application Development and Automation 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: 
Read only

ALV - header handling

Former Member
0 Likes
372

Hi All,

I need to set the header part of an ALV report

I have used the following function modules to fill two lines of my report.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' (line type 1)

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' (line type 2)

CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'

but I don't find space on the top of my ALV report for setting some values as input parameters, for example.

In other words I wish to obtain the layout that I find by executing this function module

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'

EXPORTING

i_callback_program = gv_repid

i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM

i_callback_user_command = 'USER_COMMAND'

i_callback_pf_status_set = gc_status

is_layout_lvc = gw_layo

it_fieldcat_lvc = gw_fkat

i_grid_settings = lw_grid_settings

i_save = 'A'

is_variant = variant

it_events = gt_events

TABLES

t_outtab = gt_report

EXCEPTIONS

program_error = 1

OTHERS = 2.

Any help will be well appreciated.

Thanks in advance.

Luigi

Hi All,

I need to set the header part of an ALV report

I have used the following function modules to fill two lines of my report.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' (line type 1)

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' (line type 2)

CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'

but I don't find space on the top of my ALV report for setting some values as input parameters, for example.

In other words I wish to obtain the layout that I find by executing this function module

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'

EXPORTING

i_callback_program = gv_repid

i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM

i_callback_user_command = 'USER_COMMAND'

i_callback_pf_status_set = gc_status

is_layout_lvc = gw_layo

it_fieldcat_lvc = gw_fkat

i_grid_settings = lw_grid_settings

i_save = 'A'

is_variant = variant

it_events = gt_events

TABLES

t_outtab = gt_report

EXCEPTIONS

program_error = 1

OTHERS = 2.

Any help will be well appreciated.

Thanks in advance.

Luigi

1 REPLY 1
Read only

Former Member
0 Likes
336

Hi,

1) Declare the below line in program.

gt_list_top_of_page type slis_t_listheader,

2) for example : Assign like below.

form comment_build changing gt_top_of_page type slis_t_listheader.

data: gs_line type slis_listheader.

clear gs_line.

gs_line-typ = 'H'.

gs_line-info = 'IPM Report'.

append gs_line to gt_top_of_page.

*do 3 times.

  • gs_line-typ = 'S'.

  • gs_line-info = ' '.

  • gs_line-key = ' '.

  • append gs_line to gt_top_of_page.

*enddo.

concatenate sy-datum6(2) '/' sy-datum4(2) '/' sy-datum+0(4)

into rundt.

clear gs_line.

gs_line-typ = 'S'.

gs_line-key = 'Run Date: '.

gs_line-info = rundt.

append gs_line to gt_top_of_page.

endform. "COMMENT_BUILD

3) Call the above form prior to the below

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'

Regards

Nehruu