cancel
Showing results for 
Search instead for 
Did you mean: 

sending SAP ALERT to external mail id

Former Member
0 Kudos

Hi,

I want to know about the SAP ALERT. I have some requirement like instead of sending mail , go for the SAP ALERT. How it works?

How to send the alerts to external mail id (e.g abc.xyz@sap.com) ?

what kind of server configuration is required for alerts ?

Please guide me.

Regards,

Sheetal

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Please Some help me on this issue am getting below error when am trying to send mail from Business Workplace to External Mail

Cannot process message , no route from SAPUSER TO abc123 at gmail dot com

I done configuration by refereeing below.

Please follow these steps:

1.) tcode = SCOT

2.) double click SMTP

3.) under "SMTP Connection" section, fill in your mail host IP(ex: webmail.sap.com) and the port number(25) and code page = No conversion.

4.) under "Supported address types", make sure Internet is checked, and click on "Set". The Address area has to be *

5.) To test route,

SCOT -->Utilities --> Routing test

RecipientAddr.type = INT

Recipient addr. = abc.xyz at sap dot com

6.) You also need to set the Default Domain.

SCOT --> Settings --> Default Domains (webmail.sap.com)

7.)Now go to tcode SBWP,compose a mail and in the recipient address,enter abc.xyz at sap dot com and send.

8.) Come back to SCOT and click on Utilities-->Start send process(CtrlF7) and execute.+

Thanks,

GAL

Former Member
0 Kudos

Hello,

I have set up an Alert category to send mails. I managed to send mails to internet mail addresses setting up the INT address in the 'Other comunication...' in the user configuration in SU01.

I trigger the Alert by calling the SALRT_CREATE_LOCAL or the SALRT_CREATE_API Function Modules Directly and everything goes ok. I receive the mails correctly.

My problem is when I try to add recipients in the Fixed Recipients section (SAP user names). I don't get any message in the SAP Business Workplace (INBOX).

Is there any special configuration necesary I forgot to get the messages in my INBOX?

Thanks in advance.

Former Member
0 Kudos

Hi,

I also tried with SAP Alerts using Report RSALERTPROC

instead of using FMs. This report is working fine.

Once u selected fixed receiptant , you can able to see alerts in ALRTINBOX not in SAP Inbox.

Make sure that all configuration is done for the SAP Alerts.

so u can receive the alerts in ALRTINBOX

Reward point if it helps u .

Regards,

Shital

Former Member
0 Kudos

Hi Sheetal,

I too was searching for similar option and came across this. And it really works.

Please follow these steps:

1.) tcode = SCOT

2.) double click SMTP

3.) under "SMTP Connection" section, fill in your mail host IP(ex: webmail.sap.com) and the port number(25) and code page = No conversion.

4.) under "Supported address types", make sure Internet is checked, and click on "Set". The Address area has to be *

5.) To test route,

SCOT -->Utilities --> Routing test

RecipientAddr.type = INT

Recipient addr. = abc.xyz@sap.com

6.) You also need to set the Default Domain.

SCOT --> Settings --> Default Domains (webmail.sap.com)

7.)Now go to tcode SBWP,compose a mail and in the recipient address,enter abc.xyz@sap.com and send.

8.) Come back to SCOT and click on Utilities-->Start send process(Ctrl+F7) and execute.

You will receive the mail in your external mail id.

I dont know as to why we should do step 8,but in my case the mails were sent only after performing step8.

Hope it is helpful to you.

regards,

Bhavin P Shah

Former Member
Former Member
0 Kudos

Hi ,

Thanks for your reply . The mail configuartion is working fine .

But we can see SAP alerts in ALRTINBOX .Actually i want to send alerts from workflow.

In case if know , How to send ALERT to external mail id through workflow please update m.

Regards,

Sheetal

Former Member
0 Kudos

Sheetal,

Please go thru the document I have sent you.

See the excerpts from link:

You have to call up the FM in one of your task and configure the container in ALM

Cheers

Jai

*********************************************************************************************************************************************

Triggering an Alert

Purpose

Alerts of a particular category must be triggered by an application at runtime. This can be done in various ways, such as using a function module, an event linkage, or the Post Processing Framework (PPF).

Prerequisites

The central alert server must be maintained as an RFC destination in transaction SM59 in the local system. You must also check that this central alert server is selected as the RFC destination in transaction SALRT1. (This constitutes an entry in table TALRTDST.)

Process Flow

The various options for triggering an alert are detailed below.

Triggering by Calling a Function Module Directly

The function module SALRT_CREATE_API is called directly by the application in the local system and passes the data to the central alert server by RFC.

The alert category (IP_CATEGORY) is the only mandatory import parameter. The parameters IP_EXPIRATION_TIME and IP_EXPIRATION_DATE are optional import parameters for an expiry time and date. The optional import parameter IP_WAIT_ON_COMMIT is used to control whether an alert is triggered immediately or with the next commit. Default is to wait for the application’s commit.

When triggering using the function module, it is also possible to define dynamic subsequent activities. These could be used in a situation where a subsequent activity is to refer to a document that is not added to the alert until runtime, for example. You pass these activities to the function module by filling an internal table of the structure SALRTSACT and passing this table to the module as table parameter IT_ACTIVITIES. The structure SALRTSACT contains a name for the activity in the field ACTTEXT, and the URL that refers to the subsequent activity in the field ACTURL.

Triggering with an Event Linkage

An alert can also be triggered by the occurrence of an event defined in the Business Object Repository (BOR). You enter the alert category as receiver type, and the function module SALRT_CREATE_VIA_EVENT as receiver function module for the event in transaction SWE2 in the local system. The Alert Framework receives your alert category from your entry in the event linkage table.

If you need application-specific attributes, you must define appropriate attributes for the object in the BOR. The receiver module determines all non-table attributes that are defined for the triggering object in the BOR, and writes them into the alert container, providing the attributes are also defined as elements of the alert container in the definition of the alert category.

Alternatively, you can implement a check function module or a receiver function module. This enables you to populate the container according to your requirements.

You should only trigger alerts with an event linkage if you have already implemented a BOR object for your application.

Triggering with the Post Processing Framework (PPF) or Message Control (MC)

Using PPF or MC to trigger alerts makes it possible to define general conditions and initiate output, such as printing, sending an Internet mail, or starting a workflow. The triggering of an alert can be modeled as a method call (PPF) or by writing a processing program for the medium "special function" (MC).

You should only trigger alerts using PPF/MC if you already use PPF/MC in your application, since there is a great deal of implementation required otherwise.

Triggering from a Workflow

It is possible to define the triggering of an alert as a step in a workflow definition, although you would usually only do this as an extension to an existing workflow. Elements in the workflow container can be used as attributes. For more information on workflows, see SAP Business Workflow (BC-BMT-WFM).

Example

The following example report RSALERTDEMO1 shows how an alert can be called directly by a function module, and is available in the package SALERT_LOCAL.

&----


*& Report RSALRTDEMO1 *

*& *

&----


*& *

*& *

&----


REPORT RSALRTDEMO1 .

INCLUDE <CNTN01>. "definition of container makros

CONSTANTS: C_CATEGORY type salrtdcat ValuE 'ALRTFRMWRKTEST',

  • name of application specific attribute / container element

C_DOCNUMBER(10) TYPE C VALUE 'DOCNUMBER'.

  • declaration of the alert-container including application data

SWC_CONTAINER LT_ALERT_CONTAINER.

  • fill documentnumber as element in the container

SWC_SET_ELEMENT LT_ALERT_CONTAINER C_DOCNUMBER '0815'.

  • create an alert of category 'ALRTFRMWRKTEST',

  • alert-recipients are found via subscription only, no expiration time

CALL FUNCTION 'SALRT_CREATE_API'

EXPORTING

IP_CATEGORY = C_CATEGORY

  • IP_EXPIRATION_TIME =

  • IP_EXPIRATION_DATE =

  • IP_WAIT_ON_COMMIT =

TABLES

  • IT_RECIPIENTS =

  • IT_ACTIVITIES =

IT_CONTAINER = LT_ALERT_CONTAINER

EXCEPTIONS

OTHERS = 1.

IF SY-SUBRC NE 0.

  • message "error when creating alert

ENDIF.

commit work.

Triggering an Alert

Purpose

Alerts of a particular category must be triggered by an application at runtime. This can be done in various ways, such as using a function module, an event linkage, or the Post Processing Framework (PPF).

Prerequisites

The central alert server must be maintained as an RFC destination in transaction SM59 in the local system. You must also check that this central alert server is selected as the RFC destination in transaction SALRT1. (This constitutes an entry in table TALRTDST.)

Process Flow

The various options for triggering an alert are detailed below.

Triggering by Calling a Function Module Directly

The function module SALRT_CREATE_API is called directly by the application in the local system and passes the data to the central alert server by RFC.

The alert category (IP_CATEGORY) is the only mandatory import parameter. The parameters IP_EXPIRATION_TIME and IP_EXPIRATION_DATE are optional import parameters for an expiry time and date. The optional import parameter IP_WAIT_ON_COMMIT is used to control whether an alert is triggered immediately or with the next commit. Default is to wait for the application’s commit.

When triggering using the function module, it is also possible to define dynamic subsequent activities. These could be used in a situation where a subsequent activity is to refer to a document that is not added to the alert until runtime, for example. You pass these activities to the function module by filling an internal table of the structure SALRTSACT and passing this table to the module as table parameter IT_ACTIVITIES. The structure SALRTSACT contains a name for the activity in the field ACTTEXT, and the URL that refers to the subsequent activity in the field ACTURL.

Triggering with an Event Linkage

An alert can also be triggered by the occurrence of an event defined in the Business Object Repository (BOR). You enter the alert category as receiver type, and the function module SALRT_CREATE_VIA_EVENT as receiver function module for the event in transaction SWE2 in the local system. The Alert Framework receives your alert category from your entry in the event linkage table.

If you need application-specific attributes, you must define appropriate attributes for the object in the BOR. The receiver module determines all non-table attributes that are defined for the triggering object in the BOR, and writes them into the alert container, providing the attributes are also defined as elements of the alert container in the definition of the alert category.

Alternatively, you can implement a check function module or a receiver function module. This enables you to populate the container according to your requirements.

You should only trigger alerts with an event linkage if you have already implemented a BOR object for your application.

Triggering with the Post Processing Framework (PPF) or Message Control (MC)

Using PPF or MC to trigger alerts makes it possible to define general conditions and initiate output, such as printing, sending an Internet mail, or starting a workflow. The triggering of an alert can be modeled as a method call (PPF) or by writing a processing program for the medium "special function" (MC).

You should only trigger alerts using PPF/MC if you already use PPF/MC in your application, since there is a great deal of implementation required otherwise.

Triggering from a Workflow

It is possible to define the triggering of an alert as a step in a workflow definition, although you would usually only do this as an extension to an existing workflow. Elements in the workflow container can be used as attributes. For more information on workflows, see SAP Business Workflow (BC-BMT-WFM).

Example

The following example report RSALERTDEMO1 shows how an alert can be called directly by a function module, and is available in the package SALERT_LOCAL.

&----


*& Report RSALRTDEMO1 *

*& *

&----


*& *

*& *

&----


REPORT RSALRTDEMO1 .

INCLUDE <CNTN01>. "definition of container makros

CONSTANTS: C_CATEGORY type salrtdcat ValuE 'ALRTFRMWRKTEST',

  • name of application specific attribute / container element

C_DOCNUMBER(10) TYPE C VALUE 'DOCNUMBER'.

  • declaration of the alert-container including application data

SWC_CONTAINER LT_ALERT_CONTAINER.

  • fill documentnumber as element in the container

SWC_SET_ELEMENT LT_ALERT_CONTAINER C_DOCNUMBER '0815'.

  • create an alert of category 'ALRTFRMWRKTEST',

  • alert-recipients are found via subscription only, no expiration time

CALL FUNCTION 'SALRT_CREATE_API'

EXPORTING

IP_CATEGORY = C_CATEGORY

  • IP_EXPIRATION_TIME =

  • IP_EXPIRATION_DATE =

  • IP_WAIT_ON_COMMIT =

TABLES

  • IT_RECIPIENTS =

  • IT_ACTIVITIES =

IT_CONTAINER = LT_ALERT_CONTAINER

EXCEPTIONS

OTHERS = 1.

IF SY-SUBRC NE 0.

  • message "error when creating alert

ENDIF.

commit work.