cancel
Showing results for 
Search instead for 
Did you mean: 

cl_bcs delete recipients

Former Member
0 Kudos

Dear all

I need to resend the same e-mail to a differnt user, once the first is sent.

So I do following:

send_request = cl_bcs=>create_persistent( ).

  • ---------- add recipient (e-mail address) ----------------------

recipient = cl_cam_address_bcs=>create_internet_address(

i_address_string = 'myemail' ).

send_request->add_recipient( i_recipient = recipient ).

  • ---------- send document ---------------------------------------

sent_to_all = send_request->send( i_with_error_screen = 'X' ).

How can I now take the same e-mail and send it to another address? How Can I delete the recipient I set before?

thank you

Accepted Solutions (1)

Accepted Solutions (1)

chaiphon
Contributor
0 Kudos

try CALL METHOD send_request->send_request->remove_recipients. to delete the recipients

Former Member
0 Kudos

Hi

this method does not exist. Any other idea?

Herbert

chaiphon
Contributor
0 Kudos

Hi,

What SAP version are you in?

Do you have public attribure SEND_REQUEST in class CL_BCS?

If yes and the type of attribute SEND_REQUEST is CL_SEND_REQUEST_BCS, Check the method available in the class. There should be something useful there.

If nothing is useful, why not send the mail to mutiple people at the same time or loop, free object, populate the body again for each recipient.

Regards,

Chaiphon

Former Member
0 Kudos

Hi,

we are using ECC 6.0. Can't find something really usefull.

former_member182670
Contributor
0 Kudos

Hi,

You can call FORWARD( ) method. It creates a copy of the request with empty recipients list.

send_request = send_request->forward( ).
    recipient = cl_cam_address_bcs=>create_internet_address( i_address_string = 'other@e-mail' ).
    send_request->add_recipient( i_recipient = recipient ).
    sent_to_all = send_request->send( i_with_error_screen = 'X' ).

Former Member
0 Kudos

Excellent, this works fine.

thank you

Answers (0)