Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

mail problem

Former Member
0 Likes
263

Dear Techies,

I am writing this code in a FM, which is called by different SAP users. but the mail has to be trigger for which the sender is the admin of the system with user id ' optima-admn'.


 TRY.
            l_sender = cl_sapuser_bcs=>create('OPTIMA-ADMN').
          CATCH cx_address_bcs.
        ENDTRY.

*  Trigger E-Mail immediately
        l_send_request->set_send_immediately( 'X' ).

* Send mail
        CALL METHOD l_send_request->send( ).

Instead, the mail is getting triggered with the name of the system user.

I want the sender as OPTIMA-ADMN. please help.

Regards,

Imran.

1 ACCEPTED SOLUTION
Read only

jaideepsharma
Active Contributor
0 Likes
222

Hi,

Try using method SET_SENDER of class CL_BCS before sending the mail.

KR Jaideep,

1 REPLY 1
Read only

jaideepsharma
Active Contributor
0 Likes
223

Hi,

Try using method SET_SENDER of class CL_BCS before sending the mail.

KR Jaideep,