PO / Invoice sender Email ID change

By Ganesh Kumaran G, Extend Technologies

1)     In Standard SAP PO, Sender is either the PO creator or the Approver user name for External Send of Smart form. There are times when we require a generic company email to be used instead of individual person’s user name. Say Abcd_PO_Group@xyz.com

2)     If your driver program is using SO_NEW_DOCUMENT_ATT_SEND_API1, then easily replace it with FM  SO_DOCUMENT_SEND_API1  - this FM have option to input Sender, rest of the Parameters are unchanged.


3)     But the problem is when your driver program does not use SEND_API  but uses the FM WFMC_PREPARE_SMART_FORM, in this case it is not possible to change the Sender at all, as there will be no option, as only SY-UNAME user name will be associated using persistence class for sender  

4)     In this case, follow the below steps to change the email sender for External Send (5).  

a.     The print program will have perform for set_print_param before calling the SSF_FUNCTION_MODULE_NAME Function module for the form.  

b.    In the perform there will be Call Function ‘WFMC_PREPARE_SMART_FORM’, in this SAP sets the Sender and Recipient in pe_sender & pe_recipient  Parameters.  

c.     Write the below code after the above function call  

d.    Add this Include INCLUDE <cntn01> in top of the program section, this contains all the Macros required for the below code to execute properly

5)     This will override the user name with the required email id. This does not required to be configured in any master record  

6)     In case you don’t require it to be hard coded, then you can create a DUMMY User record and have the required email. In the Code replace the below  

a.     In ‘AddressString’ instead of c_sender_email provide the required SAP user name

b.    In ‘TypeID’ replace ‘U’ with ‘B’

c.     Remove ‘NoIntern’ ‘X’ line completely  

7)      The above code will allow you to have the sender as any email associated with that DUMMY master record. Hard Coding Avoided.  

8)     Same logic and code can be used in Invoice Driver program as well, as mostly SAP follows the same logic.  

9)     Refer OSS notes: 561593 if you like to always the Sender as PO creator instead of approver.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image