
Is this for me: This is about outbound emails. Read the pain points in the first bullet list and look at the results at the end to determine if you should spend time here
Introduction: Emails are a great way to connect with customers and provide them with pertinent information. SAP has many different ways of sending emails and choosing the best way for your client depends on many factors. Our client is in the midst of a digital transformation (aren’t we all...or am I late to the party?). The idea behind this post is to help those who may embark on a similar exercise in the near future. The approach I outline here uses IS-U & CRM (only Business master data replicated).
Background: The client is not happy with the state of affairs. The only way we(the client) reach out to our customers is through letter post. When was the last time you read one?.. We do emails but for a few isolated processes using a few standalone applications. This gives rise to the inevitable question: Can we use SAP for this: with undertones of 'but its so complex', 'will it be user friendly', and 'we don't know what we will get'?. This was going to be the first major project for the client after the upgrade, plus it was part of the foundation to their digital transformation. We(the consultants) were committed to do our best and deliver something that hopefully exceeded expectations.
Since the requirements were somewhat open ended, the first step was to understand the clients needs and pain points. We already had some idea based on the existing situation and we conducted sessions to get the complete picture. Now this is a list of our client's pain points but it may read like its yours :smile: :
The following requirements came from our clients:
Apart from addressing these pain points, we had to brainstorm the better. Through our session (all my great ideas were stricken through, but I am sure some of you can use them ), we came up with the following definition of better:
Design: Based on these considerations, we looked at various options available within SAP to send emails. We decided that an integration of Correspondence and mail Forms was the most appropriate choice for our use case. It seemed to deliver most of the major functionality via standard code. Correspondence was a natural choice because of the no-regression clause but it had other things going in its favor as well.
The high level design we converge on was to integrate the mail Forms with the correspondence framework via RFC. The correspondence framework supplies the triggers and the data and the Mail forms does the rendering and output. We also had to build a fair amount of custom stuff: retention, review, versioning etc. but more on that later.
Code: Here we only cover the major objects and on a high level (otherwise there simply is too much to cover).
The WYSIWYG editor is nice but you can switch to the 'source' mode (blue button) and pasteHTML direclty (such as provided from an agency). Text elements can be dynamic based on values in the attribute context and adding attributes (dynamic values) is something your client can also do, once the right attribute context is defined.
Many other blogs cover this in excruciating detail, I have found them to be a useful resource.
IV_SENDER | TYPE | AD_SMTPADR | Sender email address |
IV_PARTNER | TYPE | BU_PARTNER | Partner/Account |
IV_MAILFORM_ID | TYPE | CRMT_PML_ID | Mail form ID |
IT_RECEIVERS | TYPE | Table of type SRADDRESS | Receivers (To, CC, etc) |
IT_INPUTFIELDS | TYPE | CRMT_ERMS_NAME_VALUES | Context Attributes values: Key value pair |
IV_ACTIVE_VERSION | TYPE | XFELD | ( Version : custom functionality) |
We need to string together two Function Modules within our RFC ' CRM_ERMS_MAIL_COMPOSE' & ' CRM_ERMS_MAIL_SEND'. Sample code:
The "smartform parameter" name above can be determined by looking at the interface of the output smartform linked to the printform. So some valid values could be mail_sender, user_setting or v_date
Result: We were able to hit all our checkboxes. We are self reporting that we got a lot of postive feedback from out client (and some cake too) :smile: . The solution is working without any reported issues (which always makes me wonder if its being used at all, but we even got responses from our customer at our no-reply box so it must be).
Here are some pixelated pictures( email & cic view):
Alternatives: What are some possible alternatives for those without CRM? Is roll your own a good option? Using the SAP BTF editor and something like WWW_HTML_MERGER. Not that I would recommend it ever
Next Steps: Our client want some emails to be manual with in-place editing. This will be challenging as (far as I know) SAP doesn't have such functionality. A couple of possibilities are to use a view with dynamically generated XML or IFRAME where the HTML is rendered with input fields instead of content. I am not relishing the thought of either of those options. has someone done something similar? Is there a better way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.