Hallo Zusammen
Ich habe jetz folgendes gemacht. Nach dem Druck des Formulares kriege ich die OTF-Tabelle vom FB CLOSE_FORM zurück.
Anschliessend konvertiere ich diese OTF-Tabelle mit dem FB CONVERT_OTF ins PDF format, dann noch mit dem FB QCE1_CONVERT die Zeilenlänge ändern und dann das genze mit dem FB SO_NEW_DOCUMENT_ATT_SEND_API1 verschicken.
Also momentan sieht der Code so aus:
call function 'CLOSE_FORM'
tables
otfdata = t_itcoo
exceptions
others = 1.
call function 'CONVERT_OTF'
exporting
format = 'PDF'
importing
bin_filesize = doc_size
tables
otf = t_itcoo
lines = test_tline
exceptions
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
call function 'QCE1_CONVERT'
tables
t_source_tab = test_tline
t_target_tab = objbin
exceptions
convert_not_possible = 1
others = 2.
clear: objtxt.
append objtxt.
objtxt = 'Bitte öffnen Sie angehängtes Formular.'.
append objtxt.
clear: objtxt.
append objtxt.
clear: objtxt.
objtxt = 'Hinweis: dieses Mail ist Virenfrei.'.
append objtxt.
refresh doc_chng.
clear doc_chng.
doc_chng-obj_name = 'EMAIL TEST'.
doc_chng-obj_descr = 'TEST EMAIL'.
describe table objtxt lines tab_lines.
read table objtxt index tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ) .
append doc_chng.
clear: objpack-transf_bin, objpack.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
append objpack.
refresh reclist.
clear reclist.
reclist-receiver = '
kpas@sfsservices.biz'.
move 'U' to reclist-rec_type.
append reclist.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
destination 'P01_100'
exporting
document_data = doc_chng
* put_in_outbox = 'X'
tables
packing_list = objpack
object_header = objhead
contents_bin = T_ITCOO
contents_txt = objtxt
receivers = reclist
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 99.
..So wunderbar, jetz mein Problem..ich bekomme das Email, mein Text den ich oben reingeschrieben habe erscheint auch, jedoch kein Anhang? Habe ein bisschen Problem mit dem Doc-Typ..was muss ich da genau dem FB 'SO_NEW_DOCUMENT_ATT_SEND_API1' mitgeben?
Danke für die Hilfe..
Pascal