on 03-26-2009 6:34 PM
Hi all,
It is simple iDoc to File scenario. I have two receivers based on a condition in the receiver determination. I am getting all data into both receivers without executing the condition.
Below is the condition. Any idea why this is not being executed? Thanks for your help.
(/ZGENERIC_OUTBOUND01/IDOC/Z1GENERIC_SDATA/SDATA = '1C')
(/ZGENERIC_OUTBOUND01/IDOC/Z1GENERIC_SDATA/SDATA = '1B')
in the receiver determination>Receiver Determinarin>condition Editor--> do you have a prefix for the namespace??
for example p1:urn:xxxx.xxx:xxxx:xxxx
the Xpath have to be: p1:/ZGENERIC_OUTBOUND01/IDOC/Z1GENERIC_SDATA/SDATA
do you define the value in the Xpath or in the previous screen? if you define it in the Xpath you must put the quotes if you define it in the previous screen you dont.
it doesnt work for any system or work for one o no for the other??
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have not given any expression. I just selected the filed name from the XPATH list given and put the value. I thought about the same after looking into other postings, I am getting p1... when I use user defined data types, but not on the imported idocs.
to answer your question, No, there is no prefix. It is like below.
(/ZGENERIC_OUTBOUND01/IDOC/Z1GENERIC_SDATA/SDATA = '1C')
Edited by: rao.potti on Mar 26, 2009 8:04 PM
+you cannot have the same condition for the same IDOC. thats never will work because you are checking the whole values of the segment and the receiver determination check just the first.+
+its no necessary have another mapping just put the condition separatly.+
+also try deleting one condition.+
Hi Rodrigo,
what do you mean by putting condition separately.
I already have two separate conditions, one for each receiver. But based on the discussion, seems like it will not work. Please explain.
i understant this:
if you have the condition separatly it has to work but if you have the condition togheter it doest, because the receiver determination check the first value and cannot determinate if the the second condition because you have AND operator.
try put it in the previous screen (i dont remember the name of the screen). i think your Xpath spression is wrong.
thanks
> (/ZGENERIC_OUTBOUND01/IDOC/Z1GENERIC_SDATA/SDATA = '1C')
> (/ZGENERIC_OUTBOUND01/IDOC/Z1GENERIC_SDATA/SDATA = '1B')
May be stupid question, but are you putting 1C & 1B inside single quotes e.g. '1C' & '1B'. If yes then please remove the quotes and put like 1C & 1B then it will work.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
open SXI_MONI>select message> inbound message>Main Document>right buttom-->view source and check in there is any blank space.
this segment is unbounded?? if yes. the receiver determination will take the first value
those are two different condition or just one. check the logical operator is OR,AND
thanks
Rodrigo
Edited by: Rodrigo Alejandro Pertierra on Mar 26, 2009 3:38 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the outbound idoc from R/3. I have two receiver systems. If SDATA=1B, it should go to receiverA and if SDATA=1C, it should go to receiverB.
<?xml version="1.0" encoding="UTF-8" ?>
- <ZGENERIC_OUTBOUND01>
- <IDOC BEGIN="1">
- <EDI_DC40 SEGMENT="1">
<TABNAM>EDI_DC40</TABNAM>
-
-
</EDI_DC40>
- <Z1GENERIC_SDATA SEGMENT="1">
<SDATA>1C</SDATA>
</Z1GENERIC_SDATA>
- <Z1GENERIC_SDATA SEGMENT="1">
<SDATA>1C</SDATA>
</Z1GENERIC_SDATA>
- <Z1GENERIC_SDATA SEGMENT="1">
<SDATA>1B</SDATA>
</Z1GENERIC_SDATA>
</IDOC>
</ZGENERIC_OUTBOUND01>
> <?xml version="1.0" encoding="UTF-8" ?>
> - <ZGENERIC_OUTBOUND01>
> - <IDOC BEGIN="1">
> - <EDI_DC40 SEGMENT="1">
> <TABNAM>EDI_DC40</TABNAM>
> ......
> ......
> </EDI_DC40>
> - <Z1GENERIC_SDATA SEGMENT="1">
> <SDATA>1C</SDATA>
> </Z1GENERIC_SDATA>
> - <Z1GENERIC_SDATA SEGMENT="1">
> <SDATA>1C</SDATA>
> </Z1GENERIC_SDATA>
> - <Z1GENERIC_SDATA SEGMENT="1">
> <SDATA>1B</SDATA>
> </Z1GENERIC_SDATA>
> </IDOC>
> </ZGENERIC_OUTBOUND01>
You cannot have both the conditions in same IDOC at the same time. Like here in the above example you have 1C & 1B both, so in this situation it will not work.
Just for testing either remove 1C or 1B and then test. I am sure it will work.
You cannot send the same payload at the same time based on two different conditions to 2 different receivers except you put 'OR' in your conditon for 1C & 1B. But in this situation message will go to both of the receivers which you don't want here.
Regards,
Sarvesh
I am still getting a file with just namespace init
Then your mapping could be incorrect. If you have correct source payload as seen in your post above, then you must receive appropriate results too. Check the context of the nodes. You may need to use collapseContext in your map.
Regards,
Prateek
User | Count |
---|---|
79 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.