Skip to Content
0

PO Proxy binary files --> sftp scenario

Nov 30, 2016 at 01:56 PM

148

avatar image
Former Member

Hi,

We have a report, that is creating two files (pdf & xml) which should be sent via SFTP to a target system. As it´s ABAP reports, I would like to avoid the files on SAP side and create a proxy, to which the binary file data can be sent then.

So my idea is to create an interface (and generate the proxy), which has one or more elements for the file and each of them has an element for the filename and an element for the binary file content (base64Binary).

I would go for Java mapping and would like to create a file on the target system via the SFTP adapter, for each file element (which has the filename and the binary filedata as elements).

How can this be done the best way? Do I need to call the proxy for each file or can I do that with one proxy call and then design the mapping the way, that the SFTP adapter creates the files?

Thank you & best regards,

Arne

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Manoj K Nov 30, 2016 at 03:25 PM
1

Arne,

Why dont you just send the XML file as main payload and the PDF as proxy attachment.

Br,

Manoj

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks for the help. I found an example.

0
avatar image
Former Member Dec 01, 2016 at 03:46 AM
2

Hi Arne,

  • For dynamic file name for XML file you can use DynamicConfiguration in message mapping or if you have the file name in the one of the field in XML then you can use variable substitution.

Reuse FunctionLibrary for DynamicConfiguration and Message Header Attributes

  • If you set the file name for PDF attachment already in the proxy then you can enable the check box store attachments then attachments also will write in target directory.

To keep the same file name use below parameter under Advance Mode section as additional parameters in SFTP receiver channel.

Parameter Name : retain.attachment.name

Parameter value : true

Regards,

Praveen.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you very much, Praveen! That was really helpful!

0
avatar image
Former Member Nov 30, 2016 at 04:13 PM
0

Hi Manoj,

this sounds like a good approach. I haven't done that much with PI the last years, so I was not sure how to do this.

So when I send the XML file in the payload and the PDF as attachment, how should the outbound interface and the inbound/file receiver side look like? Somehow I would also need to set the file names dynamically.

Thank you for your advices.

Share
10 |10000 characters needed characters left characters exceeded