Jun
28th

Automatic email when an alert occurs

Files under Uncategorized | Posted by admin

Symptom

You would like to set an automatic e-mail when an alert occurs in SAP system.

Solution

This Mini How-to is mainly based on SAP OSS note 176492 – Automatic email when an alert occurs (RZ20).

The CCMS monitor architecture (transaction RZ20) allows you to define auto-reaction methods (reports, function modules) that are executed automatically when alerts occur. The predefined CCMS_OnAlert_Email auto-reaction method is used for sending emails.

When an alert occurs, emails with alert information are automatically sent from a SAP system to:

1. a SAPoffice user in client 000 in the same system.

2. a SAPoffice user of another client or another system.

3. a shared distribution list or an external mail address.

To ensure that the emails can be sent from the Alert Monitor, you must carry out the following configuration steps.

IN THE SYSTEM WHERE THE ALERT OCCURS.

In RZ21-> Method definitions – button Display overview, you must set the parameters for the CCMS_OnAlert_Email method.

Pict_01_new

Please find the method CCMS_OnAlert_Email and click the button Change.

Pict_02_new

Go to a Parameters tab.

Pict_03_new

You could use some different scenarios depends on your requirements. In case you would like to receive an e-mail via normal Internet mail there are two options:

When the recipient should be one e-mail account please set as the example below:

1. SENDER <ADMINUSER> (in client 000)

2. RECIPIENT<email address>

3. RECIPIENT-TYPEID U

4. TIME_ZONE<Time zone> (optional)

When the recipients should be more then one e-mail account please set as the example below:

1. SENDER <ADMINUSER> (in client 000)

2. RECIPIENT DistributionListIn000

3. RECIPIENT-TYPEID C

4. TIME_ZONE<Time zone> (optional)

In both cases the SENDER must be valid SAP user account in client 000. In the first case the <email address> in RECIPIENT box must be normal e-mail address like myaccount@mydomain.com

In the second case the distribution list must be created in client 000 as well.

In RZ20 – you must go to the MTE which you would like to assign the method to.

Pict_04_new

Click on the check box and choose the button Properties from the menu bar.

Go to the tab Methods and choose the button Method assignment.

Pict_05_new

Choose tab Auto-reaction, button Change, radio button Method name and type or choose CCMS_OnAlert_Email and save.

Pict_06_new

SAPConnect must be configured in the system in such a way that mails can be sent to other clients, R/3 Systems or to an Internet mail address if these types of users are meant to be the recipients of the alert mails.

If SAPConnect is not yet configured in your system, you need to carry out the following steps in the system:

For the SENDER user entered in RZ21, (<ADMINUSER> in the examples above), in transaction SU01 you must enter a <sourcesystem(C11):000:<ADMINUSER> RML address under ‘Other communication…’. If you want to send mails to an Internet address, you must enter an Internet address in SU01.

Go to SU01 (client 000).

Type the user you would like to use for sending. Choose Other communication button and INT Communication type.

Pict_07_new

Pict_08

Enter the e-mail address which will be used for e-mail sending and choose OK.

In transaction SCOT, you must create RML nodes (mail in other clients/other R/3 System) or INT nodes (mail to Internet address). In our case it is INT node. Make sure that you are logged on to the 000 client when you are creating nodes in transaction SCOT.

Configure node SMTP:

Pict_09_new

Schedule a send process (report RSCONN01) as a periodic background job in the client 000. (SCOT -> Settings -> Send Jobs). Schedule the job according your needs, e.g. 10 or 15 minutes.

Pict_10_new

It is also important you to set a default domain here.

Pict_11_new

You can monitor the status of the e-mails that are sent via SOST transaction. Please pay attention this should be in client 000 again.