Posted: Fri Nov 07, 2008 3:58 pm Post subject: Не отправляется письмо с аттачем
Коллеги, можете посмотреть, почему не отправляется письмо, если добавлен attachment? Ошибок не выдает.
Если закомментировать прикрепление файла, письмо приходит.
Code:
DEFINE __repl.
if objtxt cs &1.
len = strlen( &2 ).
if len > 0.
replace &1 with &2(len) into objtxt.
else.
replace &1 with space into objtxt.
endif.
endif.
END-OF-DEFINITION."__REPL
DATA: lt_lines LIKE tline OCCURS 0,
ls_lines LIKE tline.
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA:
listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
DATA:
tab_lines TYPE i,
doc_size TYPE i,
len TYPE i,
l_fax_found TYPE i.
DATA: s_file TYPE string,
l_file TYPE rlgrap-filename,
l_filename TYPE rlgrap-filename.
DATA: l_objid TYPE wwwdata-objid.
REFRESH lt_lines.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'ST'
language = 'EN'
name = 'ZERU_TEXTS'
object = 'TEXT'
TABLES
lines = lt_lines
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc IS INITIAL.
* Title and Description
docdata-obj_name = 'EMAIL'.
docdata-obj_descr = 'Reconciliation Statement'.
* Create Message Body
LOOP AT lt_lines INTO ls_lines WHERE tdformat = '*'
OR tdformat = ''.
objtxt = ls_lines-tdline.
__repl '=ContactPersonEng' g_contact_per_e.
__repl '=ContactPersonRus' g_contact_per_r.
__repl '=ContactEmail' g_contact_email.
IF objtxt CS '=ContactFax'.
CASE l_fax_found.
WHEN 0.
__repl '=ContactFax' g_contact_fax1.
WHEN 1.
__repl '=ContactFax' g_contact_fax2.
ENDCASE.
l_fax_found = l_fax_found + 1.
ENDIF.
APPEND objtxt.
ENDLOOP.
* Write Packing List (Main)
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.