Home > ABAP > ABAP and Email – Set Up SAP Enviroment

ABAP and Email – Set Up SAP Enviroment

December 29th, 2009 Leave a comment Go to comments

Before we start to write ABAP code to send email, we first need to configure the SAP system. SAP note 455140 document the detail steps of this activity. If you don’t have the access to SAP service marketplace, please refer to this link Note 455140 – Configuration of e-mail, fax, paging or SMS using SMTP. Here, I summarised the SMTP configuration steps.

Related Transaction Code

RZ10 – SAP Profile Maintenance
SU01 – SAP User Management
SICF
SCOT – SAPconnect Administration
SOST – Administration of External Send process
SMICM – ICM Monitor

Configure the profile parameter (RZ10)

For SMTP, you must set the profile parameters listed below. The placeholder <*> stands for a number with which the parameters that can occur several times are numbered sequentially, starting with 0.

icm/server_port_<*> = PROT=SMTP,PORT=<port>
This opens a TCP/IP port for receiving mails by the SMTP Plug-In.

is/SMTP/virt_host_<*> = <host>:<port>,<port>,…;
This defines a “virtual mail host” for receiving mails.

Configure the user (SU01)

For each client, an service user is needed to receive emails. Profile S_A.SCON needs to be assigned to this user. For the common user, the email address is maintained using t-code SU01. From technical point of view, the email address is maintained using BAS (Business Address Service). You can refer to my another blog for detail information – Business Address Services (BC-SRV-ADR).

Client Assignment (SICF)
Double click the node SMTP servers, configure below parts: host data, service data,handler list – add CL_SMTP_EXT_SAPCONNECT as the handler class of email. After configuring above parts, weneed to activate the SMTP servers service.

smtp_plug_in

SAPconnect Administration (SCOT)

  1. Default domain
  2. SMTP node
    Double click this node. In the pop up screen, specify the mail host and main port. Choose Internet set, pop up a new dialog, * means all the emails will be sent using SMTP.
  3. Send job
    Choose views -> Jobs, you can check whether the job has been scheduled. If not,choose Jobs -> Create, and enter job name, choose variant SAP&CONNECTALL.  
  4. sapconnect

If you have already configured above steps, you can test the email scenatio using t-code SBWP. Enjoy it. In next post, we will discuss how to send email using ABAP API.