You are on page 1of 7

SAP Network Blog: Pep Up Your ChaRM - Part 1: HowTo Create a Smart e-Mail Action Page 1 of 7

Blogs

Pep Up Your ChaRM - Part 1: HowTo Create a Smart e-Mail Action Subscribe
Riccardo Escher Print
Business Card
Company: Osram GmbH Permalink
Posted on Aug. 21, 2009 12:06 AM in SAP Solution Manager

Introduction
Within the German User Group (DSAG) I founded 2007 a customer workforce group which aimed to ehnance the stability and the ergonomics of the Solution Manager Change Request Management
(ChaRM).
During the DSAG technology days in Februay 2008 we consigned our development request to the SAP representatives. But (freely adapted from G. W. F. Hegel) St. Anthony of Padua, as he
sermonized to the fishes, achieved more than I caused with our workforce group and our detailed paper full of screen shots and explanations.
So, after 18 month of waiting for an answer I decided to implement some of the needed enhancements and to share them with you, the SDN folk. May be this will stimulate a couple of developers
to open their treasure box too, so I will have less to code :-).

My First How-To: e-Mail notifications at status change


Many ChaRM users love to be notified by an e-mail if they have to do an action on a Change Document. But they don't like to receive more than one mail because of the same action.
So we have to build a PPF action which will send the notification exactly only when the status has changed.
There are many complicated method to achieve this (for example one described in note 865619), but here we want to show a rather simple method.
In our example we are designing a change transaction type for security roles transports (ZROL) and we want to notify the security team that there is a change document which needs their approval.
So the e-mail should be send exactly one time when the status changes from E0002 to E0011:

(the only way to see the user status values (E00*) I know of is to have a
look with SE16 into table TJ30).

Smartform action

First we create the PPF action for the mail:

(or call transaction CRMC_ACTION_DEF).


First we select our action profile by double clicking on "Action Definition" in the tree:

http://weblogs.sdn.sap.com/pub/wlg/15438 3/3/2010
SAP Network Blog: Pep Up Your ChaRM - Part 1: HowTo Create a Smart e-Mail Action Page 2 of 7

and then in the action definition we press the button


„New Entries":

The action is partner dependent, so we insert the partner function we have created for the security team(s) in our partner schema (ZOSR0002).
It is important that there can be only one unprocessed action at a time.
By the way, we have copied with transaction SMARTFORMS the smartform CRM_SLFN_ORDER_SERVICE_01 (which can be found in the action profile SLFN0001_ADVANCED in the action
SLFN0001_ADVANCED_MAIL) to our name space (ZSV2I_OG_CHARM_SERVICE_06) and then we have adapted this Smartform to our needs (not so interesting in this blog).
Now we maintain the „Processing Types" to insert our smartform informations (Button „New Entries", F4-Help for the action, Selection of "Smart Forms Mail").
Now we mark the new line and press the button „Set Processing":

Now you can insert the technical details of the Smartform action:

http://weblogs.sdn.sap.com/pub/wlg/15438 3/3/2010
SAP Network Blog: Pep Up Your ChaRM - Part 1: HowTo Create a Smart e-Mail Action Page 3 of 7

Conditions

Second important step, we have to define the conditions:

(or call transaction CRMC_ACTION_CONF).


We open the conditions of our action profile:

http://weblogs.sdn.sap.com/pub/wlg/15438 3/3/2010
SAP Network Blog: Pep Up Your ChaRM - Part 1: HowTo Create a Smart e-Mail Action Page 4 of 7

In the right screen we press on the button "Create" and we select our newly created action (you may control the details of the action definition in the first two tabs "Overview" and "Processing
Details"):

First we create the schedule condition itself; to do this we go to the tab "Schedule Condition":

http://weblogs.sdn.sap.com/pub/wlg/15438 3/3/2010
SAP Network Blog: Pep Up Your ChaRM - Part 1: HowTo Create a Smart e-Mail Action Page 5 of 7

We press the button "Edit Condition" and we jump into the most popular Condition Editor; we give a name for the new condition (they can be reused for other actions) and, as suggested, we simply
click into the empty "Condition Definition":

We save the new condition. Up to now this e-mail action would


be executed every time you do a real save when the change document is "In development" (user status E0002).
To avoid this we go to the tab "Start Condition" and create a start condition:

The editing is the same. I show only the result:

http://weblogs.sdn.sap.com/pub/wlg/15438 3/3/2010
SAP Network Blog: Pep Up Your ChaRM - Part 1: HowTo Create a Smart e-Mail Action Page 6 of 7

Result

We have now a mail action which will be scheduled only when the document is in status "In development" but started only when the status has changed to "Critical Authorization Check". You can
save the transaction as many times as you want during development: the e-mail action would keep there as unprocessed (you can see it with the tab "Actions").
Here an example for the Staus E0002 "In development":

(you may set the SU01 user parameter CRM_ACTION_ICONBAR to X).


When the status changes to E0011 the e-mail action would start, the e-mail notification "Dear SecTeam, please Check" would be sent, but no new e-mail action "Dear SecTeam, please Check"
would be created during the status E0011 (instead, while in E0011, a new e-mail action "Dear Tester, please test" would be scheduled, which will only start when the status changes to E0004 "To
be tested", and so on, but further e-mail actions are not described in this blog).
We have added an "Error free flag=X" to the start condition to ensure that the e-mail notification reaches the next workflow partner only when the status change is successfully completed.
Otherwise, when the security team puts the transaction back to development (= denies it's approval) a new e-mail action "Dear SecTeam, please check" would be created during the re-
development. When the role administrator has implemented the changes required by the security team and does the status change to E0011 (SecTeam check), this new e-mail notification would
start, but this is not spam, because the security team has really to check a second time.

Tip

When the action weren't scheduled and you check your customizing on and on without finding an error, you might execute the consistency check of transaction SPPFCADM:

http://weblogs.sdn.sap.com/pub/wlg/15438 3/3/2010
SAP Network Blog: Pep Up Your ChaRM - Part 1: HowTo Create a Smart e-Mail Action Page 7 of 7

Thanks for reading!

Riccardo Escher since 1992 SAP basis developer, always interested in new technologies and without any reluctance in helping SAP to improve their products (messages, user group)

Add to: del.icio.us | Digg | Reddit

Any comments?
Comment on this weblog

Showing messages 1 through 2 of 2.

Titles Only Main Topics Oldest First


 Email notification setup in ChaRM
2009-12-17 14:38:27 Elena Ainoulina Business Card [Reply]

Riccardo,
this is excellent - thank you so very much !
I tried to configure email notification to developer on status change by following note 1275036, and some other document (half in German) - do not work at all.
This your way: short, simple and most importantly - works !!!

Thanks again
Elena

 Email notification setup in ChaRM


2010-01-11 08:06:42 Riccardo Escher Business Card [Reply]

Thanks for the flowers!

Riccardo

Showing messages 1 through 2 of 2.

http://weblogs.sdn.sap.com/pub/wlg/15438 3/3/2010

You might also like