on 11-30-2011 9:49 AM
Hi gurus,
I'm sending a smartform by fax in a company that has never used smartforms before (using ECC6). The output goes to sost but upon releasing it it fails with the error messages "No delivery to FAX" and "Document Conversion failed". On checking with our basis team it appears that the format of the file sent is not right and fails at the point of sending. Existing sapscripts and standard output types are faxed correctly. Both emailed and printed versions of the output are working correctly.
The smartform is called from a custom output type on the purchase order. I've checked OSS and apart from an older note nothing seems to exist there. This is the code I am using to send it. I have been searching for a solution to this without any success for some time. What am I doing wrong here?
If this is a fax output
IF nast-nacha = 2.
ls_cont_par-device = 'TELEFAX'.
ls_cont_par-no_dialog = 'X'.
ls_cont_par-getotf = 'X'.
ls_cont_par-no_open = ' '.
ls_cont_par-no_close = ' '.
ls_cont_par-langu = 'E'.
ls_cont_par-preview = ' '.
ls_options-tdtitle = gv_con_subject.
ls_options-tdteleland = nast-tland.
ls_options-tdtelenum = nast-telfx.
ls_options-tdtelenume = nast-telfx.
ls_options-tdschedule = 'IMM'.
ls_options-tdsenddate = sy-datum.
ls_options-tdsendtime = sy-timlo.
ls_options-faxformat = 'PDF'.
ls_options-tdnoprev = 'X'.
Call the smartform output
CALL FUNCTION lv_function_call
EXPORTING
control_parameters = ls_cont_par
output_options = ls_options
user_settings = ''
i_language = sy-langu
i_values = gs_values
IMPORTING
job_output_info = ls_job
TABLES
it_po_items = gt_po_items
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.
lt_otf_data[] = ls_job-otfdata[].
ls_faxoptions-tdotftype = 'ASC'.
ls_faxoptions-faxformat = 'ASC'.
ls_faxoptions-tddevice = 'TELEFAX'.
ls_faxoptions-tdteleland = nast-tland.
ls_faxoptions-tdtelenum = nast-telfx.
ls_faxoptions-tdsenddate = sy-datum.
ls_faxoptions-tdsendtime = sy-uzeit.
ls_faxoptions-tdcover = ' '.
ls_faxoptions-tdtitle = nast-objky.
ls_faxoptions-tdcopies = 1.
ls_faxoptions-tdnewid = 'X'.
ls_faxoptions-tddataset = 'ZP01 PO Output'.
ls_faxoptions-tdsuffix1 = 'FAX'.
ls_faxoptions-tdsuffix2 = sy-uname.
ls_faxoptions-tdimmed = 'X'.
ls_faxoptions-tdlifetime = 8.
ls_faxoptions-tdcover = 'ZP01'.
ls_faxoptions-tdcovtitle = 'ZP01'.
ls_faxoptions-tdfaxuser = sy-uname.
CALL FUNCTION 'CONVERT_OTF_AND_FAX'
EXPORTING
faxoptions = ls_faxoptions
user = ls_faxoptions-tdfaxuser
IMPORTING
fax_ok = ok
office_objid = off_obj
msgno = msgno
msgid = msgid
msgv1 = msgv1
msgv2 = msgv2
msgv3 = msgv3
msgv4 = msgv4
TABLES
otf = lt_otf_data.
IF ok = 'X'.
MESSAGE s459(td) WITH off_obj-objno. "fax request was succ. created AS
ELSE.l
MESSAGE ID msgid TYPE 'E' NUMBER msgno
WITH msgv1 msgv2 msgv3 msgv4
RAISING send_error.
ENDIF.
ENDIF.
Hi Aidan, thanks for replying.
As far as I'm aware the OTF format should be correct. Is there a way of double checking it?
Alan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if you check via the debugger, are the parameters lt_otf_data and ls_job-otfdata[ ] filled with valid OTF data before the call to function 'CONVERT_OTF_AND_FAX'?
regards,
Aidan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.