Skip to Content
0
Jan 30, 2008 at 12:04 PM

CL_SALV_PRINT to send to spool

678 Views

Hi all,

I am trying to send the content of a cl_salv_table to the spool. But the print dialog kept appearing, event though i set it as no dialog. Am i missing anything?

Here is my code...

lo_print = gt_table->GET_PRINT( ).

*/ get print parameters

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

no_dialog = 'X'

IMPORTING

valid = gw_valid

out_parameters = gw_pparams

EXCEPTIONS

archive_info_not_found = 1

invalid_print_params = 2

invalid_archive_params = 3

OTHERS = 4.

CONCATENATE 'test' sy-datum sy-uzeit INTO gw_pparams-prtxt SEPARATED BY space.

lw_print_ctrl = lo_print->get_print_control( ).

lw_print_ctrl-PRI_PARAMS = gw_pparams.

lo_print->set_print_control( lw_print_ctrl ).

*

lo_print->set_print_only( if_salv_c_bool_sap=>true ).

  • display the table

gt_table->display( ).