cancel
Showing results for 
Search instead for 
Did you mean: 

file name based routing in Receiver determination

Former Member
0 Kudos

Hi experts,

I have a requirement to do receiver determination based on file names which are dynamic.To put it clearely, i will be having two files in my source File location and i need to route it based on the file name to two target systems.

The file name are like Month(changes everymonth)_TargetSys1 and month_targetSys2.

I dont need any conversions ,so i am not using any IR objects.

To pick files i kept *.txt in sender channel, and in receiver determination condition i was trying to use context object called 'Filename'.But it doesnt work asthe file name changes every month.

Is there any option to take substring from the input file name (say targetSys2 from month_targetSys2.) and put it as a condition for receiver determination.

There is not DT or structure of the incoming file , as there are no modification to be done with the content.

Regards,

Anika

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi all,,

there is something called context objects in receiver determination condition editor.there are predefined parameters like file name , size ,timestamp,filetype etc.

i used file name and specified the file name for correspondig receiver service.

This solved my prob,hope this will be helpful to you also.

regards,

anika

Shabarish_Nair
Active Contributor
0 Kudos

of course.

use xpath /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination and use xpath function substring http://www.w3schools.com/Xpath/xpath_functions.asp#string

Former Member
0 Kudos

For using xpath in receiver determination we must have a source structure,in my case i am nt defining any DT in IR to take Xpath to any feild.Its direct pic and Place added to that is routing based on file name.Is it possible to use xpath even if we dont have defined IR objects?

regards,

Srinivas

Shabarish_Nair
Active Contributor
0 Kudos

you need to have the structure in case you want to route it via the xpath.

Else another option is to code the enhanced receiver determination and using a java mapping with dynamic configuration read the filename and then dynamically create the receiver determination.

http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/content.htm

Former Member
0 Kudos

How we can create the receiver determination dynamically?.

Shabarish_Nair
Active Contributor
0 Kudos

something like this - /people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16