Professional Documents
Culture Documents
Applies to:
SAP NetWeaver Process Integration 7.1 For more information, visit the SOA Management homepage.
Summary
This document gives complete step-by-step procedures for implementing and testing a File-to-Mail scenario from scratch using the Business Systems in the Integration Directory (ID). The document also provides some basic idea and working knowledge on how to configure SMTP. Some insight on TCodes- Profile Parameters (Transaction RZ10), User Maintenance (Transaction SU01), maintain services and assigning a client (Transaction SICF), SAPconnect Administration (Transaction SCOT) So, this document can be treated as a ready reference in real life situations when working with Mail scenario. Author: Sandeep Sharma
Author Bio
Sandeep Sharma is working as a SAP NetWeaver Consultant for HCL Technology Noida INDIA. He is SAP PI 7.0 certified developer. He is having a good experience in ALE/IDOC also.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Table of Contents
Introduction ......................................................................................................................................................... 3 Basic Concepts and Overview ............................................................................................................................ 3 Requirement Study and Scope Identification .................................................................................................. 3 Prerequisites ....................................................................................................................................................... 4 Knowledge Requirements ............................................................................................................................... 4 System Requirements ..................................................................................................................................... 4 Implementation Build Solution ......................................................................................................................... 4 1 SMTP Configuration guide............................................................................................................................... 4 1.1 Purpose ..................................................................................................................................................... 4 1.2 Prerequisites ............................................................................................................................................. 4 1.3 Process Flow............................................................................................................................................. 4
1.3.1 Settings for the Profile Parameters (Transaction RZ10)...................................................................................... 4 1.3.2. User Maintenance (Transaction SU01) .............................................................................................................. 7 1.3.3. Assigning the Clients (Transaction SICF) .......................................................................................................... 9 1.3.4. SAPconnect Administration (Transaction SCOT) ............................................................................................. 11
2-File to Mail Scenario ...................................................................................................................................... 14 2.1 Enterprise Service Repository (Designing) ............................................................................................. 14
Design Objects:.......................................................................................................................................................... 14
2.3. Testing the Scenario (SXMB_IFR)......................................................................................................... 35 2.4. Testing the Scenario (SXMB_MONI) ..................................................................................................... 36 Related Content ................................................................................................................................................ 38 Disclaimer and Liability Notice .......................................................................................................................... 39
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Introduction
This guide gives you a clear IDEA and complete step by step procedures to be followed while implementing File to Mail scenario. There are many blogs and articles on SDN for XI and PI 7.0 for mail scenario. This guide is especially for PI 7.1 users and also for those who want to learn how to configure SMTP. It becomes very difficult for any beginner and Intermediate XI aspirants to implement such a scenario in PI 7.1 from scratch. Hence, I have tried to come up with a complete solution and How to guide document to provide all steps required implementing such a scenario from the very beginning. Hope this document will help all PI professionals as a ready reference in real life situation while working with File and Mail PI scenario in cross company environment. Happy Learning
Requirement Study and Scope Identification Create two third party Business System in SLD for Sender and Receiver Systems .If you dont have sufficient authorization to create it then you can ask your Basis team to create these for you or you can use Business Service in ID like in any Cross Company Environment
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Prerequisites
Knowledge Requirements Basic knowledge of XI and how it works. Nice to have one file to file scenario implementation experience. Please see the reference section if you want to go through one file to file scenario example System Requirements Two Business Systems in SLD (System Landscape directory) are required which should be created using Third Party Option Access to Transactions RZ10, SU01, SICF, SCOT, SXMB_MONI, SXMB_IFR are required for PI System.
Tip: If you dont have access right to any of this transaction, you can contact your basis /XI administrator so that he can help you to create / configure objects for you including SLD.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Configure the following two profile parameters: A) icm/server_port_<*> = PROT=SMTP,PORT=<port> (this parameter opens a TCP/IP port for receiving mails through SMTP) here <*> stands for the sequence number (starting from zero)of frequently occurring parameters. <port> the number of the port that is to be used ( cant yet be used by another program on this host.) In my case here value of * (sequence number) is 2 and PORT = 25000
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
B)
is/SMTP/virt_host_<*> = <host>:<port>,<port>,...; This parameter defines a virtual mail host for receiving mails. Here <host> describes the name of the host to which the incoming mails are addressed. <port> describes the number of the port to which the incoming mails are addressed.
Note: 1- This parameter is not required If one single client of the SAP system is receiving and processing all incoming mails). 2-Default value for this parameter is/SMTP/virt_host_0 = *:*; 3-In case of multiple clients, a virtual host has to be created for each of these clients.
In my example I have used *:25000 here * is used because I want the mails to be sent independently of the host being addressed and 25000 is the value of PORT.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
1.3.2. User Maintenance (Transaction SU01) Create a service user to process incoming mails Call transaction SU01 to create a user with type Service and assign the profile S_A.SCON to this user.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Click on create
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
User addresses Assign the valid Internet mail address to your user (which is supposed to receive e-mails) in transaction SU01, under E-Mail on the tab page Address.
1.3.3. Assigning the Clients (Transaction SICF) One SMTP server (SAPconnect) has already been created in transaction SICF and is delivered with every SAP system. Now Use this to create the first client and then create another SMTP server for each additional client. Run tcode SICF and enter the following details:
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Host data tab Enter the sequence number of a parameter is/SMTP/virt_host_<*> from the profile. If you have only created one client and therefore have not specified this parameter type, enter 0.As shown in the figure:
Enter *:* in host configuration information. Handler list Enter CL_SMTP_EXT_SAPCONNECT at position 1.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
1.3.4. SAPconnect Administration (Transaction SCOT) In this step, Define SAPconnect settings for the client that is to be used for send processes. Run tcode SCOT Under Settings Default Domain, define the domain of the SAP system client.
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: 1. First confirm that you are in the Node view, and then double click on that node name. 2. Choose Node in use. 3. In the Mail Host and Mail Port fields, specify the mail server to which the outbound mails are to be sent.In my case , Mail Host = smtp.rediffmailpro.com (or you can use IP address also ) and Mail Port = 25. 4. Next to Internet, click on set button and 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. 5. Enter the output format for SAP documents and Confirm your selection
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Note: If you also want to configure the node for sending text messages (pager/SMS) or faxes, please follow the reference link given at the end of this document.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Send Job (shift +F7) E-mails sent from an SAP application are first stored in a queue. A periodical background process, the SAPconnect send job, gets the e-mails from this queue and sends them over the Internet. To schedule this job in SAPconnect: Administration, proceed as follows: Press shift+F7 or click on the job button as shown in the figure below:
1. Choose View Jobs. 2. If no other job has been scheduled, choose Job Create. 3. Enter a job name ( for ex: MailSend)and confirm it.
5. Choose Schedule Job. In the next window, Choose Schedule periodically. Select the interval you require, such as 10 minutes. Choose Create.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Message Types: Create the Message Type for both the data types as shown below.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Message Interfaces: Create the Message Interfaces for the above message types as shown below.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Message Mapping: Create the Message Mapping between the source message type and the target message type as shown below.
Operation Mapping: Create the Interface Mapping between the outbound and inbound interface as shown below.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Actions: Create two actions for source service interface and the target service interface as shown below.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Process Integration Scenario: Create a process integration scenario as shown below 1. Right click and insert your sender component. In my example it is SAMPLE_TEST_SCENARIO 1.0 2. Again right click and insert your receiver component. In my example again it is SAMPLE_TEST_SCENARIO 1.0 3. Right click on first component and click on insert action. Here assign your sender action. In this example it is FileSender. Or you may drag and drop this action. 4. Now right click on second component and click on insert action. Here assign your receiver action. In this example it is Mailreceiver. Or you may drag and drop this action. 5. Now click on sender action (FileSender) press shift button on keyboard and then click on receiver action (Mail receiver) both will be highlighted. release shift button and then right click and select option create connection between selected actions
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Click on assign mapping and assign the mapping using drop down menu.
Save and activate all your objects. Your ESR part is completed
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
2.2. Integration Directory (Configuration) Directory Objects: Create the Business Scenario and create the sender business service (MAIL_SND) and receiver business service (MAIL_RCV).Assign sender and receiver Interface to both service. Assign these services to your business scenario. Sender Communication Channel: Create the sender communication channel of Adapter type as File. Select the Transport Protocol as FTP.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Receiver Communication Channel: Create the Receiver communication channel of Adapter type as MAIL.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
In the wizard, Fill the details of process integration scenario which you have created in ESR
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Click on continue
Click on finish
Click on close
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Now click on the arrow connecting two actions and assign the communication channels.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Click on simulation button (4th button in the above screen shot) and select Generation Simulation radio button
Fig22. Simulation
Click on start
After simulation new window will popup close that and again click on the simulation button.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Click on start. Again new window for log will popup close that. Click on apply button .Following objects will be created.
Save your configuration scenario and activate your change list. This completes your ID part.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
2.3. Testing the Scenario (SXMB_IFR) 1- Open RWB->component Monitoring->Display->Integration Engine->Test Message Fill up the details as below and also take your payload from ESR message mapping with some test values. Paste that payload here in test message.
Click on send message. Now you can check the message in SXMB_MONI. 2- Alternatively you can test the scenario by putting the file MAIL.TXT on your FTP. After some time file will be deleted from FTP
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
2.4. Testing the Scenario (SXMB_MONI) To Test the scenario put the file MAIL.TXT on your FTP. After some time file will be deleted from FTP Message in SXMB_MONI is shown below.
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
You will receive a mail in your box like the screenshot below:
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1
Related Content
SMTP configure http://help.sap.com/saphelp_nw04/helpdata/en/af/73563c1e734f0fe10000000a114084/frameset.htm http://help.sap.com/saphelp_nw04/helpdata/EN/e3/94007075cae04f930cc4c034e411e1/content.htm http://help.sap.com/saphelp_nw04/Helpdata/EN/6b/4493404f673028e10000000a1550b0/content.htm
A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1