on 06-11-2007 7:20 AM
I have given the following conditions in receiver determination.
/p1:MT_JDBC_Request/row[PLANT = 1000] EX for receiver1
/p1:MT_JDBC_Request/row[PLANT = 1111] EX for receiver2
The scenario is executing successfully. But it is not giving the results properly.
I am getting records with plant values 1000 and 1111 at both the receivers.
Can anyone please suggest what should be done to resolve this?
for the error "no receiver could be found" look at the 33rd page of this file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lincy,
<i>/p1:MT_JDBC_Request/row[PLANT = 1000] EX for receiver1
/p1:MT_JDBC_Request/row[PLANT = 1111] EX for receiver2</i>
This is your incoming message ..right..
Go to Receiver Determination Condition Editor...
On the Left Operand -- Select the plant field by doing F4 help.
Select the OP as EQ.
In the Right Operand enter the plant as 1000.
Will work for sure..
Regards,
Sumit
Hi Raj,
The occurrence for row is 1...unbounded...
The payload...
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_FIle_Response xmlns:ns0="http://abc.com/lins/newCBR">
- <MaterialDetails>
<MaterialNo>1</MaterialNo>
<MaterialType>roh</MaterialType>
<Desc>xxx</Desc>
<Plant>1111</Plant>
<Qty>1</Qty>
<Price>1</Price>
<Flag>1</Flag>
</MaterialDetails>
- <MaterialDetails>
<MaterialNo>2</MaterialNo>
<MaterialType>roh</MaterialType>
<Desc>xxx</Desc>
<Plant>1000</Plant>
<Qty>1</Qty>
<Price>1</Price>
<Flag>1</Flag>
</MaterialDetails>
- <MaterialDetails>
<MaterialNo>3</MaterialNo>
<MaterialType>roh</MaterialType>
<Desc>xxx</Desc>
<Plant>2000</Plant>
<Qty>1</Qty>
<Price>1</Price>
<Flag>1</Flag>
</MaterialDetails>
</ns0:MT_FIle_Response>
And My condition is (/p1:MT_JDBC_Request/row[PLANT =1000] EX )
In o/p I need the details of plant with value=1000. But it s giving all the 3 records..
Regards,
LInsy
Message was edited by:
LINSY SCARIA
Linsy,
Thanks for the response, as I thought, see how come the receiver determination XPATH will determine if you have unbounded messages, u know wht is happening? It will look for the first occurrence and will decide. See in your payload the plant is 1111 as first occurrence so receiver 2 will be chosed and it will send all the materials, similarly change the Plant to 1000 ( as first occurrence) receiver 1 will be chosed and it will send all messages.
I think i'm not wrong,please give me ur feedback.
Also if you want your case to be simulated , i'll suggest you to slpit the message using BPM - For Each(Material Details) and send to receiving system.
Please provide your feedback.
Best regards,
raj.
Hi Lincy,
what i can understand from the payload is that you are trying to determine the receiver based on target payload.
You can only determine the receiver from the incoming message(:MT_JDBC_Request) to XI not the message which is going out of XI(:MT_JDBC_Response).
Regards,
SUmit
ps : reward points if that solved your problem.
Message was edited by:
Sumit Khetawat
Hi,
This s my incoming payload..
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_JDBC_Request xmlns:ns="http://abc.com/lins/newCBR">
- <row>
<MNO>1</MNO>
<MTYPE>roh</MTYPE>
<DES>xxx</DES>
<PLANT>1111</PLANT>
<QUANTITY>1</QUANTITY>
<PRICE>1</PRICE>
</row>
- <row>
<MNO>2</MNO>
<MTYPE>roh</MTYPE>
<DES>xxx</DES>
<PLANT>1000</PLANT>
<QUANTITY>1</QUANTITY>
<PRICE>1</PRICE>
</row>
- <row>
<MNO>3</MNO>
<MTYPE>roh</MTYPE>
<DES>xxx</DES>
<PLANT>2000</PLANT>
<QUANTITY>1</QUANTITY>
<PRICE>1</PRICE>
</row>
</ns:MT_JDBC_Request>
Regards,
Linsy
Message was edited by:
LINSY SCARIA
Hi Lincy,
what i understand from the incoming payload is that you want to send messages to plant 1000 or 1111 based on <row>/plant.
One way is to use BPM ...not the best way..
I dont think enhanced interface determination will solve your purpose.
What you can possibly do is..........
Have 2 sender jdbc adapter. In the first one write the query to read records for plant 1000 and in the second one write the query to read records for plant 1111.
Then it becomes simple or use BPM.
Regards,
Sumit
Hi Linsy,
can you check following:
left field: X-Path Expression on PLANT with F4 plus condition on PLANT =1000 (should be: /p1:MT_JDBC_Request/row[PLANT = '1000']/PLANT )
Operator EQUAL
right field: 1000
I think the X-Path is choosing now only the right PLANT. Of coz is the comparing a little bit strange, if the field was found, it can ONLY be true.
Regards,
Udo
Hi Linsy,
your problem is, that row is unbounded. So you have to select that PLANT field, where value is 1000. You can do that in X-Path by a condition on row: row[PLANT='1000']. But you cant compare row, coz there is no value, it is a complex type. So you choose just the PLANT of row (others would work as well): row/PLANT. That field has now to be compared with the value on the right side. All together the comparing would look like
row[PLANT='1000']/PLANT EQ 1000
Why dont you test that?
Regards,
Udo
Hi Udo,
I tried the condition u have given..But it s giving same error.
If I use = instead of EX as operator..then i am getting error.
This is what i am getting in the condition in the cofigured receivers.
(/p1:MT_JDBC_Request/row[PLANT='1000']/PLANT = 1000)
Is this the condition U asked me to test?
Have i given it in the right way or am i wrong?
Regards,
Linsy
Hi Linsy,
what kind of error, can you describe?
the expression should be:
left: /p1:MT_JDBC_Request/row[PLANT='1000']/PLANT
op: EQ
right: 1000
If that not works, may be coz of wrong addressing the namespace in root element, plz check out:
left side: //row[PLANT='1000']/PLANT
op: EQ
right: 1000
Regards,
Udo
Linsy,
Did u solved the issue? I think u might have solved the issue, please share with us the same. Today I tried ur scenario with enhnaced receiver determination its working perfect.
I'm sharing the same, If you have any doubts kindly reply back.
Please keep the blog as reference: /people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16
As for as your scenario is concerned its like File -XI- JDBC, based on the Plant value from the source if its 1000 it has to go to one receiver , if its 1111 it has to go to other receiver am I right?.
<i><b>Design Part.</b></i>
Create one source data type, message type and aynch outbound interface.
Create two target data type,message type and aynch outbound interface.[Even though both the target structure are same , I request you to create with two different names , u will get the flow below]
Create three Message Mappings and 3 Interace mappings
Mapping 1:
Source --> Target 1
The logic is map if the source values has Plant value =1000
Please refer : http://www.flickr.com/photo_zoom.gne?id=572921073&size=o
Mapping 2:
Source --> Target 2
The logic is map if the source values has Plant value =1111
Please refer :http://www.flickr.com/photo_zoom.gne?id=572921095&size=o
Mapping 3:
Source --> Receiver Determination[Available in SAP Basis]
Please refer : http://www.flickr.com/photo_zoom.gne?id=572921149&size=o
Please refer: http://www.flickr.com/photo_zoom.gne?id=572921161&size=o
UDF [Decide Receiver]
Create Advanced UDF [Queue, with one input parameter -Plant]
int cnt = Plant.length;
int party1=0,party2=0;
for(int i=0;i<cnt;i++)
{
if(Plant<i>.equals("1000") && party1==0)
{
party=1;
result.addValue("Party1000");
}
else if(Plant<i>.equals("1111") && party2==0)
{
party=1;
result.addValue("Party1111");
}
}
Create three Interface mappings for the above 3 message mappings.
<b>Directory Part</b>
Create three services ,one for file sender , one for JDBC receiver1[Party1000] , one for JDBC receiver2[Party1111].
Create sender agreement --> File sender
Create receiver determination --->Choose extended and choose mapping program 3rd defined in IR.
Please refer :http://www.flickr.com/photo_zoom.gne?id=572505270&size=o
Create 2 Interface determination. [Bcoz we have created 2 inbound interfaces and choose the corresponding mappings]
Create 2 Receiver agreements.
Please refer here to check whether you have all the objects : http://www.flickr.com/photo_zoom.gne?id=572921171&size=o
Thats it you are done!!!
In SXMB_MONI u must get like refer here : http://www.flickr.com/photo_zoom.gne?id=572921167&size=o
Please see the below sample source and target messages.
http://sapient.xi.googlepages.com/home
I hope it helps you!!!
Best regards,
raj.
Hi linsy,
Put your values within double quotes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try;
/p1:MT_JDBC_Request/row[PLANT = '1000'] EX for receiver1
/p1:MT_JDBC_Request/row[PLANT = '1111'] EX for receiver2
or
/p1:MT_JDBC_Request/row[PLANT = "1000"] EX for receiver1
/p1:MT_JDBC_Request/row[PLANT = "1111"] EX for receiver2
More : ref-
/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
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.