cancel
Showing results for 
Search instead for 
Did you mean: 

Using File/FTP adapter to send multiple files from different sources

Former Member
0 Kudos

What is the best approach in sending multiple files from different source directories to different destination directories.

example: I have sources directories called: /usa/temp and /britian/temp.

I want to transfer all xml files from source directory: /usa/temp/.xml to destination directory: /usa/incoming/.xml

and source directory: /britain/temp/.xml to destination directory: /britain/incoming/.xml.

I am using the XiPattern1 interface in SAPBasis namespace in ESR.

I successfully create an integration scenario with comm channel, sender and receiver agreements, interface and receiver determinations for the /usa/temp directory and works. However when I create another scenario and I try to use the same pattern It does not work. It says I have a duplicate sender and receiver agreements as well as interface and receiver determinations.

What is best approach to do this.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

For creating a Sender Agreement, you need to have a unique combination of

Business Service + Interface Name + Namespace.

In you case, since in you first case, you have already used the XIPattern1 interface with the same sender system, you are getting the "duplicate" error message. Same is applicable to the receiver agreement and other objects of ID.

Hope I have cleared you doubt.

Thanks,

Pooja

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Oko

As said above you can achieve this using ID itself no need to implement XI pattern. If you are not making any modifications to file content then you need to think of IR.

Moreover you can read files from multiple directories on the same server location using exclusion mask. This will make your work easier. With this you can set the same file name using ASMA follow the blog given by Jayson.

Thanks

Gaurav

Former Member
0 Kudos

Then how do I send these multiple files from source multiple directories to multiple destination directories.

Former Member
0 Kudos

Hi Oko

As i said above that from same server you can pick multiple files using exclusion mask. only transfer of file need not to have IR steps

This should be helpful

At receiver you may need to have multiple channels to place files in various directories.

Here if you have to use IR then variable substitution is the best choice for you. That allows dynamically selection of target directories, file name etc using single CC

http://help.sap.com/saphelp_nw04s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

Thanks

Gaurav

Former Member
0 Kudos

If you have two scenarios for your two source directories, you can put the files into two different target directories correspondingly without any issue.

As Gauve said you can also archive it with one scenario, but then you probaly need message splitting, and based on the receiver interface you put the file into different target folder. Anyway, in this case you need to work in ESR / IR.

Former Member
0 Kudos

As Pooja said, you only need to ID work, not ESR work is needed if you just need to move files around.

In your case, two scenarios are needed, one for USA, one for Britian, specify different dummy interface name and interface namespace in the two scenarios.

Since you are moving multiple files, I guess you want to keep the same file name in the target system, see blog for how to use the same target file name as source file name.

Jayson

SudhirT
Active Contributor
0 Kudos

Hi,

this can be done in one scenario.you can use exclusion

mask option in file adapter and give the names of two directories and file names under file mask. for receiver side i think you'll need two comm. channel with different directory names.

thanks.

Former Member
0 Kudos

Hi,

The best way to send files from one FTP directory to another directory using PI is to create only ID objects

Check out this link :

Thanks,

Pooja