on 03-26-2015 12:23 PM
Hello,
I need to print production papers using adobe forms.
Unfortunatelly after saving a production order i get the print dialog window.
Is it possible to print immidiatly to the standard windows printer withtout to select it amnually?
Which setting are possible in "fill_outputparams" for SFPOUTPUTPARAMS?
Thanks in advance,
Evgenij
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
You will have to read the current Print parameters using FM CALL FUNCTION 'GET_PRINT_PARAMETERS' and pass it to structure sfpoutputparams
Try to set the printer to LOCL .
gs_fpoutparams-dest = 'LOCL'.
DATA: ls_options TYPE itcpo.
DATA: lv_dialog TYPE c.
DATA: ls_pri_params TYPE pri_params.
* gs_fpoutparams TYPE sfpoutputparams.
lv_dialog = 'X'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
no_dialog = 'X'
mode = 'CURRENT'
IMPORTING
out_parameters = ls_pri_params.
ls_options-tdcopies = ls_pri_params-prcop.
ls_options-tddest = ls_pri_params-pdest.
ls_options-tdnewid = ls_pri_params-prnew.
ls_options-tdimmed = ls_pri_params-primm.
ls_options-tddelete = ls_pri_params-prrel.
ls_options-tdlifetime = ls_pri_params-pexpi.
ls_options-tdtitle = ls_pri_params-prtxt.
ls_options-tdcover = ls_pri_params-prsap.
ls_options-tdcovtitle = ls_pri_params-prtxt.
ls_options-tdreceiver = ls_pri_params-prrec.
ls_options-tddivision = ls_pri_params-prabt.
ls_options-tdautority = ls_pri_params-prber.
gs_fpoutparams-device = ls_options-tdprinter.
gs_fpoutparams-preview = ls_options-tdpreview.
gs_fpoutparams-dest = ls_options-tddest.
gs_fpoutparams-reqnew = ls_options-tdnewid.
gs_fpoutparams-reqimm = ls_options-tdimmed.
gs_fpoutparams-reqdel = ls_options-tddelete.
gs_fpoutparams-reqfinal = ls_options-tdfinal.
gs_fpoutparams-senddate = ls_options-tdsenddate.
gs_fpoutparams-sendtime = ls_options-tdsendtime.
gs_fpoutparams-schedule = ls_options-tdschedule.
gs_fpoutparams-copies = ls_options-tdcopies.
gs_fpoutparams-dataset = ls_options-tddataset.
gs_fpoutparams-suffix1 = ls_options-tdsuffix1.
gs_fpoutparams-suffix2 = ls_options-tdsuffix2.
gs_fpoutparams-covtitle = ls_options-tdcovtitle.
gs_fpoutparams-cover = ls_options-tdcover.
gs_fpoutparams-receiver = ls_options-tdreceiver.
gs_fpoutparams-division = ls_options-tddivision.
gs_fpoutparams-lifetime = ls_options-tdlifetime.
gs_fpoutparams-authority = ls_options-tdautority.
gs_fpoutparams-rqposname = ls_options-rqposname.
gs_fpoutparams-arcmode = ls_options-tdarmod.
gs_fpoutparams-noarmch = ls_options-tdnoarmch.
gs_fpoutparams-title = ls_options-tdtitle.
gs_fpoutparams-nopreview = ls_options-tdnoprev.
* gs_fpoutparams-noprint = ls_options-tdnoprint.
gs_fpoutparams-nodialog = 'X'.
gs_fpoutparams-noprint = ' '.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = gs_fpoutparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 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
Sandy
Hi
Set the parameters
fp_outputparams--device = 'PRINTER'.
fp_outputparams-connection = 'ADS'.
fp_outputparams-nodialog = abap_false.
fp_outputparams-nopreview = abap_true.
fp_outputparams-reqnew = abap_true. "New spool request
fp_outputparams-reqimm = abap_true. "Print immediately
fp_outputparams-dest = 'LOCL'.
Also try to use FM CALL FUNCTION 'FTR_CORR_CHECK_DEFAULT_PRINTER' to get the default Printer for the SY-UNAME..
Check with the BASIS team if they can change any of the SPAD settings for the printer .
Surya
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.