cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple receiver agreement detection.

Former Member
0 Kudos

Hi,

Well i am developing a test application, which would be testing a system by sending a test idoc message from XI to the XI itself.

1. A HTTP client is used to a idoc as a xml file to the SAP XI.

2. Later the message is processed in the XI with the mappings etc & has to be transferred to a suitable receiver.

3. In order to do the step 2, i need to determine whether the message is a test message or some other normal message. Hence in the Receiver determination, i need an appropriate condition.

4. My problem is that i can search for a particular xml tag in the XPath of the test-idoc but i cannot determine whether its a normal message or not with an xpath expression. for example

my condition for the test receiver determination:

A)

/Z_C_ADDADDRESS01/IDOC/EDI_DC40/SNDLAD = TestMessage_Tool

B)

/Z_C_ADDADDRESS01/IDOC/EDI_DC40/SNDLAD =/ TestMessage_Tool

(=/ is not equals, i have no other symbol here).

The condition A is valid, but for a normal message B) has a problem. Since the tag SNDLAD does not exist at all in a normal message, it fails here. i also tried to check if there is anything like tag does not exist condition. but it is also not available.

Has anybody done something similar to this before. if yes please do write back. if its necessary i shall elaborate more in detail.

Thanks,

Srinu.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184154
Active Contributor
0 Kudos

Wow, should be quite simple.

Just put condition A (which is workin)for TestMessage and <b>no condition at all</b> for the nonTestMessage.

Anyway, do a search in SDN with "Condition Editor" or "XI XPath" keywords and're gonna find a lot of threads about it. You can use very tricky XPath expression!

Alex

Former Member
0 Kudos

Hi

Could you show the test xml message and normal message then we could you help you out.

Regards

Piyush

Former Member
0 Kudos

Hi Alex,

Thanks for the reply.

If i do not provide a condition for the other receivers,a test message would also be sent to a nonTestReceiver.

And as you said, if i give only the condition (A), the receiver determination would fail if the tag does not at all exist(for the Case of not being a test message). I also receive a mapping execution error in the message monitoring.

like :

com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown

srinu.

Former Member
0 Kudos

Hi Srinu,

I was reading through the help on condition editor and saw this....

EX Exists

You use this operator to check the existence of the expression (in the left operand). This enables you to find out whether a substructure represented by the expression exists.

You can use this operator if you want to check whether a particular element exists in the payload, for example. To do so, enter the element you want to check in the left-hand operand and leave the right-hand operand empty. <b>You can also use the = operand for this check.</b>

I was thinking, it might be worth while giving a shot by using "not equals" and donot give anything in the right operand field....(as the "equals" with right operand blank check for "exists")...

if you have already tries this....ignore my reply.

btw..Welcome to SDN!

Thanks,

Renjith.

former_member184154
Active Contributor
0 Kudos

As suggested by Renjith, try putting in your NON-test receiver something like

not(/Z_C_ADDADDRESS01/IDOC/EDI_DC40/SNDLAD EX)

as the left operand, EX as operator and nothing as right operand. Tune it a little bit and it should work, evalutaing to "true" when SNDLAD doesn't exist.

Let me know.

Alex

Former Member
0 Kudos

Hi All,

Thanks for the replies. i could not respond since i was on vacation. So this is the way i have done it.

i selected 2 conditions which says when a tag / text exists & if it is equal to the required value - passes it onto a particualar receiver. if not it shall send it another with a not condition.

may be i get some other ideas, since this test tool has to be customised later for different input types like RFCs, HTTP - SOAP, XML files (done now) etc. Hence i got to look that the Receiver Determination does not conflict with different types.

Thanks

Srinu.

Answers (0)