cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the selection of a File Sender CC at runtime

Former Member
0 Kudos

Hi,

We're setting up the following flow:

PI transfers files to directory, puts the filename into a table with a date, etc.

On requests from R/3 specific files should be sent to R/3, though they should pass over PI so we have monitoring, we can't just copy the files from directory to directory using some ABAP coding ... What I was thinking of doing is making a second File Sender CC and then when R/3 requests a specific file, change the selection of the CC to be equal to the filename, so just that filename is transferred.

Is this possible? And how?

Kind regards,

Frederik-Jan.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Using a workaround

Shabarish_Nair
Active Contributor
0 Kudos

i think wht u need is to maintain the filename when it is send from source to target. is it so?

Do refer these blog so that you will have an idea its relatively very simple and can be achieved with just one CC

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

/people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

Former Member
0 Kudos

I think I didn't explain myself correctly, I'm not interested in mainting the filename.

I'll give an example:

I have a directory with three files:

file1_20090101.xml

file2_20090101.xml

file3_20090101.xml

I want to pick up JUST file2_20090101.xml without touching or moving the other two files.

That file I want to send to another directory.

So the result will be:

file1_20090101.xml

file3_20090101.xml

How would I go on implementing that? I was thinking of changing my File Sender CC to just pick up files with the following name: file1_20090101.xml. But how do I change it at runtime?

Kind regards,

Frederik-Jan.

Former Member
0 Kudos

Hi,

See if the patten of your file names are as you gave in your example. Then you just need to give "File2*.xml" in the Sender File CC.

It will pick all the file with file name File2*. xml. In that case you need only one sender CC.

Regards,

Shweta.

Former Member
0 Kudos

Yes, obviously ...

How do I change it at runtime using ABAP code, Java code, XSLT, Mapping values, etc.

So, after I picked up file2 etc. I want to pick up file3. How do I change the CC in a way that can be triggered from R/3 or PI?

Edited by: Frederik-Jan Roose on Aug 6, 2009 10:55 AM

Former Member
0 Kudos

I think this blog can solve your problem..

/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter

Former Member
0 Kudos

I know how to EVERYTHING I described already, within the Communcation Channel.

How do I do it AT RUNTIME?? How do I CHANGE the CC AT RUNTIME??

Edited by: Frederik-Jan Roose on Aug 6, 2009 11:00 AM

Former Member
0 Kudos

I'm just going to use a work-around as it is impossible to change CC settings at runtime.

I'm going to have a second folder where I pick up everything, and use an ABAP Function Module to move the file from the original directory to the second folder where I pick up everything. That should mimick the functionality I need.

Kind regards,

Frederik-Jan.

former_member187339
Active Contributor
0 Kudos

Hi Fredrick,

I guess there is no straight forward way to acieve this. You may try something like this:

1. RFC will provide the Filename to XI and correspondingly XI needs to read and move (or write the same files again) to some separate directories.

2. Do the required mapping on the moved files.

Regards

Suraj

Former Member
0 Kudos

Hi,

Your requirment is not very clear to me. But in case you want to have 2 sender File cc then configure two file sender service.

and accordingly configure the senerio in ID.

Regards,

Shweta.