cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform printing

Former Member
0 Kudos

Hi Experts,

In my smart form print program I have designed selection screen with two inputs. One is sales order number and another one is printer name. My requirement is by default I need to show system setting printer name on the selection screen printer field. Suppose if I change that printer name for example system default printer is ‘ABC’ if I change it to ‘DEF’ on the selection screen and if I press execute button I need to print smart form layout in the specified printer here ‘DEF’ (I don’t want any pop up directly I want to print once if I press execute button on the selection screen) Please tell me what data and which parameters I need to pass to smart form function module and if possible please send me the code for this.

Please help me I will give the points.

Thanks a lot.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Babji,

use TABLE USR01 and in BNAME enter sy-uname.

pass field USR01-SPLD to selction screen ...

hope this may help u...

please reward,

Regards,

prashant

former_member196280
Active Contributor
0 Kudos

GO through this rough example,

data: control_param type ssfctrlop.

PARAMETER : PRINTER(25).

control_param-no_dialog = 'X'.

control_param-preview = ''.

control_param-getotf = 'X'.

IF NOT printer INITIAL

output_opt-tddest = PRINTER.

ELSE.

output_opt-tddest = 'LOCL'.

ENDIF.

output_opt-tdimmed = ''.

output_opt-tdnewid = ''.

output_opt-tdnoprint = ''.

output_opt-tdnoprev = 'X'.

call function fm_name

EXPORTING

control_parameters = control_param

output_options = output_opt

user_settings = ' '

IMPORTING

job_output_info = job_info

TABLES

int_detail = int_detail

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

others = 5.

Regards,

SaiRam