cancel
Showing results for 
Search instead for 
Did you mean: 

retrieve some files via FTP and put them to local XI filesystem only

Former Member
0 Kudos

Hi everybody

I'm facing a new challenge (for me) on XI.

We have to retrieve some compressed files (ARJ) from a remote host via ftp. The source directory and file names remain always the same but get updated on the remote host every 14 days. The source files are compressed (ARJ).

I'd like to get those files, unarj (uncompress) them and just store them to a directory on XI's local file system. The directory name should be dynamically determined based on the timestamp of the file.

Is there a simple way on XI to achieve this (using the file adapter)? For now, we don't have to process the file content itself (but maybe in near future) and we do not need to do a message processing... just get them and store them (uncompressed) to the target directory.

Does somebody have a neat idea how to solve it on XI? Or is XI simply not the right tool for such requirements?

TIA for some input.

Kind regards,

Renaud

Accepted Solutions (0)

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

It should be possible.

As you want to pick a file and then send the same file to your XI system, this is what you should do,

1. Create a dummy datatype.

2. Create a message type with the dummy datatype.

3. create 2 message interfaces -- 1 outbound and 1 inbound. Also, The message interfaces should have the message type of step 2.

No message mapping and interface mapping.

In your Receiver File adapter, just give the Directory and path of the Location where you want the file to be dropped.

make sure you have Create selected in the File adapter.

For the same file name from Sender to Receiver, you can use Adapter Specific Identifers --> FileName , Directory.

To uncompress the files, you can write an OS command in the Reciver File Adapter that will after creating the file, uncompress the same.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh

Sounds easy... thanks you very much for the quick response!

What should I specify as file name schema in the receiver file adapter?

And: in the sender file adapter there's an adapter specific message attribute (identifier?) called "SourceFileTimeStamp". Is this one also available in the receiver file adapter so I could use it to determine the target directory name?

Are filenames and paths passed 1:1 from sender to receiver file adapter? How and where to access this information?

Sorry to ask probably idiotic questions, but I still have some difficulties to understand the concepts here.

Kind regards,

Renaud

bhavesh_kantilal
Active Contributor
0 Kudos

Hi renaud,

Which SP are you on?

From Sp14 onwards this feature ADAPTER SPECIFIC IDENTIFIERS is available. You should select this in both your sender and reciver.

http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

Take a look at this link --> Adapter Specific message attributes.

Also, take a look at this blog,

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh

We're on SP16. Will read through your links and then do some tests in order to get a better feeling of it. Will report results back when done.

One thing I've already seen is, that SourceFileTimeStamp doesn't seem to be part of the adapter specific identifiers on the file adapter RECEIVER side...

Thanks again for your help.

Best regards,

Renaud

Former Member
0 Kudos

Hi Bhavesh

Was able to solve it! Thanks for your help...

See post . There I tried to describe what I've done / configured in order to get it up and running.

Kind regards,

Renaud