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 Printing

Former Member
0 Likes
737

Hi,

While printing an ALV report, it seems the following header comes by default:

Data statistics Number of

Records passed 6 (my ALV has 6 records)

I am using classical ALV, is there any way to turn it off.

Thanks again,

Rajib

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
670

Hi Das,

Here is some hint to hide this.

DATA : LS_PRINT TYPE SLIS_PRINT_ALV.

LS_PRINT-NO_PRINT_SELINFOS = 'X'.

Now pass this structure to your REUSE_ALV_GRID_DISPLAY/REUSE_ALV_LIST_DISPLAY function module for the parameter IS_PRINT = LS_PRINT.

Hope this hint will help you.

Best Regards,

Vijay

4 REPLIES 4
Read only

Former Member
0 Likes
671

Hi Das,

Here is some hint to hide this.

DATA : LS_PRINT TYPE SLIS_PRINT_ALV.

LS_PRINT-NO_PRINT_SELINFOS = 'X'.

Now pass this structure to your REUSE_ALV_GRID_DISPLAY/REUSE_ALV_LIST_DISPLAY function module for the parameter IS_PRINT = LS_PRINT.

Hope this hint will help you.

Best Regards,

Vijay

Read only

0 Likes
670

Vijay,

I tried...but still getting the header displayed.

Rajib

data: gd_prntparams type slis_print_alv.

perform build_print_params.

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = gd_repid

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

i_callback_user_command = 'USER_COMMAND'

  • i_grid_title = outtext

is_layout = gd_layout

it_fieldcat = fieldcatalog[]

  • it_special_groups = gd_tabgroup

it_events = gt_events

is_print = gd_prntparams

i_save = 'X'

  • is_variant = z_template

tables

t_outtab = it_alldata_f

exceptions

program_error = 1

others = 2.

form build_print_params.

gd_prntparams-reserve_lines = '3'. "Lines reserved for footer

gd_prntparams-no_coverpage = 'X'.

gd_prntparams-no_print_selinfos = 'X'.

endform.

Read only

0 Likes
670

Hi Das,

Set the values to the following fields in the LS_PRINT Structure.

ls_print-no_print_selinfos = 'X'.

ls_print-no_print_listinfos = 'X'.

Here is the sample code.

REPORT ztest017.

TYPE-POOLS : slis.

DATA : ls_print TYPE slis_print_alv.

DATA : it_sflight LIKE sflight OCCURS 0 WITH HEADER LINE.

SELECT * FROM sflight INTO TABLE it_sflight.

ls_print-no_print_selinfos = 'X'.

ls_print-no_print_listinfos = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_structure_name = 'SFLIGHT'

is_print = ls_print

TABLES

t_outtab = it_sflight

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Read only

0 Likes
670

Vijaya,

It worked....thanks a LOT.

Rajib