Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
santhosh_kumarv
Active Contributor
0 Kudos


In this Blog(My first Blog :smile: ) I will explain how to send mail with the content of the file getting displayed in the row column format. Even though there are some Blogs speaking about sending mail, the Blog eMail Reporting  (eMail Reporting) by Prakash Arunachalam explains of sending the mail with the data getting displayed in the row column format using XSLT mapping. However in this Blog I will exercise the same scenario using a User Defined Function.

Requirement:

In a landscape where XI integrating MDM and R3, the requirement is to send the materials that are created in the MDM in a mail to the Data Administrator who has to approve or reject the material. Sending mail can be done with the use of MDM workflow, however it will flood the inbox with these mails!https://weblogs.sdn.sap.com/weblogs/images/251780423/outlook1.jpeg|height=1|alt=|width=1|src=https:/...! being sent for each and every material created. The other best solution for this is MDM will send a file every one-hour with the material details and XI has to send mails with those material details and the URL of the portal page to approve/reject. Even the same requirement can be from R3 where it sends the list of purchase order created in an IDoc, which should be sent as a mail.  Let us start creating the scenario.

1. Import the XSD of the source structure and the Mail in the external definition.

You can download the mail structure from the following link

https://websmp205.sap-ag.de/~sapidb/012006153200000361852004E/ximail30_xsd.txt

2. Create Message Interface for the Source and the Mail.

3. Map the product details to the Mail XSD as shown.



The above mapping enables to dynamically send mails as shown in the Blog

The specified item was not found.

by Michal Krawczyk.Source.XML</p><p><textarea cols="100"><?xml version="1.0" encoding="UTF-8"?>

<ProductDetails>

<Product>

<MDMID>53</MDMID>

<JobID>21</JobID>

<ToEmail>santhosh.vellingiri@wipro.com</ToEmail>

<CCEmail/>

<MATNR>12345</MATNR>

<Description>ABC</Description>

<MTART>bcd</MTART>

<FORMID>001</FORMID>

<RejectionReason/>

<WF_Status>Pending For Approval</WF_Status>

</Product>

<Product>

<MDMID>54</MDMID>

<JobID>21</JobID>

<ToEmail>santhosh.vellingiri@wipro.com</ToEmail>

<CCEmail/>

<MATNR>12345</MATNR>

<Description>ABC</Description>

<MTART>bcd</MTART>

<FORMID>001</FORMID>

<RejectionReason/>

<WF_Status>Pending For Approval</WF_Status>

</Product>

<Product>

<MDMID>55</MDMID>

<JobID>21</JobID>

<ToEmail>santhosh.vellingiri@wipro.com</ToEmail>

<CCEmail/>

<MATNR>12345</MATNR>

<Description>ABC</Description>

<MTART>bcd</MTART>

<FORMID>001</FORMID>

<RejectionReason/>

<WF_Status>Pending For Approval</WF_Status>

</Product>

<Product>

<MDMID>56</MDMID>

<JobID>21</JobID>

<ToEmail>santhosh.vellingiri@wipro.com</ToEmail>

<CCEmail/>

<MATNR>12345</MATNR>

<Description>ABC</Description>

<MTART>bcd</MTART>

<FORMID>001</FORMID>

<RejectionReason/>

<WF_Status>Pending For Approval</WF_Status>

</Product>

<Product>

<MDMID>57</MDMID>

<JobID>21</JobID>

<ToEmail>santhosh.vellingiri@wipro.com</ToEmail>

<CCEmail/>

<MATNR>12345</MATNR>

<Description>ABC</Description>

<MTART>bcd</MTART>

<FORMID>001</FORMID>

<RejectionReason/>

<WF_Status>Pending For Approval</WF_Status>

</Product>

</ProductDetails></textarea></p><p>Output Mail

!https://weblogs.sdn.sap.com/weblogs/images/251780423/outlook2.jpeg|height=395|alt=|width=506|src=htt...!</body>

1 Comment
Labels in this area