on 07-05-2007 9:21 AM
Hi all,
I'm trying to create the following mapping. The goal is to create a number of idocs in one file to send out in a foreach block with bpm. The source contains one idoc with multiple similar nodes:
Source:
CREMDM04
-IDOC (1..1)
--BEGIN
--EDI_DC40 (1..1)
--E1LFA1M (1..9999)
The E1LFA1M node appears multiple times in the source idoc. I want to map this to a file containing multiple idocs which contain only one E1LFA1M.
So the target should be:
CREMDM04
-IDOC (0..unbounded)
--BEGIN
--EDI_DC40 (1..1)
--E1LFA1M (1..9999)
-IDOC
--BEGIN
--EDI_DC40 (1..1)
--E1LFA1M (1..9999)
-IDOC
--BEGIN
--EDI_DC40 (1..1)
--E1LFA1M (1..9999)
I have tried this with splitbyvalue from the E1LFA1M node onto the IDOC target node, but this result in:
CREMDM04
-IDOC (1..1)
--BEGIN
--EDI_DC40 (1..1)
--E1LFA1M (1..9999)
--E1LFA1M (1..9999)
--E1LFA1M (1..9999)
--E1LFA1M (1..9999)
I don't understand why.
Can anyone help?? Will award points.
Greetings
Message was edited by:
hans vremden
hi;
Then try out this
E1LFA1M (1..9999)---remove context --IDOC (1..1)
Mudit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok, done.
Now it seems as if it is building a second idoc node.
getting there, however, it comes up with the following error.
cannot produce target element <b>/CREMDM04/IDOC[2]/BEGIN</b>. check xml instance ...
EDIT:I have put a constant on the target begin node. This works. Now it nags about the EDI_DC40 node. How do I make sure that this node is copied in each instance of the idoc node as of this node exists only one in the source.
why is it nagging about the begin node??
Greetings
Message was edited by:
hans vremden
No,
In the source structure there is one EDI_DC40 node and multiple E1FLA1M nodes under the IDOC node
I want the information of the E1FLA1M split into multiple IDOC nodes.And then I want the EDI_DC40 node to just copy the same values each time. Moreover, I don't care what's in the EDI_DC40 node. I just want the E1LFA1M nodes distibuted among multiple IDOC nodes...
EDIT: The EDI_DC40 can be achieved by useOneAsMany I believe.
Is this clear for you, please say if it isn't...
greetings
Message was edited by:
hans vremden
Message was edited by:
hans vremden
You rock!
this works. Still need to figure out why..
here come the points
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi;
Here IDoc in the target is specified as 1..1occurance but as you said "<b> I want to map this to a file containing multiple idocs which contain only one E1LFA1M</b>"
therefore the target IDoc should have 1...unbound occurances
Mudit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is probably due to the E1LFA1M <b>(1..9999)</b>
If you had 0..1 it may work!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, but I use the splitbyvalue as follows:
E1LFA1M ---> SPLITBYVALUE(EACHVALUE) --> IDOC
The rest is mapped as normal.
Then I would expect that in the target version I get a IDOC node for each 1LFA1M node in the source.
EDIT: Tried the 0..1 thing. It doesn't work for me.
Any other suggestions?
Not?
Message was edited by:
hans vremden
User | Count |
---|---|
84 | |
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.