Scenario on IDOC to MAIL using Mail Package Format

By Kumar Seemakurti R V R, Yash Technologies

In this blog, we will discuss on how to design and configure a scenario to use receiver Mail adapter with dynamic mail id. In this scenario when the delivery is created a mail is triggered to the customer.  

Processing Steps:

  • An IDoc is triggered from SAP R/3 system and is posted to XI system in asynchronous mode using TRFC connection.
  • As IDoc is posted to XI by SAP R/3 system with control record information, Sender communication channel is not required and hence Sender Agreement is also not required. But inbuilt IDoc adapter residing in Integration engine has capability of converting IDoc data into IDoc xml message using the Meta data available loaded through IDX2.
  • Later on, using the pipeline steps the message is routed through.
  • Receiver Mail adapter is configured with specific properties so as to use the sender, receiver and body for the mail message to be generated. This is achieved by the follow steps for the scenario explained in this blog
    • SMTP is selected as Transport protocol to transfer e-mails to e-mail server.
    • XIPAYLOAD is selected as the Message protocol to create the mail message. Here the payload is in the mail package format, i.e., the header information is used for the e-mail. If the payload is not as per the mail package format the header information is taken from the adapter specific parameters as configured in receiver communication channel.
  • Successfully the mail is generated by mail adapter residing in Adapter engine and is posted to the mail server.

Assumed that entire necessary configuration is in place to trigger an IDOC when the delivery is saved and communication is established between sender and the XI. 

1.      Configurations in the Integration Repository

        Import the IDOC: DESADV.DELVRY03

 

External Definition

We create an external definition by importing the XSD file of Mail Package, which can be obtained through SAP Note 748024.

Download from SAP NOTES and save it on desktop as .XSD file. Import the XSD file to created external definition.

Message Interface

Category is inbound.

Select mail from external Definitions for input message.

Message Mapping:

Interface Mapping:

2. Configurations in the Integration Directory:

  Business System: assumed that it is already configured

  No communication channel is required for sender system as explained in the processing steps.

   Business Service:

         

    Create communication channel for receiver system.

Configure the communication channel of type Mail adapter as explained in the screenshot below.

Note: When we select Use mail Package check box, adapter gets the data from message mapping Mail structure. 

Receiver Determination:

Interface Determination:

Receiver Agreement: 

Activate all the objects and send an IDOC from R/3, customer will receive the mail with delivery status.

Testing Results:

Delivery IDOC is sent from SAP R/3 system and required information is mapped to XSD structure obtained from SAP note in the target message type. The final Mail message is generated as per the content and configurations done in the adapter which is sent to e-mail server.

For the test case the e-mail generated is as follows:

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image