Reputation: 55
Currently, this is my code which sends on email to one user only even if there are multiple users selected. I want to modify it so one email should be received by multiple users.
"This is for setting the recipient
lo_sender = cl_sapuser_bcs=>create( s_inbox-low ).
lo_send_request->add_recipient( lo_sender ).
"This is for sending email with attachment
l_cl_sent_to_all = lo_send_request->send(
i_with_error_screen = 'X' ).
I want to send one email to multiple users. However, In the field Inbox, the program is only selecting the first user in this range.
In this case, only the intern is receiving the email. Is it possible for all the users to receive the email using this code?
lo_sender = cl_sapuser_bcs=>create( s_inbox-low )
?
Quite not sure how to use this and was receiving an error code that the recipients are unknown
* LOOP AT recipients.
* lo_send_request->add_recipient( s_inbox ).
* ENDLOOP.
Upvotes: 0
Views: 368
Reputation: 55
This has been resolved by putting the recipients into a LOOP. s_inbox is where the structure of the recipient is stored.
LOOP AT s_inbox[] ASSIGNING FIELD-SYMBOL(<s_inbox>).
lo_sender = cl_sapuser_bcs=>create( <s_inbox>-low ).
lo_send_request->add_recipient( lo_sender ).
ENDLOOP.
Upvotes: 1