XPATH filter in rec determination
Hi All,
I can't seem to get my xpath working in my rec determination. I'm trying to put the following in my rec determination:
/ZWBBDLD/IDOC/E1WBB01/E1WBB02[BBTYP = 'R' or BBTYP = 'C']EX
But this doesn't go to the receiving system. In the above IDOC, nodes IDOC and E1WBB01 are unbounded. So basically, if BBTYP is R or C for any E1WBB01 node in any IDOC, then I want to go to the receiver.
Hope that makes sense. Thank you!
Hi Everyone,
Thanks for your replies. I originally did use the condition with no XPATH exactly as SR Suraj has noted, however I kept getting the following error.
Problem evaluating a condition: An exception has occurred
So that's when I started fiddling with XPATH but kept getting the same error regardless of what I tried. Anyway, I discovered the issue was with the xml I was using for testing. It was incomplete i.e. it was cut off at the end. So it all works now using the original condition - no XPATH.
Thanks again for your replies.
Similar Messages
-
XML Signature using an XPath filter
I want to sign an XML document, just based on the content of a particular element in the document. Based on the jwsdp docs it looked pretty simple, but I'm getting strange results. I'll get the same digest value in the SignedInfo for different Xpath filter strings.
Anybody out there have good luck trying to sign XML documents using Xpath filters?
I'm using JDK 1.5.05 and JWSDP 1.6.
Here is my simple XML doc
<?xml version="1.0" encoding="UTF-8"?>
<myns:whole_doc xmlns:myns="http://namespace.myns.com/test"
attr1="attr_one" attr2="attr_two" attr3="attr_three">
<myns:part_one attr="attr_one">
<myns:tag1>this is part_one tag_one</myns:tag1>
<myns:tag2>this is part_one tag_two</myns:tag2>
</myns:part_one>
<myns:part_two attr="attr_two">
<myns:tag1>this is part_two tag_one</myns:tag1>
<myns:tag2>this is part_two tag_two</myns:tag2>
</myns:part_two>
<myns:part_three attr="attr_three">
<myns:tag1>this is part_three tag_one</myns:tag1>
<myns:tag2>this is part_three tag_two</myns:tag2>
</myns:part_three>
</myns:whole_doc>
When I use an XPath filter = "/myns:whole_doc/myns:part_one" I get the same digest as when I use "/myns:whole_doc/myns:part_two", which is the same digest when I don't use XPath filtering. See example output below
<?xml version="1.0" encoding="UTF-8" ?>
- <myns:whole_doc xmlns:myns="http://namespace.myns.com/test" attr1="attr_one" attr2="attr_two" attr3="attr_three">
- <myns:part_one attr="attr_one">
</myns:part_three>
- <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
- <SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments" />
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
- <Reference URI="">
- <Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
- <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<XPath>/myns:whole_doc/myns:part_two</XPath>
</Transform>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<DigestValue>9D5CFDkWd9bHx65txuHOeXWeTns=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>D686H//H5A0zDrlQx8+0fBNpVeJGgWdTXivlI8S/+WqB/E4oBYzeIQ==</SignatureValue>
</Signature>
</myns:whole_doc>It took me all day, but I did find the answer.
When using XPath filters in references, you can't use XPath exactly the way you would use XPath to find nodes in a document. I can't exactly explain why, but it has to do with the fact that the XPath statement is acting as a filter.
Anyway, to just include the part_one element from the following abbreviated XML
<myns:whole_doc> .....
<myns:part_one> ..... </myns:part_one>
<myns:part_two> .... </myns:part_two>
</myns:whole_doc>
the XPath statement should be "ancestor-or-self::myns:part_one"
to make sure that part_one was part of whole_doc you could use something like
(ancestor-or-self::node() = /myns:whole_doc/myns:part_one)
This allows me to sign a document, but still allow portions outside of whole_doc/part_one to change. -
XPATH condition in receiver determination.. Sum one of the filed
Hi,
This is my input payload.
segment "Record" will be coming multiple times.
<ns:MT_Account xmlns:ns="urn:com.statement">
-<BalanceRecs>
- --<Record>
<field1>CUA</field1>
<field2>0.00</field2>
<field3>324612.28</field3>
<field4> LTD</field4>
-----<numRecs>0</numRecs>
</Record>
--- <Record>
<field1>CUb</field1>
<field2>0.00</field2>
<field3>324612.28</field3>
<field4> LTD</field4>
<numRecs>2</numRecs>
</Record>
--- <Record>
<field1>CUc</field1>
<field2>0.00</field2>
<field3>324612.28</field3>
<field4> LTD</field4>
<numRecs>0</numRecs>
</Record>
</BalanceRecs>
Requirement:
I need to calculate the sum of field "numrecs".
If the sum is 0, then pass to BPM(IP_BPM)
If the sum is > 0 then pass to System B.
I tried using the below blog from shabarish..
/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
/p1:MT_ActBalance/BalanceRecs/BalanceRecord[sum(numRecs) = 0] EX --> BPM
/p1:MT_ActBalance/BalanceRecs/BalanceRecord[sum(numRecs) > 0] EX --> SystemB
Is there anything im missing .. kindly suggest.
Thanks
Deepthi.Hi Mark,
It is working only for one receiver.
i mean
<numRecs>0</numRecs>
<numRecs>0</numRecs>
<numRecs>0</numRecs>
The message is going correctly when the sum value is 0. ie to BPM.
<numRecs>0</numRecs>
<numRecs>2</numRecs>
<numRecs>0</numRecs>
OR
<numRecs>2</numRecs>
<numRecs>0</numRecs>
<numRecs>0</numRecs>
When I pass the above payloads, it is going to both the receivers.
Since the total is 2, it should go only to systemB
Any idea?
This is working perfectly for enhanced receiver determination. I dont want to use enhance version for this simple case. -
Reg:'XPATH' Expressions in Receiver Determination
Hi All,
My scenario is an IDoc type.
Structure:
ZABCD
IDOC
TEST1
FIELD1
FIELD2
TEST2
FIELD3
FIELD4
Condition:
(field1 = "500" OR field1 = "800" ) AND (field3 = "EZTU" OR field4 = "BLKB")
I am trying to achieve the above condition through own XPATH expression in Receiver determination.
Can anyone help me out in this.
Thanks in Advance,
Lavanya .BI have just simulated your structure in XML Spy
<ZABCD>
<IDOC>
<TEST1>
<FIELD1>500</FIELD1>
<FIELD2></FIELD2>
</TEST1>
<TEST2>
<FIELD3>EZTU</FIELD3>
<FIELD4>BLKB</FIELD4>
</TEST2>
</IDOC>
</ZABCD>
and the XPath is /ZABCD/IDOC/TEST1[FIELD1 = '500' or FIELD1= '800' and /ZABCD/IDOC/TEST2[FIELD3 ='EZTU' or /ZABCD/IDOC/TEST2[FIELD4 = 'BLKB'
consider that thread does not show the some character, so, put a ] after 800,'EZTU' and 'BLKB' if i put it the blog consider as a link everithing between [ ]
I mean
'800']
'EZTU']
'BLKB']
refer to this link: /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
Edited by: Rodrigo Alejandro Pertierra on Sep 15, 2010 10:46 AM
Edited by: Rodrigo Alejandro Pertierra on Sep 15, 2010 10:49 AM -
Filter for batch determination of production order
Filter for batch determination of production order
Dear guru ,
We trigger batch determination manually for every production order using CO02.
How can I understand whose are the production orders arenu2019t taking place batch determination?
Checking all the production orders is too heavy ?
Does exist a massive transaction (coois or others) where I can select the production orders with components not assigned to the batch ?
Thanks in advanceHi
In COOIS > In the initial screen select Documented Goods movement in the list Field along with and other selection criteria and run the Report
In the list of orders > Expand corresponding order to view Documented goods movements list with the components with and w/o batch numbers
Regards
Brahmaji -
FIM Group XPATH filter limitations
Hi,
We have reviewed the XPATH filter limitations as per: http://technet.microsoft.com/en-us/library/ff356871%28WS.10%29.aspx
However, are there any limitations / best practices as to the number of XPATH filters per Set / Group?
For example, we may have a FIM Group that may be made up of 24 different 'OR' XPATH filters - would this be a performance hit on FIM? Is there a limit on these?
Thanks,
SKHi Shim,
While there are not perceived limits on the amount of XPATH filters you can define, there is typically an issue when FIM has to calculate the actual members during said configuration change. For example, after defining the filter for the group and
submitting the change, the portal may timeout during processing. As such, in order to successfully submit a large XPATH filter, you may need to adjust the portal timeout threshold:
http://blogs.msdn.com/b/darrylru/archive/2010/02/02/extending-fim-timeouts.aspx
If your change is successful, then your XPATH filter should be fine. It will not affect FIM operational, day-to-day performance from what I've seen.
A better way to define complex filters is to combine multiple memberships into one. For example, in some sets I have defined in the past, I have created three or four separate working sets whose collective membership gathers what is needed. I
then create an "overall" set and perform a collective computed member filter, i.e. /Person[ObjectID = /Group[DisplayName = 'sourceSet']/ComputedMember
Hope that helps!
Regards, Jose Garza | MS: Svr Virt, MCTS:FIM, MCSA:2003 | http://josetheadmin.blogspot.com -
XPath Error in Receiver Determination
Hi All,
I hav an outbound message coming out of ERP (Non IDoc). I have to route the message based on the field DESTINATION in the message. The payload in the SXMB_MONI is as follows.
<?xml version="1.0" encoding="utf-8" ?>
<nr1:OLabelling_OB xmlns:nr1="http://cpe.com/cpe_ftp_wms/Labelling/OL">
<Label>
<b><DESTINATION>XXXX</DESTINATION></b>
<PRPRORD>0001005683</PRPRORD>
</Label>
</nr1:OLabelling_OB>
In the receiver determination, I hav chosen the XPath button and given the following value
<b>/nr1:OLabelling_OB/Label/DESTINATION</b>.
This doesn't work. i had also tried giving the namespace and the prefix as
<b>nr1</b> <b>http://cpe.com/cpe_ftp_wms/Labelling/OL</b>. but that dint help either.
If i remove the condition, then it is working fine.
Any help in this regard?
Thnx in Advance.
AnilI had activated and checked......it was not getting displayed.......
But i checked the xpath rules and used a work around solution for this. as per the xpath rules if i enter xpath as //DESTINATION, it picks up the DESTINATION field from anywhere in the document. and that worked.
Thnx for ur help so far...
anil -
XPATH condition in Receiver Determination in PI 7.1
Hi all,
I'm doing a Inbound 850 Scenario (no BPM involved)...based on the condition for (/LIST/S_ISA/S_GS/S_ST/S_BEG/D_353 = 00) its should either create ORDERS.ORDERS05 or create ORDCHG.ORDERS05 if (/LIST/S_ISA/S_GS/S_ST/S_BEG/D_353 = 04)...I'm giving the condition in interface determination and multiline selected in the Xpath editor
I'm using PI 7.1 and irrespective of the condition it always creats Orders.Orders05, I have 2 receiver agreements also for both receiving interfaces...
Any solution on how to debug?
Thanks,
Srini
Edited by: Srinivas Davuluri on May 12, 2009 10:56 AMI forgot to give the prefix...mistake from my side
-
Using substring in the XPATH expression for Receiver Determination
Hello, I need a little help please. In my receiver determination, I have a condition and I need to do a "not like" check. Basically, if the first three positions of the source field does not start with a specific code, then I need to execute the condition. The condition editor does not support a "not like" operand, so I went to the XPATH expression editor. I tried to used the XPATH substring function to get the first three characters and then do a "not equal" operand, but it doesn't appear to work. There are not any runtime errors, but the condition is not executing. Any ideas on this? Does the XPATH expression support the substring function?
Hi Jesse,
Can you please explain what is the meaning of http:// in the statement
/p1:PRODUCT/MATNRhttp://not(substring(.,string-length(.) - 2) = '123')
Please explein, I am having same issue. It is not working here.In My case it is
/p1:ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR[http://not(starts-with(.,\"D\"))]
also tried with
/p1:ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR[http://not(starts-with(.,'D'))]
Thanks in advance! -
Data filter using receiver determination/Interface determination
Hi Friends,
i have a scenario, which I need to filter the data based on one field that is "Amount field". the source data I am getting as flat file(.txt), The field values is 12 digit(e.g.. 000000000000,009999090000,945884949484).
I wanted to filter the records by Zeros and Nonzero means all the records of [000000000000] into one file and another way.
I used condition editor, it is working fine for string. means if i use 'ABC' in condition (in right appeared) But it is not if I give same way for the above, value 0 or 000000000000.
Thank you
BalaHi,
In Receiver Determination window condition box we can mentioned condition. Take two communication channels for '0's records file and non '0' records file
sourcestructure.field= '000000000000'.............call service1 ('0' records file)
sourcestructure.field# '000000000000'.............call service2 ( non '0' records file)
i think your problem will be sorted out -
XPATH problem in Receiver Determination
Hi Experts, I get stucked in the XPATH expression in the Receriver Determination(RD) :
The input xml (default namespace settting) is like this :
<?xml version="1.0" encoding="UTF-8" ?>
<MT_XML_SENDER xmlns="http://test.com">
<LAST_NAME>Bryant</LAST_NAME>
<FIRST_NAME>Kobe10</FIRST_NAME>
</MT_XML_SENDER>
In the RD, I tried serveral XPATH expressions :
/MT_XML_SENDER/LAST_NAME = Bryant
/MT_XML_SENDER/LAST_NAME = "Bryant"
/MT_XML_SENDER(LAST_NAME = \"Bryant\") EX
But in every case, the PI always told me it could not find the receiver, I don't know what to do........
(BTW,if I remove the condition, PI could work as desired, so it is 100% related to XPATH setting)
Thanks very very much!!!!!
RayYou probably noticed by yourself, but in the Condition Editor, it is necessary to set the namespace to a prefix and then create the XPath expression based on that prefix. i.e.
/p1:MT_XML_SENDER/p1:LAST_NAME
And on the prefix definitions, you set it to your namespace:
p1 http://test.com
Easiest way to do it is to go through the message structure, though, since it will fill the prefix automatically as per the definition in the message type in repository.
Best regards,
Henrique. -
Xpath condition in interface determination
Hi all,
I have a scenario where i have two Interface mappings between same source and target. I need to define a condition based on if a field exists, then first one should be executed and if the field doesn't exists, then second.
How should i define a condition that if field doesn't exists, the second mapping should be executed.
Can any body please suggest.
Thanks,
Kalyani.Thanks for your replies . But this condition is not working for our requirement .
Below is our exact requirement.
Source structure is the xsd which we have imported into ExternalDefinition.This External Definition has 2 other external references(namespaces are also different).
The field which we need to check is in the external reference. This field is not visible in interface determination condition editor.
We have manually added the xpath condition in the interface determination.
1)The Xpath for EXIST condition looks like
(/p1:ABC_Responses/p1:ABC_Response/p1:ABCResponses/p1:ABCResponse/p6:Fault/p6:ID EX).
This is working fine.
2) The XPath for Not Exists condition looks like
(/p1:ABC_Responses/p1:ABC_Response/p1:ABCResponses/p1:ABCResponse/p6:Fault[not(p6:ID] EX).
This is not working.
Hope iam clear with the requirement now.
Edited by: kalyani uppari on Feb 11, 2010 10:30 AM -
Xpath condition in Receiver Determination
Hi Gurus -
I want to implement a condition, For QUALF=01 AND ORGID=ORG1, then only it should go to some receiver and otherwise some other Receiver.However when i implement this using context object/Xpath, The condition happens to be true which should not be true for following structure as No segment contain "QUALF=01 AND ORGID=ORG1".
It happens to be true probably because one of the QUALF=01 and one of the ORGID=ORG1, however i doesnt want like that
- <E1EDK14 SEGMENT="1">
<QUALF>01</QUALF>
<ORGID>ORG2</ORGID>
</E1EDK14>
- <E1EDK14 SEGMENT="1">
<QUALF>02</QUALF>
<ORGID>ORG1</ORGID>
</E1EDK14>
- <E1EDK14 SEGMENT="1">
<QUALF>01</QUALF>
<ORGID>ORG2</ORGID>
Expert opinions are invited.
Regards.
Jeet,Hi Jeet,
Your Condition should be as
<b>/p1:ORDERS05/E1EDK14/QUALF=01 AND /p1:ORDERS05/E1EDK14/ORGID=ORG1</b>
and not as <b>(/p1:ORDERS05/E1EDK14[QUALF="01" and ORGID="ORG1"] EX )</b>
To acheive this,
1. Go to condition editor in the RD
2. Insert a new expression clicking on the + button at the top left.Now u will find the operation AND between the two condition
3. In both the condition line select the respective XPath of the node and specify the matching condition.
It should look like..
Left Operand OP Right Operand
/p1:ORDERS05/E1EDK14/QUALF = 01 AND
/p1:ORDERS05/E1EDK14/ORGID = ORG1
Regards
San -
Xpath expression in Receiver Determination
Hi All,
I have a condition where i need to check if WERKS is containg any value starting with IT , then i need to send this IDOC to the target.
I tried to used the following expression \MARCM\WERKS = IT* in RD , but its not workin when i am sending an IDOC with value as IT03 or other values startign with IT .
Any idea how to deal with such an issue...
Regards
Vinay P.Hi,
Instead of
\MARCM\WERKS = IT*
Use
\MARCM\WERKS ~ IT*
[dobule(~)]
double(~)
for your help
http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
regards
Ramesh -
Using Xpath in Receiver Determination for greater than 500
Hi,
I am trying to use Xpath in the receiver Determination step and I want to check a field which is at item level and comes multiple times(0-unbounded) greater than 500.I tried with different options per SDN blogs,Xpath functions,but still I couldn't able to get what i am trying.I want to process the message when "quantity" is greater than 500,else I want to ignore the message with no errors.
I gave like this /p1: /LIST/item[quantity>499] EX
item loop is 0-unbounded and I need to check for every quantity.I selected the check box multi line as well.
I played around different options,but still did not get what I am looking for.
please suggest in this regard ,how I need to give the expression.
Thank you,
SriHi,
For validating that the item field is occuring more than 500 times you need to choose the
2.The exact XPath would be in your case *(/p1: /LIST/itemquantity[499]EX)*
This means if the 500 th occurance of the item exists then the condition satisfies that is always true for 500 and above occurance of the item.
Please revert if the suggestion proves to be helpful.
cheers,
Abhishek.
Edited by: Abhishek Paul on May 6, 2010 10:55 PM
Edited by: Abhishek Paul on May 6, 2010 11:02 PM
Edited by: Abhishek Paul on May 6, 2010 11:08 PM
Maybe you are looking for
-
Has Premiere Elements 12 fixed the jittery playback issues from CS4?
I use Premiere Pro CS4 to edit my videos. I shoot with a Canon DSLR the 60D and import the video files straight into Premiere Pro without the extra transcoding step. (too much trouble to transcode the raw video with every clip). I get jittery and jer
-
Backing up to Windows Home Server 2011
Hey guys, Please dont throw stones at me - I'm trying to set up my girlfriends Macbook (circa 2007) which is running 10.5.8 Leopard onto WHS 2011. I've set my iMac 2011 running 10.6.8 via Orbital Configuration Add In and that works a dream but this l
-
How do I compare the speed of my new MacBook Pro to my old one?
I recently purchased a new MacBook Pro (2.6 Ghz Intel Core i7, 8 GB 1600 Mhz DDR3) and gave my old one to my daughter. I used Time Machine to basically produce an exact copy of the old machine; however, in the six weeks I've been using it, I don't se
-
Audio alone line-out good...Audio w/video line-out weak
Trying my new 5th gen iPod today on my home audio system. Using a 3mm miniplug to the line-out on the Universal Dock, audio by itself is very good, bumping the LCDs on my old Sansui equalizer all over the place. Using the same connection and playing
-
Hi there i'm having a great issue with a VI i have created to detect heart rate variabilty from ECG and PPG signals and seeing which one is most accurate with regards to HRV. I initially recorded 25 minutes worth of data and saved this into a text fi