on 02-12-2010 2:58 PM
I am working with a scenario where I pick up records from a JDBC connection and if the number of records I pick up is less than a certain number I want to call a webservice. If it is greater than the number I want to write out a file to be processed by a different process on the receiving end. I have created the receiver determination condition with the following conditions:
(/p1:MT_HOG_Data/row[count(row) > 3] EX)
(/p1:MT_HOG_Data/row[count(row) <= 3] EX)
The integration is always processing the second condition no matter how many records come in. I have tried with and without the multiline option. Can anyone help with this?
I have searched through the forum and checked the following links without any resolution:
http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
http://help.sap.com/saphelp_nwpi71/helpdata/EN/ab/13bf7191e73a4fb3560e767a2525fd/frameset.htm
/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
I can't find any examples where a count of records is checked in the expression editor. Thanks in advance for any help.
You can not use the EX operator in that case, because that is used only for node existence checks, not for value checks.
Do you have a row number in your structure ? Then you could write the xpath expression with that counter tag and value
Example: you want to send to receiver A if count > 3, else to B:
you set /rowNumber EQUAL 4 for sender A
and /rowNumber NOT EQUAL 4 for sender B
The condition is applied to the whole document. If one of the node/values are true for that condition, then the whole condition is set to true.
Problem with that is that the second condition also will be true because nodes for that condition will be found
better would be to have a rowcount tag in the structure. If that is not possible, you can use the "Enhanced Receiver determination" where you can define a mapping which determines the receivers. There you can do anything complicated you want.
CSY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.