cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Comm Channels to 1 Receiver, all same interface & mappings

Former Member
0 Kudos

Hi !

We have a File(ftp)->XI->RFC (async) scenario.

We have only one message type.

The input files are located on 3 different folders, they come from 3 different legacy systems. We need to ARCHIVE each file in a subfolder inside the source folder.

e.g.

source folders:

/interface/sys1, /interface/sys2 and /interface/sys3

archiving folders:

/interface/sys1/arch, /interface/sys2/arch and /interface/sys3/arch

We know that we can monitor all 3 folders from same communication channel, but we cannot archive each file in a different folder. So we need 3 different comm channels.

With this scenario, how could we solve the configuration objects? because we cannot make 3 Sender Agreements from the same Business Service/System + Message Interface. If we multiplicate the Message Interface, just to have 3 copies of the same, we need also 3 interface mappings, 3 of every configuration object? or is there any way to reuse anything ?

Thanks,

Matias.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

It is better to use dynamic folder choose in receiver side , see below code

String newfilename="";

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

// Get Sourcefilename

String oldfilename=conf.get(key);

//extract first 3 chars of source filename

newfilename=oldfilename.substring(0,2);

//get the date

java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );

dateformat.format( new java.util.Date() );

//append sourcedateL

newfilename=newfilenamedateformat"L";

// determine if prod/ dev / qa

map = container.getTransformationParameters();

senderService = (String) map.get("SenderService");

if(senderServcie.equald("Prod"){

newfilename=newfilename+"P";

}

// change to new file name

conf.put(key, newfilename+".tmp");

Also see the below links

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

Regards

Chilla..

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks.

Former Member
0 Kudos

Hi Mathais,

If u use 3 comm channels, its possible to 3 sender agreements for each of the comm channels. When u create a sender agreement, just put '*' in the sender service and the sender interface input fields. In this way u can creat 3 sender agreements.

Regards,

Akshay

Message was edited by:

Akshay Salunke

Former Member
0 Kudos

I think it will throw an error if you put ' * ' from SP16

Regards

Sreeram.G.Reddy

Former Member
0 Kudos

Hi Sreeram,

It wont......u can just try it out and check......

Regards,

Akshay

Former Member
0 Kudos

Hi Akshay !

I just tried it, but in the Create Object window for creating the Sender Agreement, it says :

Value "*" is not permitted in field Sender Service.

Thanks

Matias.

Former Member
0 Kudos

Hi Mathias,

Oh is it.....coz u can check the following link

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm</a>

It says u cannot use '' in the sender service, but int the end, it is shown a table with '' in the sender service.

Newyas u can also go for creating Business services rather than Business systems. You can create 3 Business services for the file sytems. I mean this is a workaround...but u can probably think of this...

Regards,

Akshay

Former Member
0 Kudos

Akshay,

this wont work from SP 16 onwards i think i told in mail to you also.

regards

Sreeram.g.Reddy

Former Member
0 Kudos

Matias,

We know that we can monitor all 3 folders from same communication channel, but we cannot archive each file in a different folder. So we need 3 different comm channels.

No need to have 3 Communicatin channels have only one Communication channel

your problem can sloved by using command line arguments in file adapters

write a batch file or script if use unix

in that batch write copy command to place in target source floders

Regards

Sreeram.G.Reddy