cancel
Showing results for 
Search instead for 
Did you mean: 

Action Profile Email Sender Address Changing Issue

Former Member
0 Kudos

Hi All

I have created Action profile to send e-mail conformation to customers.

I have taken processing as -" Smart forms mail"

The valus for processing as :

form name :              ZCRM_ORDER_CONFIRMATION_01

Processing class :    CL_DOC_PROCESSING_CRM_ORDER

Porcessing method : CRM_ORDER_EXEC_SMART_FORM.

I am able to send mails successfully. But my problem is with Senders address.

I am getting senders addresss as the user name of the CRM who is processing the order. ( For example . if i am creating an order, An e-mail conformation is send to customer with my Sender's name.)

My client want to have a standard e-mail address  for all the mails send to customers from various users.

( example.: customercare@company.com)

Please help how can we customize it in CRM.

Thanks,

Anbu

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

This message was moderated.

Former Member
0 Kudos

SAP Note Header Data Symptom When order confirmations are sent to the partners via email the senders email-id would be the id of the person(User) who creates the order. Now, if you would like to change the senders email id to 1.  The email id of the Sales Org   (or) 2.  The email id of a particular  partner based on a partner number or     a partner function. Kindly implement the following. Other Terms Sender email smartforms order_confirmation. Reason and Prerequisites This is an alternative functionality provided to the customer.  This note can be applied for/from CRM Release 3.0 and higher, irrespective of the service pack used. Solution By SAP standard,  we provide you the class CL_DOC_PROCESSING_CRM_ORDER and the method CRM_ORDER_EXEC_SMART_FORM found inside this class. This class and method (along with the Smartform) is mapped to the processing set of an Action Profile / Action Definition. Now, under this class you can create a similar method like the standard CRM_ORDER_EXEC_SMART_FORM say ZZ_XXXXX ( just a COPY with same content and interface ).  Later you can assign this new method in the  Action Profile / Action Definition used. Having done this, you can either implement the Solution 1 or Solution 2 inside the new method ZZ_XXXXX. Secondly, ensure that you maintain email address for the partner / organization before you proceed. *********************     S O L U T I O N - 1     ********************* NB  Implement the following when you want to change the senders email id to the email id of the Sales Organization. STEP 1. Inside this method you will find a function module call      CALL FUNCTION 'CRM_OUTPUT_SINGLE_READ'     ..... after calling this Function  add the following piece of code... ***************************************************************** * Change senders email-id  to that of the sales Org. * DATA : lt_p1032       LIKE p1032    OCCURS 0 WITH HEADER LINE, DATA : lt_p1032       TYPE TABLE OF p1032 INITIAL SIZE 0,        ls_p1032       LIKE p1032,        lv_objid  TYPE plog-objid,        ls_mail_sender TYPE swotobjid. MOVE ls_orgman_h-sales_org+2(12) TO lv_objid. CALL FUNCTION 'RH_READ_INFTY_NNNN'   EXPORTING     authority             = 'DISP'     with_stru_auth        = 'X'     plvar                = '01'     otype                = ls_orgman_h-sales_org(2)     objid                = lv_objid     infty                = '1032'     begda                = sy-datum 573736 - To change email-id of the sender Version 4 Validity: 18.12.2008 - active Language English (Master) Released On 18.12.2008 18:42:30 Release Status Released for Customer Component CRM-BTX-BF-ACI Actions/Output Determination for Business Transactions CRM-BF-ACI Actions/Output Determination Priority Recommendations / Additional Info Category Consulting Other Components     endda                = sy-datum   TABLES     innnn                = lt_p1032   EXCEPTIONS     nothing_found         = 1     wrong_condition       = 2     infotyp_not_supported = 3     wrong_parameters      = 4     OTHERS                = 5. IF  sy-subrc = 0  .   READ TABLE lt_p1032  INDEX 1 INTO ls_p1032.   IF  sy-subrc = 0  .     CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'       EXPORTING         ip_mailaddr       = ls_p1032-smtpadr         ip_type_id        = 'U'       IMPORTING         ep_recipient_id   = ls_mail_sender       EXCEPTIONS         invalid_recipient = 1         OTHERS            = 2.   ENDIF. ENDIF. ***************************************************************** STEP 2. Inside this method you will find another function call          CALL FUNCTION function_name with an exporting parameter ...     mail_sender          = is_mail_sender replace this line with the following.     mail_sender          = ls_mail_sender STEP 3. Check and Activate this method. *********************     S O L U T I O N - 2     ********************* NB  Implement the following when you want to change the senders email to the email id of a particular  partner based on a partner number or partner function. Step 1. Inside this method ZZ_XXXXX you will find a call made to function...      CALL FUNCTION 'CRM_OUTPUT_SINGLE_READ'     ..... After this call the  table lt_partner_h will be filled with all the parther numbers, Functions etc.  Now you can select any one of these partners  into  a  stucture. ( say ls_partner_wrk) Step 2. Get the email id of this partner using the function module      call....     CALL FUNCTION 'COM_PARTNER_ADDRESS_GET_COMPL'       EXPORTING         iv_addr_nr                  = ls_partner_wrk-addr_nr         iv_addr_np                  = ls_partner_wrk-addr_np         iv_addr_type                = ls_partner_wrk-addr_type         iv_include_slow_comm_fields = true       IMPORTING         es_bapiaddr1                = ls_bapiaddr1         es_bapiaddr2                = ls_bapiaddr2         es_bapiaddr3                = ls_bapiaddr3       EXCEPTIONS         error_occurred              = 1         OTHERS                      = 2. you will find an example call in include LCRM_OUTPUT_GETDATAF23, now you will have the email id in any one of the following ls_BAPIADDR1 or  ls_BAPIADDR2 or ls_BAPIADDR3. STEP 3. In the above step, say you have found the email id in ls_BAPIADDR1, now call the function ...      CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'       EXPORTING         ip_mailaddr            =          ip_type_id              = 'U'       IMPORTING         ep_recipient_id        = ls_mail_sender (see declaration of 'ls_mail_sender' in solution 1) STEP 4. Inside this method you will find another function call          CALL FUNCTION function_name with an exporting parameter ...     mail_sender          = is_mail_sender replace this line with the following.     mail_sender          = ls_mail_sender STEP 5. Check and Activate this method. Validity This document is not restricted to a software component or software component version

Former Member
0 Kudos

Hi all,

Implemented Note 573736... Issue fixed ....

Thanks,

anbu

Former Member
0 Kudos

Informative.Mark it closed