cancel
Showing results for 
Search instead for 
Did you mean: 

File to SFTP passthrough multiple sources multiple destinations

former_member233999
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member190293
Active Contributor

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.

former_member233999
Participant
0 Kudos
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?!

former_member233999
Participant
0 Kudos

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 <local> 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

manoj_khavatkopp
Active Contributor
0 Kudos

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

former_member233999
Participant
0 Kudos

Do you know of any guides to do this Manoj?

manoj_khavatkopp
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

former_member233999
Participant
0 Kudos

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