Application Development 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: 

Setting reply-to address in FM SO_NEW_DOCUMENT_SEND_API1

fernando_pena
Participant
0 Kudos

Hi Experts.

I need your help.

I'm using FM SO_NEW_DOCUMENT_SEND_API1 to send emails to an external email address from SAP. The functionality works well but I now need to be able to set the reply-to address for the email.

Currently the reply-to email address defaults to the userid who is running the "homegrown" ABAP programme.The requirement is now to change that address such that userid A runs the programme to send an email to userid B but any replies should be sent to userid C.

I have not seen any fields in the tables used by the FM where I can set this.

Is it possible to set the reply-to address??? Or have another FM for that?

Thanks in advance!

Fernando Pena.

5 REPLIES 5

brad_bohn
Active Contributor
0 Kudos

What version are you running? Use CL_BCS instead and set the reply-to address directly if you can. This has been discussed; you may want to search the forum.

fernando_pena
Participant
0 Kudos

Hello,

I'm using 4,7 version.

I look at forum, and I found a same question, but without answer.

I'm trying to use CL_BCS instead, but it doesn't work.

Could you please send some example unsing SET_REPLY_TO method?

Thanks for your attention.

Fernando Pena.

0 Kudos

Hi,

After user cl_bcs you need to explicitly use COMMIT WORK.

Regards

0 Kudos

      DATA: lr_reply_to TYPE REF TO if_recipient_bcs.

      lr_reply_to ?= cl_cam_address_bcs=>create_internet_address( 'em address' ).

      CALL METHOD lr_send_request->set_reply_to
        EXPORTING
          i_reply_to = lr_reply_to.

fernando_pena
Participant
0 Kudos

Thanks for your help.