cancel
Showing results for 
Search instead for 
Did you mean: 

smartform output to printer

Former Member
0 Kudos

Hi Guys,

I like to send the smartform output to printer.

I am getting the output in otf format and converting it into pdf format.

I like to send this pdf into printer. any FM.. ?

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

solved

Former Member
0 Kudos

Hi,

Refer below code its useful for you

In the SSF_OPEN function module,

Set the OUTPUT OPTIONS paramter TDDEST to your printer name.

Set the CONTROL PARAMETERS and control parameters as shown below,

control-preview = 'X'.

control-no_open = 'X'.

control-no_close = 'X'.

control-no_dialog = 'X'.

control-device = 'PRINTER'.

control_parameters-no_dialog = 'X'.

control_parameters-no_open = 'X'.

control_parameters-no_close = 'X'.

OUTPUT_OPTIONS-TDDEST = 'PRINTER NAME'.

OUTPUT_OPTIONS-TDNOPRINT = 'X'.

CALL FUNCTION 'SSF_OPEN'

EXPORTING

output_options = output_options

control_parameters = control

user_settings = ' '

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc <> 0.

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

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

ENDIF.

Regards,

Madhu

former_member195383
Active Contributor
0 Kudos

Just calling the smartform will send the o/p to printer.

wa_control_parameters-no_dialog = 'X'.

wa_control_parameters-getotf = 'X'.

the above should be the control_parameters setting that is to be passed to smartform.

no separate fm is needed to invoke the printer.

Former Member
0 Kudos

Hi,

Thanks for the reply.

I am calling the smartform in background, in this case, does the smartform queued in spool to view.

Does it print in default printer, when I use the following control parameter.

wa_control_parameters-no_dialog = 'X'.

wa_control_parameters-getotf = 'X'.

Thanks

former_member195383
Active Contributor
0 Kudos

In this case(Background call) smartform o/p will not be sent to printer .

You have to send it to application server , using open dataset technique.

Then you can download the same to presentation server and fire print, as per your requirement.

Please get back incase of any further doubts