I'm trying to send emails via cl_bcs. It's working great, when I define the receivers on my own with:
recipient = cl_cam_address_bcs=>create_internet_address( 'firstname.lastname@example.org' ). CALL METHOD send_request->add_recipient EXPORTING i_recipient = recipient i_express = 'X'.
But when I'm using a list of email addresses from an internal table, I get the error "it_receivers-email is not type compatible to formal parameter i_address_string" (translated from german error text). it_receivers-email is declared as string. Why isn't this working?
loop at it_receivers. recipient = cl_cam_address_bcs=>create_internet_address( it_receivers-email ). ... endloop.