cancel
Showing results for 
Search instead for 
Did you mean: 

File to ABAP proxy as attachment

Former Member
0 Kudos

Hello PI expert,

I have requirement to FTP file from FTP server to ECC server. But because of some security, we can not get FTP permission on ECC server.

What i want to do is, get the file from FTP server as it is, and send it using abap proxy as attachment. I don't want to do any content conversion or xml conversion because I want to transfer file as it is.

Any suggestion.

Thanks,

Accepted Solutions (0)

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos
Former Member
0 Kudos

Bhaskar, Please read my questions properly. This is from File to proxy.

question here is how to get file as attachment. I am using SFTP server to pick up the file.

former_member181985
Active Contributor
0 Kudos

Hi,

if your PI version is at least "SAP NetWeaver PI 7.1 SP3"

create sample Data type structure with one node and one field, and use this for both proxy and file service/message interfaces.

Pick the file from FTP. No graphical mapping. Use Java Mapping. Read the input stream and create an attachement from this and attach it to the message. pass some static values for the output (proxy) structure using output stream. Thats all.

http://help.sap.com/javadocs/pi/SP3/xpi/index.html


Methods:-
com.sap.aii.mapping.api --> OutputAttachments --> create(String contentId, byte[] content) / create(String contentId, String contentType, byte[] content)