cancel
Showing results for 
Search instead for 
Did you mean: 

Scenario - Reading a Mail and sending the content to RFC

Former Member
0 Kudos

Hi,

I have a simple scenario of reading a mail and sending the content to RFC. I need a step by step approch how to configure this scenario. Appreciate the help.

Reagrds,

Manas

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Do the folliowing

1. Import the RFC you want to send data (Inbound interface)

2. Create inteface for Mail that you need to read (Outbound interface)

3. Create mapping between Mail and RFC(Message and Interface mapping)

4. Configure Pipeline steps

5. Configure sender mail adapter

6. Configure receiver RFC adapter.

Refer already build blogs

Thanks

Gaurav

Former Member
0 Kudos

Hi Gaurav,

Thanks alot for your reply. Still i am not sure about the 3rd point . I am quite new to XI, so very less idea how to mapp the interfaces and messaging. It will be of much help if you can

forward any docs or links showing all the steps in details.

Regards,

Manas

Former Member
0 Kudos

Hi

Refer to the blogs i provided that will help

Message Mapping blog

/people/bhanu.thirumala/blog/2006/02/02/graphical-message-mapping-150-text-preview

Mail and RFC

Dynamic mail address

Thanks

Gaurav

Former Member
0 Kudos

Hi Gaurav,

Can you tell me the steps i need to do at design time ?

Which is the in bound and out bound interface ? And how to do the massage and interface mapping ? I am confused how to do thses steps.

Regards,

Manas

Former Member
0 Kudos

Hi Renu

You can use Mail package as Outbound interface. Check the basis component you can get Mail package there.

RFC when you import you can use that as Inbound interface.

Map Outbound to inbound interface using MM and IM

Use mail sender adapter to pick the mails from the Mail server.

Use RFC receiver(or any you want like FILE,IDOC etc) to send email content out of XI

Thanks

Gaurav

Former Member
0 Kudos

Hi Gaurav,

Thanks a lot. I am getting the following exception

com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns1:ZIB_PROCESS_CSV_FILE/FILE_CONTENT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at

I did the following configuration in design time

1- Created MI_IB_MAIL_OB , which points to external mail. I imported the mail package xsd file through external defination

2- Created MI_IB_RFC_IB, which points to the RFC as type message

3- I ahve not create any Data type or message type, as already i mapped message intergace directly to RFC and Mail package

4- In the message mapping, i mapped the external mail type to RFC.

5 - In interface mapping , i mapped the MI_IB_MAIL_OB to MI_IB_RFC_IB , with mapping program as the name of the message mapping .

6- I configured both RFC and Mail Sender adapter in the configuration page.

After all these configurations i got the exception as metioned above. Its properly reading the mail .Let me know if i have done any thing wrong in the mapping part

Thanks a lot,

Manas

Former Member
0 Kudos

Hi Renu

use Test feature in Message mapping. Does it show the same error.

IF so then can you share the structures of RFC and Mail you are trying to map to solve furthur

Thanks

Gaurav

Former Member
0 Kudos

Hi Gurav,

What is Test feature to put in message mapping ?

Out of the mail i only need the body content to pass to the RFC.

Other parameters in RFC are constants. I dont map all elements from mail to RFC, except content.

My RFC structure

-


ZIB_PROCESS_CSV_FILE (RFC name - root element)

DOC_LOAD_DATE- element of type Date

DOC_LADE_TIME - element of type Time

EP_FILE_NAME - type string

File_CONTENT - type string

File_NAME- tyep string

Partner_ID - type string

User_ID - type string

Mail Structure

-


<xim:Mail xmlns:xim="http://sap.com/xi/XI/Mail/30">

<Subject>RE: consignment</Subject>

<From> </From>

<To></To>

<Content_Type> </Content_Type>

<Date></Date>

<Message_ID</Message_ID>

<Content> </Content>

</xim:Mail>

The Mail package xsd file through external definations

-


only i am using the Mail part in the xsd file

<?xml version="1.0" encoding="ISO-8859-1"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xi="http://bajajauto.com/IBNEW" targetNamespace="http://bajajauto.com/IBNEW">

<xs:element name="Mail">

<xs:annotation>

<xs:documentation>

Mail package for XI - Mail Adapter

</xs:documentation>

</xs:annotation>

<xs:complexType>

<xs:sequence>

<xs:element name="Subject" type="xs:string" minOccurs="0" />

<xs:element name="From" type="xs:string" minOccurs="0" />

<xs:element name="To" type="xs:string" minOccurs="0" />

<xs:element name="Reply_To" type="xs:string" minOccurs="0" />

<xs:element name="Content_Type" type="xs:string" minOccurs="0" />

<xs:element name="Date" type="xs:dateTime" minOccurs="0" />

<xs:element name="Message_ID" type="xs:string" minOccurs="0" />

<xs:element name="X_Mailer" type="xs:string" minOccurs="0" />

<xs:element name="Content" minOccurs="0">

<xs:annotation>

<xs:documentation>

any type

</xs:documentation>

</xs:annotation>

</xs:element>

</xs:sequence>

<xs:attribute name="encoding" type="xs:string" />

</xs:complexType>

</xs:element>

<xs:element name="MailReceipt">

<xs:annotation>

<xs:documentation>

Mail Receipt for XI - Mail Adaper

</xs:documentation>

</xs:annotation>

<xs:complexType>

<xs:sequence>

<xs:element name="Server" type="xs:string" />

<xs:element name="Format" type="xs:string" />

<xs:element name="UseMailPackage" type="xs:boolean" />

<xs:element name="Encoding" type="xs:string" />

<xs:element name="Subject" type="xs:string" minOccurs="0" />

<xs:element name="From" type="xs:dateTime" minOccurs="0" />

<xs:element name="To" type="xs:string" minOccurs="0" />

<xs:element name="Date" type="xs:dateTime" minOccurs="0" />

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

Let me know if all are configured properly

Regards,

Manas

Edited by: Renu Nair on Oct 18, 2008 8:29 AM

Former Member
0 Kudos

HI

Test feature is nothing but the test tag

When you check your mapping in test tag is it showing some error. In case no then you have issue with RFC only. First figure is it really a mapping error. As you are using almost constants it should not give error.

Check once doing a test and see all target nodes are generated as per your requirement.

Thanks

Gaurav

Former Member
0 Kudos

Hi

follow these blogs how to configure the mail and rfc adapter

Regards

Sridhar Goli