on 03-07-2007 9:17 PM
Guyz,<br>
my scenario is a simple one ....<br>
<u>Source Msg :</u><p>
<SMG 1,1> (minoccurs =1 , max occurs =1)<br>
<course 1,1><br>
<courseid 0, unbounded><br>
<br>
<u>Target Msg :</u><br>
<TMG 1,1><br>
<book 4,4><br>
<courseid 1,4><br>
<br>
my intention is to populate target <courseid> field in individual contexts .....<br>
<br>
example :<br>
<br>
<b>Source</b><br>
<SMG><course><br>
<courseid> Maths 1 </courseid><br>
<courseid> Sci 1 </courseid><br>
</course></smg><br>
<br>
I'd expect following target :<br>
<br>
<TMG><br>
<book><courseid>Maths 1 </courseid></book><br>
<book><courseid>Sci 1</courseid></book><br>
</tmg><br>
<br>
but i'm getting only one <book> element and rest all are not generated during 'Test' .....<br><br>
following is my mapping : <br><br>
1>> /tmg/book = /smg/course<br>
2>> /tmg/book/courseid = SplitByValue(/smg/course/courseid) (Each Value)<br>
<br>
what am i doing wrong ?
<br><br>
thanks in advance<br>
Hi -
In this part of the mapping:
1>> /tmg/book = /smg/course
Map should be:
/tmg/book = /smg/courseid
The occurance of source field <course> is 1,1. So when you map it to the <book> target, you'll only get one <book>.
Regards,
Jin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jin -- Actually your suggestion worked like a charm..... thanks for thta...but i'm still wondering why it didnt create target structure 4 times as per its min & max occurs stuff ....
actually i'm trying one of the similar example as mentioned in documentation of 'SplitByValue' in
http://help.sap.com/saphelp_nw2004s/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/content.htm
and surprisingly not working .... any ideas pls ?
Hi Sreedhar -
If the target occurrence for <book> or <room> is (4, 4), than you're right, <book> or <room> should have been there 4 times - I guess you have, but please double check the occurrence of this target field. In fact, you don't even need any source field mapped to it at all. The mapping tool automatically should populate that target field.
Also, in this example case, if you have less than four instances of the source field <personalId>, when testing there should be an error/exception since four instances of <room> is always assumed and <personalId> in the target has occurrence of (1, 4).
I tested using a XI/PI NW04s/7.0 (SP10) based system and had no issues with this example. The only map you need is for the <personalId> field.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
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.