on 01-11-2007 11:28 AM
Hi,
Is there any call function, for accessing output device, without a prompt for printer name? Can we directly execute the smart form without print popup?
Can anyone suggest me in this regard.
Thanks in advance,
Shwetha Korlepara.
when u r calling the Smart for chage these velues for output options
ST_OUTPUT_OPTIONS-TDTITLE = text-011. "Free goods credit notes'
ST_OUTPUT_OPTIONS-TDNEWID = C_X. "create new spool dataset
ST_OUTPUT_OPTIONS-TDCOPIES = C_N_1. "one copy Commented by SM0001
ST_OUTPUT_OPTIONS-TDDEST = P_PRNTR. "name of printer
<b> ST_OUTPUT_OPTIONS-TDNOPREV = SPACE. "no preview</b> ST_OUTPUT_OPTIONS-TDCOVER = SPACE. "no cover page
ST_OUTPUT_OPTIONS-TDDATASET = P_PRNTR. "dataset name
ST_OUTPUT_OPTIONS-TDSUFFIX2 = SPACE. "name of report variant
ST_OUTPUT_OPTIONS-TDIMMED = C_Y. "print immediately? Commented by SM0001
ST_OUTPUT_OPTIONS-TDDELETE = SPACE. "do not delete after print
Please Close this thread.. when u r problem ise solved
Reward if Helpful
Regards
Naresh Reddy K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the CALL FUNCTION of the Smartform Function Module, set the output options parameter to set the printer name.
The output options is of the type SSFCOMPOP which contains the field TDDEST. Set the TDDEST field to your default printer name.
<b>If you want to avoid the popup</b>
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
Sudheer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check my code and reward points by clicking the star on the left of reply,if it helps.
&----
*& Report ZZZ_JAYTEST1 *
&----
REPORT zzz_jaytest1 NO STANDARD PAGE HEADING MESSAGE-ID zhrt.
Variable Declaration
DATA : v_form_name TYPE rs38l_fnam,
itab TYPE STANDARD TABLE OF pa0001,
w_ctrlop TYPE ssfctrlop,
w_compop TYPE ssfcompop,
w_return TYPE ssfcrescl.
SELECT * FROM pa0001 INTO TABLE itab UP TO 5 ROWS.
SORT itab BY pernr.
DELETE ADJACENT DUPLICATES FROM itab COMPARING pernr.
DATA: control TYPE ssfctrlop,
control_parameters TYPE ssfctrlop,
output_options type SSFCOMPOP.
control-preview = 'X'.
control-no_open = 'X'.
control-no_close = 'X'.
control-no_dialog = 'X'.
control-device = 'PRINTER'.
output_options-tddest = 'LOCL'.
OUTPUT_OPTIONS-TDNOPRINT = 'X'.
OUTPUT_OPTIONS-BCS_LANGU = SY-LANGU.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
USER_SETTINGS = ' '
OUTPUT_OPTIONS = output_options
CONTROL_PARAMETERS = control
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.
output_options-tddest = 'LOCL'.
OUTPUT_OPTIONS-TDNOPRINT = 'X'.
OUTPUT_OPTIONS-BCS_LANGU = SY-LANGU.
CALL FUNCTION '/1BCDWB/SF00000066'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = control
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = output_options
USER_SETTINGS = ' '
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = w_return
JOB_OUTPUT_OPTIONS =
TABLES
itab = itab
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.
CALL FUNCTION 'SSF_CLOSE'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
There should be many post regarding this same question. Any way this is how you can do it. Remeber to have a default printer set for the user.
ls_control_param-no_dialog = 'X'.
ls__composer_param-tddelete = 'X'. "Delete spool request after print
ls__composer_param-tdimmed = 'X'. "Print Imediatly
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
output_options = ls_composer_param
user_settings = space
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Regards,
MG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.