on 12-02-2015 5:09 PM
Hi,
I'd like to print directly to whatever printer installed in my computer (for example to pdfcreator).
These are the settings I'm using:
output_options-tdsenddate = '00000000'.
output_options-tdsendtime = '000000'.
output_options-tdarmod = '1'.
output_options-tddataset = 'SMART'.
output_options-tdsuffix1 = ''.
output_options-tdsuffix2 = sy-uname.
output_options-tdcovtitle = ''.
output_options-tddest = 'LOCAL'.
output_options-tdnoprint = 'X'.
output_options-tdprinter = 'SWINCF'.
output_options-rqposname = 'PDFCreator'.
control_parameters-no_dialog = 'X'.
output_options-tdnewid = 'X'.
output_options-tdimmed = 'X'.
output_options-tddelete = 'X'.
output_options-tdgroup = 'X'.
output_options-tdlifetime = 20.
output_options-tdfinal = 'X'.
CALL FUNCTION fm_name
EXPORTING
control_parameters = control_parameters
output_options = output_options
...........
however the dialog window is showed
Can anybody help me?
Thanks in advance.
Regards.
Use LOCL instead of LOCAL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
Tddest is wrong.
Have a look at transaction SPAD and see what the 4character name of your printer LOCAL is, pass it to the parameter and everything should be fine.
Krishna already bolded the no_dialog variable is also important, but the fallback does show the dialog if something other (most of the times the destination) does not exist or in other words something is wrong.
~Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
Everything looks good ....
Just for an example, I am pasting Piece of code, please go through it and check highlighted parameters..
Kindly let me know if you still see any issues.
DATA: print_parameter_set LIKE pri_params,
valid, list_text LIKE print_parameter_set-prtxt.
*
START-OF-SELECTION.
*
*CALL FUNCTION 'GET_PRINT_PARAMETERS'
*EXPORTING
*destination = '2571'
*immediately = 'X'
*release = ''
*receiver = sy-uname
*list_text = list_text
*IMPORTING
*out_parameters = print_parameter_set
*valid = valid.
*IF valid = 'X'.
*NEW-PAGE PRINT ON PARAMETERS print_parameter_set NO DIALOG.
DATA print type SSFCOMPOP.
data control_parameters TYPE SSFCTRLOP.
control_parameters-device = 'PRINTER'.
control_parameters-no_dialog = 'X'.
control_parameters-preview = ' '.
*control_parameters-no_open = 'X'.
*control_parameters-no_close = 'X'.
print-tddest = 'LP01'.>>>>>>>>give ur printer name here...
print-TDIMMED = 'X'.
print-tdnoprev = ' '.
*CALL FUNCTION 'SSF_OPEN'
*EXPORTING
*output_options = print
*control_parameters = control_parameters
*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.
CALL FUNCTION '/1BCDWB/SF00000053'
EXPORTING
CONTROL_PARAMETERS = control_parameters
OUTPUT_OPTIONS = print USER_SETTINGS = ' '
.IF sy-subrc <> 0.
ENDIF.
Best Regards,
KC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.