cancel
Showing results for 
Search instead for 
Did you mean: 

Using File Name to determine the Receiver

Former Member
0 Kudos

Hi All,

I have to determine the receivers based on the Input file name. I am using the context object File Name in the condition editor. But based on the first 4 characters of the FileName I have to route the file. Can anybody please help how to formulate this expression in the condition editor?

Thanks,

Geetha

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

Hi,

Your Q:

But based on the first 4 characters of the FileName

Q asked in the below thread:

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.

Check this thread:

Regards,

Abhishek.

Answers (8)

Answers (8)

Former Member
0 Kudos

Thanks for the replies! It worked using the CP option.

Geetha

Former Member
0 Kudos

Hi Geetha,

Use Contains Pattern (CP) in the receiver determination.

xpathContains Pattern (CP)First 4 character *.

For more details check the below link.

[http://help.sap.com/saphelp_nw70/helpdata/EN/67/49767669963545a071a190b77a9a23/content.htm]

Regards,

Prakasu.M

prasannakrishna_mynam
Contributor
0 Kudos

Hello Geetha,

You need to specify this in you mapping as in condition editor you can not specify values at runtime. What you need to do is

-> Select the Extended Reciever Determination in ID

->In IR specify the mapping for determining the receiver (You need to use the another mapping for this)

. Here copy the MessageType 'Receivers' from the component as your target MT

SAP BASIS 7.0 (Depends on your version)-> "htt://sap.com/xi/XI/System" namespace.

. Define Message Mapping between Outbound Message Type(The one with your filename) and

Standard Message Type u201CReceiversu201D which is as Inbound message type and which is in the SAP

BASIS -->http://sap.com/xi/XI/System

. In mapping specify your service based on your First 4 character of your file name(Use SubString)

IF filename -> SubString(0,4) ->Equals ->   filename -> SubString(0,4)  Then  Select Your Service  ( Service in Constant value). ELSE (your logic)

Once you finish this remaining as usual in IR, while InterfaceMapping you select two mapping programs.

Remmber to use the Extended Interface Determination in ID, This resolves your issue.

Regards,

Pasanna

jagesh_lakdawala
Active Participant
0 Kudos

Hi Geetha,

Refer this Thread, it is exactly same as your requirement.

Thanks & Regards

Jagesh

Former Member
0 Kudos

u have to use adapter specific message attribute in the communication channel and write the UDF

this link provide the step by step guide

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516]

a very good link

Shabarish_Nair
Active Contributor
0 Kudos

to create your xpath ref - /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

in your case you will use the context object and the substring xpath function

http://www.w3schools.com/Xpath/xpath_functions.asp

former_member732072
Active Participant
0 Kudos

Hi Geetha

Please have a look at the following link and see if it helps

Best Regards

former_member581827
Participant
0 Kudos

Hi,

You can you use xpath and selecting the source field where you will be getting name and use substring (0 to 4) to get first four characters.

Regards,

Chandra