Skip to Content
0
Feb 06, 2012 at 03:36 PM

Printing Smartform using IN BACKGROUD TASK

104 Views

Hello

I am having trouble printing a Smartfrom in BACKGROUND. When I remove IN BACKGROUND TASK printing works fine. Below is my code.

CALL FUNCTION 'ZPP_PRINT_ZLINK_TAG'

IN BACKGROUND TASK

EXPORTING

p_matnr = gs_s0100-matnr

TABLES

pt_zlink = gt_zlink.

I checked the following trans but nothing related to my job : SP01, SP02, SM50 & SM37

Below are the parms which are used in FM 'ZPP_PRINT_ZLINK_TAG' in calling the smartform:

*Parameters for CALL FUNCTION fm_name

CLEAR gs_control_param.

gs_control_param-no_dialog = 'X'.

gs_control_param-device = 'PRINTER'.

gs_control_param-langu = 'E'.

CLEAR gs_output.

gs_output-tddest = 'CORU'.

gs_output-tdimmed = 'X'.

gs_output-tddelete = 'X'.

CALL FUNCTION fm_name

EXPORTING

control_parameters = gs_control_param

output_options = gs_output

user_settings = space

zstr_zlinktag = zstr_zlinktag

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

Thanks

Gary