Skip to Content
0
Former Member
Feb 04, 2009 at 01:36 PM

Reg: Adding distribution lists for sending mails using BCS class only

37 Views

Hi Gurus,

I have an requirement where in to send mails to the distribution lists maintained in R/3.

Could you give solutions for this using BCS class only as i have stopped using FMs.

The code i used is attached below, but its not triggering mails.

try.

a_dli = cl_distributionlist_bcs=>getu_persistent(

i_dliname = dli_rec

i_private = dli_pri ).

catch cx_bcs into bcs_exception.

error_handling 'cl_distributionlist_bcs=>getu_persistent'

bcs_exception->error_type.

endtry.

recipient = a_dli.

try.

CALL METHOD send_request->add_recipient(

i_recipient = recipient

i_express = ' '

i_copy = 'X' ).

catch cx_bcs into bcs_exception.

error_handling 'send_request->add_recipient'

bcs_exception->error_type.

endtry.