on 03-03-2011 7:35 AM
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?!
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.