Skip to Content

Receiver Determination condition editor

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Dec 06, 2013 at 08:19 PM

    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..

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 06, 2013 at 08:58 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 09, 2013 at 01:59 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.