SAP 发送邮件
SAP发送邮箱功能测试有效
report z_test3. data: maildata like sodocchgi1. data: mailtxt like solisti1 occurs 10 with header line. data: mailrec like somlrec90 occurs 0 with header line. " 收件人结构清单 mailtxt = '<table width="335" height="83" border="1">'. append mailtxt. mailtxt = '<tr><th>列1</th>'. append mailtxt. mailtxt = '<th>列2</th>'. append mailtxt. mailtxt = '<th>列3</th>'. append mailtxt. mailtxt = '<th>列4</th>'. append mailtxt. mailtxt = '<th>列5</th>'. append mailtxt. CONCATENATE '<tr><th>' '数据1' '</th>' INTO mailtxt. APPEND mailtxt. CONCATENATE '<th>' '数据2' '</th>' INTO mailtxt. APPEND mailtxt. CONCATENATE '<th>' '数据3' '</th>' INTO mailtxt. APPEND mailtxt. CONCATENATE '<th>' '数据4' '</th>' INTO mailtxt. APPEND mailtxt. CONCATENATE '<th>' '数据5' '</th>' INTO mailtxt. APPEND mailtxt. mailtxt = '</tr></table>'. concatenate '(' sy-mandt '下测试)交货单已创建24小时仍未交货清单' into maildata-obj_descr. mailrec-rec_type = 'U'. mailrec-receiver = '邮箱地址@vs-ig.com'. append mailrec. call function 'SO_NEW_DOCUMENT_SEND_API1' exporting document_data = maildata document_type = 'HTM' put_in_outbox = '' commit_work = 'X' tables object_header = mailtxt object_content = mailtxt receivers = mailrec 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 = 8.
最爱江南烟雨如画:浩浩宇宙,朗朗乾坤,花花世界,滚滚红尘