cancel
Showing results for 
Search instead for 
Did you mean: 

why SplitByValue is not working ?

Former Member
0 Kudos

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>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Jin,

But when a structure field has got minOccurs = maxOccurs = n > 0 , documentation says without target field mapping , structure field gets generated 'n' number of times ...thus i was expecting my 'book' field to be generated 4 times .... am i wrong in my understanding ?

Thanks

Former Member
0 Kudos

Hi,

change the context of

/tmg/book/courseid

--> tmg

Regards Mario

Former Member
0 Kudos

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 ?

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Jin,

Yes i re-checked and i do have 4,4 occurences...i'm having NW04S SP 06 system with jdk version 1.3 ..... i think it should be some bug with this SP .... i neither got an exception nor generated four instances of target structure field which it shud have .....

thanks Jin....

Former Member
0 Kudos

jdk/jvm version should be 1.4.2 (latest should suffice), for both the XI server and you web start clients.

Regards,

Jin

Former Member
0 Kudos

hey my jws is using 1.4.2_12 as you pointed out, but not the server.....wonder how to change it ?

Former Member
0 Kudos

There's a Note on this - 718901.

Regards,

Jin

Former Member
0 Kudos

Grrrrrr....... mktplace/notes is down ...thanks jin...i'll chk this once its up.....

Answers (0)