cancel
Showing results for 
Search instead for 
Did you mean: 

File To Mail

Former Member
0 Kudos

Dear SDN Community,

I am just starting with PI and I want to do a file to mail scenario where I am picking up a file from an FTP server and then just forward that file to an email address.

I don't really know what the neccessary steps are yet for this scenario. Do you have any helpful pointers for this scenario?

I started by creating a data type as a simple datatype. Is that correct when I dont want to look into the file but just forwarding it? Or do I need to create a complex data type with one xsd_string element?

I then created the according message type and an service interface for the ftp pick up as outbound and asyncrhonous and just attached the message type.

Next I created a service interface for sending the mail. I set it to inbound and also asynchronous. I assigned the same message type, that I already used for the outbound service interface, since I dont want to do anything with the file. I just want to forward it.

Is this correct?

Also what are the next steps I need to take? I am feeling a little bit overwhelmed doing all that for the first time.

Hope you can give me some helpful pointers.

Best regards,

Arasu

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

guess the major work is done.

You next steps would be in configuring the scenario.

You will have to create a file sender adapter and a mail receiver adapter.

Ref: http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm

to know about how to configure the mail adapter.

Carry on and get back in case u find issues.

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks for your answers, it is working now. I solved the problem by not using a simple type for the data type but a complex type by just adding one subelement.

Regards,

Arasu

Former Member
0 Kudos

Arasu,

Target field is expecting some mandatory mapping, change the occurance and test the mapping. you should be good.

Gud luck,

Regards,

Pavan

Former Member
0 Kudos

Hello,

Thank you for providing the links, those were helpful.

I now created the design and the configuration objects, but I am having a little problem.

For the Data Type I used a simple type with no subelements. Is that correct if I dont want to "look into" the file but just forward it?

I activated the all objects except for the Message Mapping and Operation Mapping. When I try to activate the Message Mapping I am always getting the following error:

Target field mapping '/ns0:MT_File/File' incomplete; reason: Mapping for target field '/ns0:MT_File/File' incomplete.

In the mapping I am just using the data type file twice as input and as output.

What am I doing wrong?

Kind Regards,

Arasu

Former Member
0 Kudos

Do use the pattern tab for mapping same message type from source to target.

after this check the mapping tab for any errors with F7 .

Activate and proceed further ,All the Best

Rajesh

former_member192295
Active Contributor
0 Kudos

Hi,

Follow below steps for file to mail scenario

1. We need to active SMTP service in PI box for mail setup, this one will take care by basis team.

2. Configure source data structure according to your source file structure.

3. Import receiver mail structure from service market place

4. Mapping done according to your requirement.

5. Receiver side mail adapter select SMTP protocol and select package option.

6. If you want send file as attachment, select attachment check box on mail adapter

For more information find below link

/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure

Former Member
0 Kudos

Hi,

I found a couple of links which would help you:

/people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter

/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step

http://help.sap.com/saphelp_nw04/helpdata/en/ad/bf93409c663228e10000000a1550b0/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm

Regards,

Swetha.