Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8581

Re: Changing sender on sent email via SAP

$
0
0

What you have to do is to add this code in Send_email method  in this class ZCL_CRM_ELEC_SERVICES basically this class is implemetation class of BADI CRM_ELEC_SERVICES , and pass your desired sender address either emailaddress or username.If you want to pass email address then  sender_address_type  = 'INT'

other 'B' .


ZCL_CRM_ELEC_SERVICES->(Method)send_email.


data lv_sender           type so_rec_ext value 'do_not_reply@electrolux.com'.

*--------------------------------------------------------------
* Send Email and attach to Complaint
*--------------------------------------------------------------

* Sending the document
    call function 'SO_DOCUMENT_SEND_API1'
      exporting
        document_data              = ls_objdoc
        put_in_outbox              = 'X'
        sender_address             = lv_sender
        sender_address_type        = 'INT'
        commit_work                = 'X'
      tables
        packing_list               = lt_objpack
        object_header              = lt_objhead
        contents_bin               = lt_objbin
        contents_txt               = lt_objtxt
        receivers                  = lt_objrec
      exceptions
        too_many_receivers         = 1
        document_not_sent          = 2
        document_type_not_exist    = 3
        operation_no_authorization = 4
        parameter_error            = 5
        x_error                    = 6
        enqueue_error              = 7
        others                     = 8.
  else.
* Sending the document
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      exporting
        document_data              = ls_objdoc
        put_in_outbox              = 'X'
      tables
        packing_list               = lt_objpack
        object_header              = lt_objhead
        contents_bin               = lt_objbin
        contents_txt               = lt_objtxt
        receivers                  = lt_objrec
      exceptions
        too_many_receivers         = 1
        document_not_sent          = 2
        operation_no_authorization = 4
        others                     = 99.
  endif.


Viewing all articles
Browse latest Browse all 8581

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>