我需要一个功能来向普通电子邮件地址发送电子邮件并发送到 SAP Inbox。我发现了这个功能:
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'但是,因为它只说外部地址。是那个吗?谢谢你。