cancel
Showing results for 
Search instead for 
Did you mean: 

File to different SFTP Folders

mayank_yadav
Explorer
0 Kudos

Hi,

I have a scenario in PO(PI 7.4) where PDF files are to be picked up from SAP ECC

through File(NFS) channel and posted to 3rd party system through SFTP channel.

Theres no party to party communication involved, and Files are picked up from 6 different folders at al11 .

And these PDF files are to be placed at SFTP server with the same name at their resp foldersas shown below.ASMA properties selected in both channels.

FILES                        Countrywise Folders

INVOICE_SA                     SA

INVOICE_ZIM                    ZIM    

CREDIT_KEN                    KEN

CREDIT_OTHERS             CrossBorder countries

Statement_ZAM                ZAM  

                                 

There are no ESR objects involved and ID part is configured with dummy namespaces and interfaces in ICO,I tried using DynamicConfigBean in SFTP recver channel but the problem that how the files meant for their resp country folders will be pushed and not in wrong SFTP folder.

Different parameters tried in above adapter module are "write", "read", & "insert". But still I have doubt that

at runtime the Files be pushed at right folder. Is there any simple way of achieving this without creating java mapping & ESR objects.

Please share some simple and less time consuming idea .

Accepted Solutions (0)

Answers (3)

Answers (3)

iaki_vila
Active Contributor
0 Kudos

Hi Mayank,

In my opinion alternative is the easiest and most maintainable option. You have another options like to use OS command and depending the name you do a move option to its folder, but to develop a OS batch file and to maintain it, not will be easy. Also you can do your own adapter similar than Amit Srivastava  one that he shows with the FTP adapter , unfortunately could be difficult to maintain it and to work with shh libraries. Dynamic configuration is not an option because you will need ESR development, a mapping to change the target path dynamically.

Regards.

Former Member
0 Kudos

Hi Mayank, I suggest to write the adapter module for that or the JAVA mapping.

Please refer the blog I have written....Multiple target directories dynamically using J... | SCN

former_member183816
Active Participant
0 Kudos

Please try the configuration as explained for Q7 in this link at your sender channel,

http://wiki.scn.sap.com/wiki/display/XI/Sender+File+Adapter+Frequently+Asked+Questions

For receiver,

http://wiki.scn.sap.com/wiki/display/XI/Dynamic+file+name+and+directory+in+Receiver+File+Adapter+-+s...

I don't think so it's possible without mapping or custom module because somewhere you have to write the logic to decide folder paths and file name based on incoming file name.

If you don't want to create ESR objects then go for custom module.


Also if you don't have any problem using multiple channels, then i think you can design an interface split Iflow (based on file name as condition ) to achieve this. Not very clear about this.Haven't tried it before.

former_member193376
Active Contributor
0 Kudos

Yes you can achieve this without any ESR or Java mapping, i had a similar requirement.

for every folder, i had a separate channel and receiver agreement.

In the interface determination step you have to add the conditions where "filename" = "xxxx" then add your service interface. have your receiver agreement with that service interface. This is as per 7.1. In your case you will have to do all this in your Integrated Config in 7.4.

Note: do not do this in the receiver Determination step as it will not work correctly. Only 1 file will be processed incase there are more than 1 file picked at a time.

Regards,

Saiyog

varun_goel1
Explorer
0 Kudos

Hi Saiyog,

We have a similar requirement of reading 3 different files from a single source folder and without using any mapping/ ESR objects files to be placed in different folders at receiver end.

3 Files placed in single folder at Sender -> PI -> File 1.txt - Folder1

                                                                        -> File 2.txt - Folder2   

                                                                         -> File 3.txt - Folder3

We tried the same option of using dummy sender and 3 different dummy receiver interfaces in ICo with conditions as Filename = File1.txt ...etc. But getting an error

Error - com.sap.aii.aapter.xi.routing.RoutingException: InterfaceDetermination did not yield any actual interface. Could you please kindly suggest.

Thanks in advance

former_member193376
Active Contributor
0 Kudos

Please check if the dummy interface names are all matching correctly. I mean they should be the same name used at different places.

Regards,
Saiyog