Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Mails for Distribution List in SAP abap

Hi Experts,

I have used below sort of code in User Exit...but Mail is not triggering in SOST for DL List created ....

Can suggest idea for the same

1. Code Used

Is there any other stuff i need to achieve it ...

            TRY.

*     -------- create persistent send request ------------------------
            w_send_request = cl_bcs=>create_persistent( ).

* Creating Document
            w_document = cl_document_bcs=>create_document(
            i_type = 'RAW'
            i_text = t_content[]
            i_subject = c_obj_desc ).

* Setting the Document
            CALL METHOD w_send_request->set_document( w_document ).

            w_sender = cl_sapuser_bcs=>create( sy-uname ).
            CALL METHOD w_send_request->set_sender
              EXPORTING
                i_sender = w_sender.
* Trigger the List avail in DL List
            w_recipient = cl_distributionlist_bcs=>getu_persistent(
               i_dliname = c_receiver
               i_private = space ).

* Add the Recipient
            CALL METHOD w_send_request->add_recipient
              EXPORTING
                i_recipient = w_recipient
                i_express   = c_x
                i_copy       = 'X'
                i_blind_copy = ' '
                i_no_forward = ' '.

            CALL METHOD w_send_request->send(
              EXPORTING
                i_with_error_screen = c_x
              RECEIVING
                result              = w_sent_to_all ).

Regards,

Karthik S

Former Member
Not what you were looking for? View more on this topic or Ask a question