cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms -> Print Preview

Former Member
0 Kudos

Is there a way for my report program to automatically go to the print preview page upon calling smartforms and bypass the window where you need to input the OutputDevice and choose whether to print or print preview?!

Accepted Solutions (1)

Accepted Solutions (1)

mithun_shetty4
Contributor
0 Kudos

In the CONTROL_PARAMETERS structure fill NO_DIALOG = 'X' and PREVIEW = 'X' in the gererated smartform

Edited by: Mithun Shetty on Mar 3, 2011 1:15 PM

Former Member
0 Kudos

Thanks but I've tried that already. And the window that asks for the device still shows up.

Former Member
0 Kudos

Please try these links

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,

Anju

Former Member
0 Kudos

Hi,

Pass the control parameters and o/P options as :

DATA : dl_cparam TYPE ssfctrlop,

dl_ outop TYPE ssfcompop.

dl_cparam-no_dialog = 'X'.

dl_cparam-preview = 'X'.

dl_cparam-device = 'PRINTER'.

dl_outop-tdnewid = 'X'.

dl_outop-tddest = 'LP01'. " <--- printer

Regards,

Srini.

awin_prabhu
Active Contributor
0 Kudos

It is enough if u fill below fileds of CONTROL_PARAMETERS


DATA : g_r_ctrl_param TYPE ssfctrlop,
g_r_ctrl_param-no_dialog = 'X'.   " To suppress printer dialog box
g_r_ctrl_param-preview = 'X'.    

Also Goto -> SU3 ->Defaults tab -> In OutputDevice field, enter valid printer name -> Save -> Log off and Log in again.

Now check the print.

Former Member
0 Kudos

Hi SAP Fan.

"Also Goto -> SU3 ->Defaults tab -> In OutputDevice field, enter valid printer name -> Save -> Log off and Log in again.

Now check the print."

Haha. Nice one. It's a good idea though but not exactly what I want. ^^ and again only those settings alone does not work.

But together with Anju's:

control-device = 'PRINTER'.

OUTPUT_OPTIONS-TDDEST = 'PRINTER NAME'.

OUTPUT_OPTIONS-TDNOPRINT = 'X'.

which is Srini's suggestion (Thanks Srini)....

Now it works.

Oh and CALL FUNCTION 'SSF_OPEN' is not necessary

and so does:

control-no_open = 'X'.

control-no_close = 'X'.

These two seems prevent print preview from showing.

Thanks all.

Edited by: JayGaRo on Mar 3, 2011 10:26 AM

Answers (0)