on 08-04-2011 6:46 PM
Hi all,
I am trying to map one data with this structures:
Source:
IDOC (1..1)
->SEG1(1..unbounded)
-->SEG2(1..unbounded)
--->FIELD1(0..1)
--->FIELD2(0..1)
Target:
Header(1..1)
->NODE1(1..1)
-->NODE2(1..1)
--->TARGETFIELD(1..1)
The logic is the next one:
If FIELD1 = "A" then map FIELD2 to TARGETFIELD
I have an example as this:
SEG2
-><FIELD1>A</FIELD1>
SEG2
-><FIELD1>A</FIELD1>
-><FIELD2>text</FIELD2>
So, in the first SEG2 there is no FIELD2, and I need the "text" string to be sent to TARGETFIELD.
I could not find the way to do this. I tried with an if without else condition, asking if FIELD1 = "A" AND FIELD2 existis, but I am getting a mapping error saying that the TARGETFIELD could not be created.
I think this should be easy but I was not able to find the solution yet.
Any genius know how to do this?
Thanks!
note: all contexts are set by default, so there is no context change
Are you doing multimapping?
I see the problems.If you have Field2 exist for few times under seg2, how do you map in the target. I see target structure node2 1..1 and targetfield 1 to 1. In your case target field value does not exist for the field2 missing so you get this error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Finally, the issue has been solved by adding a removecontext function.
thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.