cancel
Showing results for 
Search instead for 
Did you mean: 

Flatfile from sFTP to ABAP Proxy as attachment

jakob_steen-petersen
Active Participant
0 Kudos

Hi

I need to pick up a flat file from sFTP server and parse it to an ABAP Proxy as a attachment. But how can i parse the Payload of the message to the Proxy call?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182412
Active Contributor
0 Kudos

Hi Jakob,

You can use the java mapping which i provided in this thread

Regards,

Praveen.

engswee
Active Contributor
0 Kudos

Hi Jakob

Because you have only 1 file per message, you do not need the additional files setting. Just pick the file normally.

Instead, you will need a custom Java mapping to parse the file content and generate an attachment for the message. Because proxy interfaces expects the main payload in XML format, you can define a dummy structure for the service interface and populate it in the Java mapping. There is an example code by Raghu in the following thread.

Re: plain text file as attachment to inbound proxy.

Regards

Eng Swee

iaki_vila
Active Contributor
0 Kudos

Hi Jakob,

You can read the file as additional files to deal them as attachaments (Configuring the SFTP Sender Channel - SAP NetWeaver Process Integration, secure connectivity add-on ...)

In the inbound proxy you should work with the attachment in the ABAP code. These links could be helpful:

Protocols - Enabling Application-to-Application Processes - SAP Library

Attachments - Enabling Application-to-Application Processes - SAP Library

Regards.

former_member186851
Active Contributor
0 Kudos

Hello Jakob,

One more link for your reference

Proxy with Attachments. | SCN

jakob_steen-petersen
Active Participant
0 Kudos

Hi

But isn´t the "Additional files" used to get more files with same or mostly same name? If i i.ex. have only one file - how should i configure?

former_member186851
Active Contributor
0 Kudos

Hello Jakob.

If you have one file configure one.

If you have multiple give all the file name and enable the optional file option to yes like below

jakob_steen-petersen
Active Participant
0 Kudos

Hi

Sorry i don´t get it: i can have one file i can have 42 - i dont know. I need to get all files in a certain directory on the sFTP server and then pass them as 1 message per file with the file as an attachment.

At the moment when i pull the directory PO will read each file an place the content in the payload of one message per file. But i need it as an attachment instead.