Wednesday 7 March 2012

Testing email in SAP systems

Sometimes you just want to test if email is working properly in your SAP system. For example the Basis guys have just built a new box... Typically they forget to configure SAPconnect appropriately...

You can simply run ABAP program: RSBCS_EXAMPLE_EMAIL. This will allow you to test out all the standard email functionality. Internally it uses the BCS classes (Business Communication Service). You can run this program directly from transaction SE38.



When you see the following result... You know that SAPconnect is not properly configured.
Time to talk to your basis consultant.



What about SAP Business Workflow and external emails?

External emails are emails sent through your companies exchange server to an internet email address. When addressing an email you can use address type "U" for internet email and an email address: test.user@test.com.

But... When working with SAP Business Workflow it is common to use type G addressing which is where you can specify a HR object(s) as an email recipient.

For example, the standard Workflow Send Mail step allows you to bind a a list of HR objects as recipients which his commonly done by using an address like this: "USSAPUSER". Where US specifies the object type as a User Id and SAPUSER is the actual system userid of the person. This value is availble in the USR01 BOR Object which is handy.

The problem is that often when a Basis Consultant installs a system and enables smtp with SAPconnect they forget to do the additional config to enable this "type G" email addressing. So here is what you need to do...

Goto transaction SO16 (Shared Office Settings) and enable "Send to Home Address of Users".


Now check the User Id's - they need to have the Communication Method set "E-Mail" (and an email address of course!).


And thats that! You can now drop email steps into your Workflows and have them work with the standard HR Object based addressing.