Skip to Content
0

File to SFTP passthrough multiple sources multiple destinations

Aug 25, 2017 at 03:35 PM

140

avatar image

So I've got a scenario where ive got 5 different folders to pick .txt files from, I mean to use passthrough to pass them to a similar structure on a sftp receiver.

I've enabled asma and want to use dynamic configuration to carry across the filename&directory structure when passing to sftp, but I don't have the source files mapped at all as is a passthrough. How can I carry / use the dynamic config to do this?

Many thanks

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

4 Answers

Evgeniy Kolmakov Sep 12, 2017 at 03:15 PM
0

Hi George!

File and SFTP adapters use different namespaces for its ASMA attributes by default. So simply change the ASMA attributes namespace in SFTP receiver adapter's properties to http://sap.com/xi/XI/System/File.

Regards, Evgeniy.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Its picking them up, I've set the adaptor to try and create the folders/files but I don't have permission on the server we're posting to.

Unfortunately, I've been told we have to send to a specific structure hence I think we'd need a module to do this. Anbody know of such a module?!

0
Rudra Singh Aug 28, 2017 at 10:59 AM
0

Hi George,

I don't think , this scenario is possible in PI with single pass through scenario.

so you can create java dummy mapping and try to read folder path and then put the files in same folder . or you can create multiple pass through scenario for each different directory.

Warm Regards,

Rudra

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

I've had to create individual scenarios for each folder, just seems a bit messy !

0
Manoj K Aug 28, 2017 at 11:10 AM
0

Hi George ,

Yes this is possible just enable the ASMA paramters in both sender and reciver sftp channel however the dynamic namespace may differ this you can handle by givng the same namespace in sftp channel as that of file channel OR you may use dynamic configbean to assign file parameters to sftp parameter .

And for picking from multiple directory use 'Advanced file selection ' in ur sender channel.

Br,

Manoj

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Do you know of any guides to do this Manoj?

0

Where exactly you are struck ? If possible can you provide your screenshot of your sender/Receiver channel along with Run time Dynamic values can assist further.

This is what you to do:

1.In your sender Channel enable " Advanced file selection " in this mention the folder paths along with filename as *.txt for each. And also enable ASMA for both FileName and Directory.

2.I am assuming you have the same folder structure too in sftp server if yes then just enable "ASMA" for both filename and directory. Check in Runtime under which namespace your dynamic config assgined by your sender channel and use the same namespace in your receiver SFTP channel.

Br,

Manoj

0
George Applegate Sep 12, 2017 at 02:58 PM
0

Hi Manoj


With multi source and multi destination is where im getting the issue. It doesn't seem to pass to the required destination path. I get the error in mesmon"

using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: javax.resource.ResourceException: java.lang.Exception: *.*/ does not exists" id="CEPJICNK.MsgDetailedView.TextKey_editor.25" style="white-space: normal;" ti="0" ct="TV" lsdata="{0:'Transmitting\x20the\x20message\x20to\x20endpoint\x20\x3clocal\x3e\x20using\x20connection\x20File_http\x3a\x2f\x2fsap.com\x2fxi\x2fXI\x2fSystem\x20failed,\x20due\x20to\x3a\x20com.sap.engine.interfaces.messaging.api.exception.MessagingException\x3a\x20javax.resource.ResourceException\x3a\x20java.lang.Exception\x3a\x20\x2a.\x2a\x2f\x20does\x20not\x20exists',11:true}" bresettabindex="true">Transmitting the message to endpoint using connection File_http:// sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: javax.resource.ResourceException: java.lang.Exception: *.*/ does not exists'

So the destination path differs for the different files but you can only specify the one destination ! Attached is my config of sender/ destination. cusersgeorge-applegatedesktop1.pngcusersgeorge-applegatedesktop2.pngcusersgeorge-applegatedesktop3.pngcusersgeorge-applegatedesktop4.pngcusersgeorge-applegatedesktop5.png


Share
10 |10000 characters needed characters left characters exceeded