Showing posts with label SAP MDM PI Integration. Show all posts
Showing posts with label SAP MDM PI Integration. Show all posts

Enhancing the email experience via MDM & XI

Enhancing the email experience via MDM & XI

Introduction 

We all know MDM has the capacity to send e-mails using MDM workflow engine and the Notify step. I faced some peculiar requirements, very logical and practical, but found it very difficult to address them using only MDM. We can decide the recipients using Roles and Users in Notify step but can we change them dynamically? We can get some dynamism in the body of email but is that dynamism sufficient? What about sending attachments in email or formatting the email body to more readable and automated format?
 
MDM Mail engine can send emails but does it have enough dynamism, automation, functionalities to cater to advance requirements?
Some of them are as mentioned below. 

Requirements

Dynamism in subject line
One of the requirement was that the subject line of email must contain some details about the material like Material number and status in which workflow is. The subject line must contain the status of workflow. For eg: Approved by the Project Manager or Rejected by Project Manager based on the approval decision.
The MDM workflow engine does not allow dynamic changes in the subject line of the mail nor can we add any fields in it.
Dynamism in addressee (To and CC)
The next requirement was a very business oriented one. As any organization, the client had User-Manager hierarchy. The request raised by a particular user must be directed only to his manager. For different users, different managers email address must be populated in the To field.
In the Notify step, we can either send the email to a particular user (static) or to a Role in which case the mail will be sent to all users allocated to that Role.
How do we go about dynamically assigning the email address in the To field?
Dynamism in content of the mail
The content of the mail must be decided on the decision taken by the manager. For eg: if the manager approves a request, then the mail should contain the link for next action page else if rejected, the mail should contain reason for rejection. Depending on the scenario, the contents of the email should change.
In the Notify step, though we can bring in some amount of dynamism by adding fields of the records in it, we cannot decide the contents based on decisions made in previous step.
Mail content styling & attachments
The next requirement was more on the aesthetic look and feel of the email. The contents of the mail must be arranged in a proper tabular format. Dynamic links to portal pages must be given in the body of the email so that users can directly click on it get diverted to the required page for actions. An excel attachment containing the details of material must be sent alongwith the mail.
All these are not possible using MDM. 

Solution

Leverage MDM-XI integration and use XI mail server to send mails!
 
This can be achieved as shown below

 image  
Design Steps
  1. Define Validations and Assignments to dynamically assign email address to fields in main table based on the user and his manager
  2. Instead of Notify Step, use a combination of Assign and Syndicate step in the Workflow
  3. Design and configure a Syndication map which will generate the xml file containing all the fields required in the mail
  4. Configure XI to pick-up the generated file from the Outbound folder of the port
  5. Perform field mapping in the File to Mail scenario of XI to arrange the MDM fields
  6. Configure the XI mail server to send email to the recipients

Output

The result is a user friendly, formatted mail generated dynamically as shown below.

image

 sap mdm training

SAP MDM-XI-R/3 Integration

This blog will show you how to integrate Master Data Management (MDM) and SAP R/3 using SAP PI in short frame using
SAP NetWeaver as framework.MDM and R/3 integration is required in two different scenarios as listed below.

Prerequisites
Prerequisites for integration of these scenarios include some of the software applications installed.
The list is as below:
SAP R/3 (4.6, 4.7, or any),
SAP MDM version 5.5 SP3 Server,
SAP MDM Syndicator,
SAP PI (Process Integration), formally XI (Exchange Infrastructure) Version 3.0 SP16

Outbound Scenario - MDM-to-R/3 (Inbound to R/3)

Inbound Scenario - R/3-to-MDM (Outbound to R/3)


PART – I (Inbound Scenario)
We will be discussing about Inbound process i.e. Inbound to the SAP R/3 and Outbound to the SAP MDM.

image
Figure 1.Inbound to R/3

MDM Console side Configuration Steps:
Step One-->Create Client System.
How To?
Logon to SAP MDM Console and choose the repository which you going to syndicate. Navigate the selected Repository
(Example Repository, BP3_PoC_Customer)-->Admin->Client Systems.
This right hand side you can find Client Systems context area. If you right click on context area, you will get the Context menu Items,
choose-->Add Client System, Enter Name of a client system (Example.Siebel), Code and Type. See the below Figure 2.

image image
Figure 2.Client System

Step Two-->Create Port for Client System.
How To?
Select-->Ports--> by navigating MDM Console-->Repository (BP3_PoC_Customer)-->Admin-->Ports.
By clicking on the Ports you will get Context Area in the right side.
Right click on the Context Area and you will get Context Menu.
From selections choose the Menu Item -->Add port.
Here you need to give TWO ports details, one is for Outbound, and other one is for Inbound. In this step we need Outbound Port.
The Port Name is SIEBEL_OB_CUS_SIEBELCUS01, Code SIEBEL_OB_CUS_SIEBELCUS01, and Type as Outbound. See the Figure 3 below.
image
image
Figure 3.Port

MDM Server Side Configuration
In the SAP MDM Server-->Look at the server folder structure for the repository.
Here, you can see the Client system and Outbound Port details as folder name in the SAP MDM Server folder,
which creats in MDM console as shown in below figure 4.
image
Figure 4. SAP MDM Server Folder

NOTE: No customizing required in MDM Server but you need to ensure whether the folders as explained here are created in the
inbound and outbound folders after additions of the ports in console.

FTP Server Side Configuration
Step Three in the FTP Server
How To?
Configure/Specify the file folder path for pulling the file in FTP Server.This is screen refers the FTP server configuration (WS_FTP server)
image
Figure 5.FTP Server

SAP XI / PI Side Configuration
Step FourSender Communication Channel
In the PI Integration Repository
image
Figure 6.Sender CC

Step Five Receiver Communication Channel
image

Figure 7.Receiver CC

Inbound Process Flow
image
Figure 8. Process Flow

>>>Here, I will be discussing about inbound process, the above figure shows the entire process

Process step in MDM: You need to choose the destination structure, i.e. type of the destination file like XML, XLS, and CSV.
Then mapping will have to do in the MDM Syndicator that for specified repository and then syndicate the repository.
The syndicated repository data will save as predefined type in the Ready folder of SAP MDM Server.
(SAP MDM 5.5--> Server-->Distributions-->bp1bocap080.bp.co_MSQL--> BP3_PoC_Customer--> Outbound-->Siebel--> SIEBEL_OB_CUS_SIEBELCUS01--> Ready)

Process step in PI: Here you need to need specify the File Communication Channel Path as folder specified/created as in the MDM sever. i.e.(Outbound-->Siebel--> SIEBEL_OB_CUS_SIEBELCUS01 -->Ready) as per FTP Server configuration.
The File Adaptor picks up the file and then PI process starts. In the PI transformation and conversion happens and then sends the IDoc to the R/3Inbound port.

Process step in R/3: Here the IDoc receives to Inbound port and then IDoc is available in R/3.


SAP Developer Network Latest Updates