cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver Determination condition editor

former_member452321
Participant
0 Kudos

Hi

I am having the following issue in receiver determination .

I need to check primarydocrefnum starts with 65  will go to file reciver and not start with 65 will go to IDOC . This condition is working fine with the following syntax for both the receivers

/p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:PrimaryDocuRefNum[not(starts-with(.,"65"))]  for idoc

/p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:PrimaryDocutRefNum[(starts-with(.,"65"))]  for file

I used EX for both and it worked for above conditions for respective receivers

But I need to add one more .Our sourcesystemid examplle  T120-TEST

If the source systme Id ends with TEST and if satisfies first condition ,it shoudl send for  the respetive receivers else ignore

I tried with following options and none of them worked

/p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:SourceSystemID[(ends-with(.,"TEST"))]     

                    

2)

/p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:[substring(SourceSystemId,6,9)="TEST"]  (id may not be always 5chars before -.I just tried

I tried with single quotes also. Any other options for this.I tried with substring 5,8 also

After adding the above 2nd condition I am getting receiver could not be determined

Is there any syntax avaliable ?

Thanks for your help

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member452321
Participant
0 Kudos

This worked without any substring or contains.It worked with content pattern

p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:SourceSystemID

*TEST with content pattern

Thanks

Mahesh

Harish
Active Contributor
0 Kudos

Hi Mahesh,

Also try with contains xpath function.

/p1:OrderResp/p1:Control/p1:DocumentIdentification[(contains(SourceSystemID,'TEST'))]

please also define the Prefix p1 in the condition editor so you do not need to define it before every node in expression.

hope this help.

Harish

former_member452321
Participant
0 Kudos


I tried that too;

/p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:[string-contains(SourceSystemID,"TEST")]] it didnt worked .I tired double quotes and single quotes

It didnot find the receiver

Thanks Harish

Harish
Active Contributor
0 Kudos

Hi Mahesh,

Did you tried removing the prefix and update that in condition editor prifix space?

Regards

Harish

former_member184720
Active Contributor
0 Kudos

did you try above suggested??

former_member452321
Participant
0 Kudos

sorry . I didnot get your point here Harish. Which prefix I need to remove here.

Harish
Active Contributor
0 Kudos

Hi Mahesh,

Please find the below screenshot, you need fill prefix and namespace in that

If you fill the prefix, then you don't need to put them in expression.

Regards,

Harish

former_member452321
Participant
0 Kudos

that is filled already.filled by default prefix P1 and namespace. So do I need to remove P1 in xpath?

Harish
Active Contributor
0 Kudos

Yes, please try by removing p1 from xpath.

former_member452321
Participant
0 Kudos

I tried that but still no luck.Here is the syntax Pl.Let me know if this is not correct

/OrderResponse/Control/DocumentIdentification[(contains(SourceSystemID,'TEST'))]

former_member184720
Active Contributor
0 Kudos

Pls try /p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:SourceSystemID[(substring(.,string-length(.) - 4) = 'TEST')]

i don't think Xpath 1.0 supports ends with function..