on 01-18-2010 4:08 PM
Hi,
I have an interface which maps an IDOC from R3 to a database insert. The IDOC has a repeating Node with some elements under it. I have a mapping in place that checks the value of one element in the node and if it equals X then map the other element.
The problem is that both elements are Optional in the IDOC and if either is not populated in the IDOC then the mapping gets confused.
For Example, the IDOC looks something similar to this:
. So where I would expect "XXX222" to be mapped its actually "XX22" thats being mapped.
Any Ideas?
Thanks
Edited by: Gareth O´Brien on Jan 18, 2010 5:09 PM
Hi,
Addition to the existing condition in the mapping add the condition if exists then your condition...
so that it will check whether the element is present or not if not pass some default value...
Hope this helps you
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> IF <Optional Field 1> == "XXX111"
> &&
> <optional Field 2> exists
>
> THEN
>
> Map <optional Field 2> with default.
As shown above it will not work.
You have to map it without checking the existance of optional Field2 i.e. first of all you use MapWithDefault as shown below
Optional Field2 --->MapWithDefault(double click and put 'abcxyz')
and then do your rest of mapping Like this..
IF <Optional Field 1> == "XXX111"
then map <Optional Field 2>
Regards,
Sarvesh
Hi,
In this cases need to change the context of the element to the top level and put the if else condition and then remove the suppress values removeSuppress ....
i.e change the context of the oprional fields to the top level and put the if exists then pass the value else pass default value or something... and use node functions to removeSuppress and split the values ..
HTH
Rajesh
Use "map with default" for the optional fields. This will ensure that a blank value is inserted for <OptionalField2> & your contenxts are not messed up.
-Siva Maranani
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.