Skip to Content
avatar image
Former Member

CL_BCS - How to send e-mail to several recipients, based on VKORG?

Hello,

I am using CL_BCS to send an e-mail with an Excel attachment, BUT I don't know how to implement that the e-mail is sent to a distribution list based on the VKORG.

I have a table ZRECIPIENTS with fields VKORG and AD_SMTPADR. The recipients should be added to the e-mail from this ZRECIPIENTS table.

Please give me an example on how to do that...

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 31, 2016 at 12:38 PM

    Fill an internal table with a simple SELECT statement, then loop in the internal table and build/add receiver with methods

    lo_recipient = cl_cam_address_bcs=>create_internet_address( i_address_string = lv_smtpadr ).
    lo_bcs->add_recipient( i_recipient = lo_recipient ).

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded