向 SAP 收件箱和普通电子邮件收件箱发送电子邮件 [英] Sending email to a SAP inbox and an ordinary email inbox

查看:32
本文介绍了向 SAP 收件箱和普通电子邮件收件箱发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个功能来向普通电子邮件地址发送电子邮件,也可以向 SAP 收件箱发送电子邮件.我找到了这个功能:

I needed a function to send an email to an ordinary email address and to send on too to an SAP Inbox. I found this function:

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 是这样填充的:

The it_receivers it's filled like this:

 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' 但是,因为它只说外部地址.是那个吗?谢谢.

This only send's the email to the SAP inbox. I went to the domain of the rec_type field to see which letter is so it can send the email to an ordinary email account. I believe it is 'A' but, as it only says external address. Is that the one? Thank you.

推荐答案

这里有一个很好的例子来说明如何做到这一点 wiki.sdn.sap.com

Here you have a nice example of how to do it wiki.sdn.sap.com

这篇关于向 SAP 收件箱和普通电子邮件收件箱发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆