我需要一个功能来发送电子邮件到普通的电子邮件地址,并发送到SAP收件箱。我发现了这个功能:
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_packing_list
contents_txt = it_message
receivers = it_receivers
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.
it_receivers它的填充方式如下:
FREE wa_it_receivers.
wa_it_receivers-receiver = sy-uname. "&----- Assign SAP User Id
wa_it_receivers-rec_type = 'B'. "&-- Send to SAP Inbox
wa_it_receivers-com_type = 'INT'.
wa_it_receivers-notif_del = 'X'.
wa_it_receivers-notif_ndel = 'X'.
APPEND wa_it_receivers TO it_receivers .
这只发送电子邮件到SAP收件箱。我去了rec_type字段的域,看看哪个字母是这样,它可以将电子邮件发送到普通的电子邮件帐户。我相信它是'A'但是,因为它只是说外部地址。那是那个吗?谢谢。
答案 0 :(得分:6)
我不知道为什么人们继续挖掘旧的功能模块。我总是建议使用Business Communication Services API - 它是well documented并且更容易使用。文档还包含how to send to an external mail address上的示例。
答案 1 :(得分:3)
这里有一个很好的例子,说明如何做到wiki.sdn.sap.com