cancel
Showing results for 
Search instead for 
Did you mean: 

Proxy to Sftp with mail.

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Experts,

Now i have an runnning interface where data is coming from Proxy and is converterd into .CSV file with Dyanimc filename i.e from one of the filed and is being placed in SFTP now this interface is wokring fine no issues.

Now additional to this we have a requirement that the data which is already being sent through proxy should be sent to mail as spreadsheet.

For this i created a new Mail Comm channel and a tried using payloadSwapBean and other module but in each case i get untitled.xml as an attachment.

Can you please suggest how would i acheive this ?

Br,

Manoj

Accepted Solutions (1)

Accepted Solutions (1)

markbernabe
Active Participant
0 Kudos

Hi Manoj,

Have you tried section 3.2.4 in this document?

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0964d7c-e66e-2910-24bb-ac535e4a5...

Or try this module configuration

Mark

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Mark,

I check the doc but i didnt get answer .

In my case attachemnt is going but it is going as untitled.xml with content of payload.

But my requirement is to convert that payload into spreadsheet/csv file then send that file as mail attachment.

Br,

Manoj

markbernabe
Active Participant
0 Kudos

Hi Manoj, Do did you split your scenario into 2 interfaces? 1. Proxy -> PI -> SFTP 2. SFTP -> PI -> Mail I did something similar before but the CSV file is sent as attachment to the proxy. So there's no FCC in the SFTP, just plain file transfer using PayloadSwapBean. Then I have another receiver for Mail. Mark

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Mark,

But in my case i dont want to go for another interface ,

I wanna know whether the payload can be converted into CSV file and send the same to mail as an attachment.

Br,

Manoj

markbernabe
Active Participant
0 Kudos

Hi Manoj, Have you tried this conversion type of MessageTransformBean? http://wiki.scn.sap.com/wiki/display/XI/How+To...Content+conversion+module+with+J2EE+JMS+adapter Mark

Former Member
0 Kudos

Mark is right.

And I think, your solution will work, but you have to specify many more parameters for the CSV-conversion. You'll find them in the link.

Basically, you got to specify which XML-nodes will go in which order to CSV-columns.

Additionally, you got to make sure, that your Payloadnames are correct (my_attachment), otherwise the Swap won't work.

You can see everything in the channel monitor.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Manoj

You have to use mail package if you want to generate the email attachment name dynamically.

You have fill up these three fields for dynamic attachment name

Content Type:  text/xml

Content Description:  indratest.txt

Content Disposition:   attachment;filename="indratest.txt"

The data which will be sent in the email has to mapped in the field 'Content' in mail package.

Let me know if you have any doubts.

Thanks

Indrajit

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Indrajit,

Dyanmic filename is okie , i can think of that later .

But any idea how to convert the payload from proxy to CSV file and send the same as an attachment.

Any module which can be used in Mail adapter to convert payload ?

Br,

Manoj