on 07-20-2006 7:04 PM
Hi,
In message mapping, need to create an IDOC. The IDOC is created depends on a condition.
I tried to use the following logic.
[Condition]>[if true]>[createIf]-->[IDOC]
**IDOC gets created**
[Condition]>[if false]>[createIf]-->[IDOC]
**mapping error**
How do I create the IDOC node without failing the message maping?
Thanks in Advance,
Ajay.
Hi,
Please make sure that the target idoc structure has an occurence of 0..ub or 0..1.
Please post the error here, so we can help you better.
Regards,
Smitha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Praveen:
I have already tried that occurance change from 1:1 to 0:1. But its giving some mapping error. Even I have reimported an external definition of the same IDOC with some structural changes, but XI says "Leaf node cannot be an optional field" this occurs when we change the occurance from 1 to 0.
Michael:
I cannot use any condition in the receiver determination, because the decision is made by a lookup function in MM, whether to create an IDOC or not.
Looking for more suggestions.
Thanks,
Ajay.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi AJ,
For instance, you can do that:
1/ Create a mapping M1 : "Source -> SourcePlus"
with SourcePlus = All fields of Source plus an error field "Err". Put the result (true/false) of your condition inside this field "Err".
2/ Create a mapping M2 : "SourcePlus -> IDoc_1" (true one)
3/ Create a mapping M3 : "SourcePlus -> IDoc_2" (false one)
4/ After that, inside a BPM build your switch like this:
--(branch 1 if Err = true) M2 ----
>--- M1 ---- ---->
--(branch 2 if Err = false) M3 ----
Note: you can avoid this BPM, if in IR you use a Condition fiter inside Receiver Determination.
Mickael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you are getting runtime error because, the minOccurs for IDOC node is 1.
In case false value for condition, it IDOC node which is mandatory is not being created.
In message mapping, go to the 3rd tab page 'Messages' and change the 'Occurs' column for IDOC to '0..1' or '0..tounbounded' depending on ur need.
thx
praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.