You are on page 1of 31

SAPconnect Configuration for E-Mail/Fax/SMS

Applies to:
As of SAP Web Application Server 6.10, the SAP system's kernel supports SMTP (Simple Mail Transfer Protocol) directly and as of SAP Web Application Server 6.20, faxes and text messages (pager/SMS) can also be exchanged via SMTP.

Summary
Useful to any customer to enable E-Mail/FAX/SMS exchange between the SAP system and each SMTP mail server, without having to use additional external components. Author(s): Kishore Kumar Tenkayala Company: SAP Global Delivery Created on: 18th November 2009

Author Bio
Kishore Kumar is an SAP Certified NetWeaver Technology Consultant. He is having 2 years of experience in overseas customer upgrade consulting, Implementations, Unicode conversions (Complex MDMP to Unicode conversions), and OS/DB migrations.

SAP DEVELOPER NETWORK | KM.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 1

SAPconnect Configuration for

E-Mail/Fax/SMS

Table of Contents
1. SAPconnect Configuration: ..3 1.1 Introduction: ....3 1.2 Prerequisites for EMAIL/ Fax/SMS Setup: ....4 1.3 E-MAIL/FAX/SMS Configuration: .....4 i. ii. iii. iv. v. vi. vii. viii. ix. x. xi. Server Details (Incoming and Outgoing Mail): ...4 User Maintenance(only for Incoming Mail): ..4 Altering/Adding Parameters(Incoming and Outgoing Mail): ...7 SMTP Activation(Incoming and Outgoing Mail): .....10 Client Assignment(only for Incoming Mail): .........................................11 SCOT Configuration(Incoming and Outgoing Mail): ...15 Scheduling Background Job(Incoming and Outgoing Mail): ..22 Post Activities(Incoming and Outgoing Mail): .24 Addressing Mail/Fax/SMS(Incoming and Outgoing Mail): .25 Testing and Verification(Incoming and Outgoing Mail): ....26 Troubleshooting and Error Analysis(Incoming and Outgoing Mail): ....28

2.Related Content30 3.Copyright................................................................................................................................................. 31

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 2

SAPconnect Configuration for

E-Mail/Fax/SMS

SAPconnect Configuration
1.1 Introduction:
The SAP Internet Mail Gateway is a component that connects the R/3 mail system to the Internet. Internet Mail Gateway enables R/3 Users or R/3 applications to send electronic messages to Internet addresses or to receive them in the R/3 System. The connection is made using the standard protocol used in the Internet, SMTP (Simple Mail Transport Protocol).

The following diagram is an overview of how IMG integrates SAP mail to the Internet:

R/3 System SAPconnect


RFC

SAP Internet Mail Gateway

The connection is made by Remote Function Call (RFC) to the R/3 communication interface SAPconnect. As a result, the SAP Internet Mail Gateway enables message to be sent from the Business Workplace and directly from R/3 applications. SAP Connect configuration is Client Dependent. Therefore, it has to be configured in each client of the SAP system.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 3

SAPconnect Configuration for

E-Mail/Fax/SMS

1.2 Prerequisites for E-mail Setup:


The mail servers involved must be SMTP-compliant. Verify that all the required SAP hostnames and Firewall hostname included in Mail Server and DNS server. SAP Connect needs to be authorized to use the SMTP server and Fax Server to send mails.

1.3 E-MAIL Configuration:


i. Server Details: SAP Host Name SAP System ID Clients E-Mail Host Name Mail Port Firewall IP for Saprouter ii. User Maintenance: Create a user (Eg: SMTPUSER) for processing incoming mails in every SAP system client. Service user You have to create a service user for processing incoming mails in every SAP system client in which you want to receive mails (or status notifications). Call transaction SU01 to create a user with type Service and assign the profile S_A.SCON to this user. User contained in the roles SAP_BC_SRV_COM_ADMIN and SAP_BC_SRV_GBT_ADMIN. User addresses Every user that is to receive e-mails in an SAP system requires an Internet mail address. This is also used as a sender address. Enter the Internet mail address for a user in transaction SU01, under E-Mail on the tab page Address.
Step-1: Login into SAP System and use transaction SU01 as below in SAP Screen command bar:

: <SAP Hostname> : <system ID> : <Client Numbers> : <Mail Server Hostname> : 25 : <Public IP>

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 4

SAPconnect Configuration for

E-Mail/Fax/SMS

Step-2: After entering the transaction code in command bar then choose enter and You can see a below screen:

Step-3: Enter Username (SMTPUSER) and choose Create button Step-4: Enter at least one field in Address tab to move to another tab:

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 5

SAPconnect Configuration for

E-Mail/Fax/SMS

Step-5: Choose User type as Service and enter the desired Password (I gave initial123 in all the clients) and confirm the password in Logon data tab:

Step-6: Move directly to Roles tab and enter Role names to the user:

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 6

SAPconnect Configuration for

E-Mail/Fax/SMS

Step-7: Choose profiles tab and enter the profile name to the user:

Step-8: After adding the profile, choose save button iii. Altering/Adding Parameters:

in the command bar.

To be able to use the SMTP functions, you must adjust the profile of the SAP Web Application Server. We recommend that you activate SMTP on all application servers of an SAP system. 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.

Profile Parameters to be added:


a) icm/server_port_<*> = PROT=SMTP,PORT=<port> This opens a TCP/IP port for receiving mails by the SMTP Plug-In. <port> specifies the number of the port that you should use. This must not be occupied by any other program on this host (for example, Sendmail usually uses port 25). If no mails (including status notifications) are to be received in this SAP system, <port> can be set to 0. You can use the TIMEOUT option to define a maximum wait time for a response from the mail server (in seconds). b) is/SMTP/virt_host_<*> = <host>:< port>,<port>,...; This defines a "virtual mail host" for receiving mails. If all incoming mails (including status notifications) are to be received and processed in a single client of this SAP system, this parameter is not required (an entry is/SMTP/virt_host_0 = *:* is then assumed by default).

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 7

SAPconnect Configuration for

E-Mail/Fax/SMS

If you want several clients to be able to receive, you must create a virtual mail host for every client. <host> specifies the name of the host to which incoming mails are addressed. The "*" value can also be specified here if the mail distribution is to occur independently of the addressed host. NOTE: The parameter line must always be ended with a semicolon (even if only one host is involved). Example: With two clients capable of receiving mail, the profile parameters could read as follows: icm/server_port_1 = PROT=SMTP,PORT=25000,TIMEOUT=180 icm/server_port_2 = PROT=SMTP,PORT=25001,TIMEOUT=180 is/SMTP/virt_host_0 = *:25000; is/SMTP/virt_host_1 = *:25001; Updating SAP Parameters: Step-1: Use Transaction Rz10 to update the parameters in the profiles. Use F4 key always to select profile as it creates new version every time.

Step-2: After selecting the Instance profile, choose Extended Maintenance and select Change button, you can see below screen:

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 8

SAPconnect Configuration for

E-Mail/Fax/SMS

Step-3: To change the parameter which is already available, you can change directly and press the save button. If you want to add a parameter choose button and enter the parameter name and value as below:

Then choose button to save the entries and then go back from the screen and choose save button. After saving the entries do restarting SAP Application to effect the changes.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 9

SAPconnect Configuration for

E-Mail/Fax/SMS

iv. SMTP Activation: After restarting SAP system, check whether SMTP service is activated or not using SMICM transaction: Step-1: Go to transaction SMICM

Step-2: Choose Goto->services to check the services

Step-3: If SMTP service is not active then choose service->Activate

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 10

SAPconnect Configuration for

E-Mail/Fax/SMS

v. Client Assignment: Each SAP system client in which inbound mails (or status notifications) are to be received and processed must have an SMTP server. In transaction SICF, there should be one SMTP server (called SAPconnect) supplied in every SAP system. You use this one for the first client then create an additional SMTP server for each additional client. If you have only one client in SAP System you do not need to perform any client assignment as there should be one SMTP server supplied in every SAP system. Just mention the client information in Logon data tab. Step-1: Use transaction Sicf

Step-2: Choose execute button in the above screen:

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 11

SAPconnect Configuration for

E-Mail/Fax/SMS

Step-3: Choose button to create a Host for another client and enter the Name of the Virtual Host with selecting SMTP server as server type.

Choose

to continue to another screen.

Step-4: Enter a Description and provide as below in Host Data tab: Host data You enter the sequence number of a parameter is/SMTP/virt_host_<*> from the profile. If you only have one client and therefore did not enter a parameter of this kind, you enter 0.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 12

SAPconnect Configuration for

E-Mail/Fax/SMS

Step-5: Move to Logon Data tab: Logon data You enter the client to which the mails received via this virtual mail host are to be forwarded, as well as the logon data of the system user created for inbound mails.

Step-6: Move to Handler list tab: Handler list You enter CL_SMTP_EXT_SAPCONNECT as item 1.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 13

SAPconnect Configuration for

E-Mail/Fax/SMS

Step-7: Choose Save button

and save it as Local object:

Step-8: Go back to the main screen and choose Activate button as below:

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 14

SAPconnect Configuration for

E-Mail/Fax/SMS

Step-8: Then select Yes button as below, it will activate all sub-services if any.

Vi. SCOT Configuration (SAP Connect Administration):

You must make the SAPconnect settings in each client that is to be used to send communications. Use transaction SCOT for doing this. Step-1: Use transaction SCOT to get the below screen:

Step-2: Each client has an SMTP node. This node is created by the SAP system and cannot be deleted. The following steps need to be carried out to configure the node so that sending Internet mail is possible: i. ii. iii. Make sure you are in the Node view. Double-click the node name. Choose Node in use.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 15

SAPconnect Configuration for

E-Mail/Fax/SMS

iv.

In the Mail Host and Mail Port fields, specify the mail server to which the outbound mails are to be sent.

v.

Next to Internet, choose the button Set, you can see below screen

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 16

SAPconnect Configuration for

E-Mail/Fax/SMS

vi. Enter the address area of the recipient addresses that are to be reached using this node. In general, * is used if all e-mails are to be sent using SMTP. vii. Enter the output format for SAP documents. We recommend that you use the following settings: SAPscript/Smart Forms ABAP list Business Object / Link RAW Text viii.
For FAX: The following steps need to be carried out to configure the node so that sending FAX is possible: i. ii. Make sure you are in the Node view. Double-click the node name.

PDF HTM HTM TXT button.

Confirm your selection with

v.

Next to FAX, choose the button Set, you can see below screen

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 17

SAPconnect Configuration for

E-Mail/Fax/SMS

vi.

Enter the address area of the recipient addresses that are to be reached using this node. In general, * is used if all faxes are to be sent using SMTP.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 18

SAPconnect Configuration for

E-Mail/Fax/SMS

vii. Enter the output format for SAP documents. We recommend that you use the following settings: SAPscript/Smart Forms ABAP list Business Object / Link RAW Text ix.
For SMS: The following steps need to be carried out to configure the node so that sending SMS is possible: i. ii. Make sure you are in the Node view. Double-click the node name.

PDF HTM HTM TXT button.

Confirm your selection with

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 19

SAPconnect Configuration for

E-Mail/Fax/SMS

iii.

Next to Pager(SMS), choose the button Set, you can see below screen

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 20

SAPconnect Configuration for

E-Mail/Fax/SMS

v.

Enter address areas of recipient addresses that are to be reached using these nodes (usually "*" if all paging or SMS messages are to be sent using SMTP).

For "Conversion into Internet Address", enter the domain of the paging or SMS server or paging or SMS provider. The local part of the Internet address is generated automatically by the system. The address then has the form "SMS=+recipientnumber@domain". NOTE: To be able to use paging or SMS in the SAP system, names must be defined for the messaging services to be used (e.g. "SMS"). You can do this using transaction SA14.

v. Enter the output format for SAP documents. We recommend that you use the following settings: SAPscript/Smart Forms ABAP list Business Object / Link RAW Text x. Confirm your selection with PDF HTM HTM TXT button.

Step-3: Define the domain of the SAP system client, This allows for the following to take place: The SMTP plug-in logs on to the mail server using the domain as ID. The message ID of the outbound e-mails is assembled with this domain. If an SAP user who does not have an Internet mail address sends an e-mail, a sender address consisting of the SAP user name and this domain is generated.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 21

SAPconnect Configuration for

E-Mail/Fax/SMS

Use Settings->Default Domain option in the transaction SCOT to enter the domain name as below:

vii. Scheduling Background Job: E-mails that are sent from an SAP application are merely put into a queue. A periodically running background process, the SAPconnect send job, takes the e-mails from the queue and sends them by Internet. This job can be scheduled from SAPconnect administration as below: Step-1: Choose View-> Jobs in SCOT transaction. You can see below screen

Step-2: Choose Job->create or create button

and specify a job name and choose

button.

Step-3: Place the cursor on the "SAP&CONNECTALL" variant, and choose "Schedule Job" as below:

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 22

SAPconnect Configuration for

E-Mail/Fax/SMS

Step-4: Then Choose "Schedule periodically" in next window:

Step-5: Select periodicity as 10 minutes or 5 minutes and choose

button:

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 23

SAPconnect Configuration for

E-Mail/Fax/SMS

Note: If you want, you can go to Sm36 and select this job with option immediate as well to start the job immediately besides periodicity. Step-6: After this you can see the below screen in SCOT view->job menu displayed as a calendar icon:

Viii. Post Activities: 1. If you do not want to receive any receipt confirmation from internal mail, please change the below option in SCOT transaction as below: Choose Settings-> Confirmation of receipt and in the below screen select SAP Connect does not expect receipt confirm for Internal mail. And then choose button.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 24

SAPconnect Configuration for

E-Mail/Fax/SMS

2. This option is useful for Incoming Mail setup. If you want incoming e-mails that have a particular address or come from a particular sender to be automatically forwarded to another recipient or another distribution list, you can configure this under Settings Inbound Processing in SCOT transaction. Choose create button and enter as below with the help of F4 keys:

ix. Addressing Mail: Internet addresses have the following technical form: <Username>@<computername> The <Username> is the local Users where the <computername> is the domain. For example: firstname.lastname@company.com

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 25

SAPconnect Configuration for

E-Mail/Fax/SMS

Addressing FAX: Fax addresses have the following technical form: <Country><Number>, where <Country> is an abbreviation for the international dialing code, For example, DE 06227/34-1704 Addressing Pager (SMS): Pager addresses have the following technical form: Pager/SMS number <Pager service> :< Number> For example SMS: +491704456734 Addressing SAP system: Addressing from one SAP system to another SAP system in the same host. SAP user in another system <System name> :< Client> :< User name>, For example SID: 000: kishore. To correspond with others you must specify the host systemname.company.com as the mail exchange for the address company.com in the Domain Name System (DNS).

X. Testing and Verification: You can test the configuration using the SAP Business Workplace. The SAP Transaction to access your mailbox is SBWP. Step-1: Use transaction and SBWP and choose New Message or outbox->Documents->create to send a mail to any address: {Or} Choose directly transaction So00 to create a message.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 26

SAPconnect Configuration for

E-Mail/Fax/SMS

Step-2: Create a message as below; Specify the Subject, body and enter the e-mail address in the below. And choose send button to send the mail.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 27

SAPconnect Configuration for

E-Mail/Fax/SMS

Verification: Choose Refresh button in SBWP transaction to verify whether mail has been sent or not:

You can see below screen with status symbol:

Xi. Troubleshooting and Error Analysis: Before analyzing any email or fax problem please make sure the Users are addressing the email or fax correctly 1. Use transaction SOST to check the error description and status of mails sent. Select button to get the description of the status.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 28

SAPconnect Configuration for

E-Mail/Fax/SMS

2. Analyze in SCOT transaction, check the below meanings: Completed Number of successfully completed send orders, that is, the messages were sent to the recipients. ERROR Number of send orders that were not successfully completed, that is, the messages could not be sent to the recipients. In transit Number of send orders that are currently in process outside of the R/3 System, that is, the messages has been transferred to the external nodes by the SAPconnect send process but neither a positive nor a negative status message has been received. Waiting Number of send orders that are currently still within the R/3 System, that is, the messages have not yet been registered by the SAPconnect send process. (Waiting send orders are not yet assigned to a node, therefore only the values for the higher-level scheduled lines 'Address type' and 'System/Client' are displayed.) The values in the last two columns (Duration in transit, Duration waiting) refer to the average processing times (in hours and minutes) for the respective send orders. The processing time period is defined by the following events:

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 29

SAPconnect Configuration for

E-Mail/Fax/SMS

Duration in transit Time from the transfer of the message to the external node to the receipt of the first status message reporting the delivery or non-delivery. Duration waiting Time from the creation of the send order by an R/3 application to the transfer of the message to the external node by the SAPconnect send process. 3. Check that the background job is running correctly in SM37

The job should be called SAP_SEND_MAIL_<Client Number>. Make sure it is periodically running successfully, usually every 10 or 5 minutes. If not, correct the problem and reschedule.

Related Content
Please find the below information for your reference

Note 455140 - Configuration of e-mail, fax, paging or SMS using SMTP.pdf

Note 607108 - Problem analysis when sending or receiving e-mails.pdf

12753028-Scot-Configuration-Troubleshooting.pdf

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 30

SAPconnect Configuration for

E-Mail/Fax/SMS

Copyright
2008 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, System i, System i5, System p, System p5, System x, System z, System z9, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, POWER5+, OpenPower and PowerPC are trademarks or registered trademarks of IBM Corporation. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. These materials are provided as is without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages. Any software coding and/or code lines/strings (Code) included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.

SAPGD Knowledge Management | KM.sap.com 2008 SAP AG

TECHNOLOGY NetWeaver KM Assets| 31

You might also like