cancel
Showing results for 
Search instead for 
Did you mean: 

Print immediately without screen dialog

Former Member
0 Kudos

Hello,

I want to print a smartforms immediately without screen dialog.

The spool is created but not sent to the printer.

I call function module with following parameters :

ws_control-device = 'PRINTER'.

ws_control-no_dialog = 'X'.

ws_control-langu = 'F'.

ws_options-tdnoprev = 'X'.

ws_options-tdcovtitle = 'Releve'.

ws_options-tddest = 'LOCL'.

ws_options-tdnewid = 'X'.

ws_options-tdimmed = 'X'.

ws_options-tdcover = 'D'.

ws_options-tdcopies = '001'.

CALL FUNCTION lf_fm_name

EXPORTING

control_parameters = ws_control

output_options = ws_options

user_settings = 'X'

TABLES tbl_em = wt_em

EXCEPTIONS formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

Thanks for your help.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

If usr01-spdb ne 'G'

I modify usr01-spdb before call function to print smartforms

Then, I modify usr01 to set spdb with initial value.

Former Member
0 Kudos

If usr01-spdb not egal 'G'

Former Member
0 Kudos

hi sebastian,

first of all u check for user settings.....in TABLE USR01

  • Selecting user master records from USR01 table

SELECT SINGLE * FROM usr01

INTO ls_usr01

WHERE bname = sy-uname.

ls_outputoptions-tddest = ls_usr01-spld.

IF ls_usr01-spdb = 'H'.

ls_outputoptions-tdimmed = ' '. "Print immediatetly

ELSE.

ls_outputoptions-tdimmed = 'X'.

ENDIF.

and in control parameters use

ls_outputoptions-no_dialog = 'X'.

this will help u out..

please reward in case usefull...

regards,

prashant

Former Member
0 Kudos

hi,

you set this parameter....

<b>Print immediately PRIMM If you mark this field, the system sends the spool request to the Output device immediately after completing it.</b>

(Default values taken from user defaults).

<b>for more information foow this link.............</b>

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba56d35c111d1829f0000e829fbfe/content.htm

regards,

Ashok Reddy

Former Member
0 Kudos

Hi

Yes you can do it programatically.

By writing the

send immediately parameter = 'X'.

u can achieve this.

<b>Reward points</b>

Regards

Former Member
0 Kudos

In which structure you cand find this parameter ?