cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping problems again ... 1 step left ...

inigo_sacramento
Participant
0 Kudos

Hi everyone.

Yesterda i thought the problem was solved but i realised that when node PLURIANUAL (source) doesn't (no PLURIANUALs for that item) under node ITEM, mapping is not working.

I've done as Jin Shin told me in thread

but is not working when PLURIANUAL node is not coming (defined as 0 ... unbounded), so node POSPRE is being mapped wrong. Only work in the case that all ITEMs had PLURIANUAL node. Else, doesn't work.

I put again the sample :

<b>Source message ...</b>

<item>

<POSPRE>444/55555</POSPRE>

<PLURIANUAL>

<EJ_PL>2000</EJ_PL>

<AMOUNT>00</AMOUNT>

</PLURIANUAL>

........

.........

.........

<PLURIANUAL>

<EJ_PL>2001</EJ_PL>

<AMOUNT>01</AMOUNT>

</PLURIANUAL>

</item>

<POSPRE>111/22222</POSPRE>

<PLURIANUAL>

<EJ_PL>2000</EJ_PL>

<AMOUNT>00</AMOUNT>

</PLURIANUAL>

........

.........

.........

<PLURIANUAL>

<EJ_PL>2001</EJ_PL>

<AMOUNT>01</AMOUNT>

</PLURIANUAL>

</item>

<item>

....

...

...

</item>

<b>As target, i have to have this .......</b>

<item>

<PLURIANUAL>

<EJ_PL>2000</EJ_PL>

<AMOUNT>00</AMOUNT>

<POSPRE>444/55555</POSPRE>

</PLURIANUAL>

<PLURIANUAL>

<EJ_PL>2001</EJ_PL>

<AMOUNT>01</AMOUNT>

<POSPRE>444/55555</POSPRE>

</PLURIANUAL>

.........

.........

.........

<PLURIANUAL>

<EJ_PL>2000</EJ_PL>

<AMOUNT>00</AMOUNT>

<POSPRE>111/22222</POSPRE>

</PLURIANUAL>

</item>

Regards.

Inigo

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

So when you do the mapping do you get an error like doesn't fulfil target mapping?

Are you mapping anything to the PLURIANUAL node?

prabhu_s2
Active Contributor
0 Kudos

have the mapping node <b>exists</b>. use it in a IF condition

inigo_sacramento
Participant
0 Kudos

HI.

I've tried with exists node but nothing.

My mapping is like this ...

PLURIANUAL

& -


> USER FUNCTION -


> SplitByValue -


> POSPRE

POSPRE

User function code ...

for (int i=0; i<pluris.length; i++) {

result.addValue(pospre[0]);

}

Regards.

Former Member
0 Kudos

I dont wuite understand that....

inigo_sacramento
Participant
0 Kudos

Hi Alex.

I don't get any error. Only, when SOURCE message, in ITEM node, doesn't came a PLURIANUAL node, tha mapping works wrong. I don't get any error but POSPRE is being mapped wrong.

If under ITEM, cames at least 1 node PLURIANUAL, works fine.

Understand?

Thanks.

Inigo.

Former Member
0 Kudos

OK I understand you say it is being mapped wrong but how... could you please give a sample of your target and structure with the wrong mapping

Also what is the plurianial node mapped to in the target? PROSPRE? if so this will cause an issue because if your mapping of PROSPRE is dependant on PLURIANIAL and no PLURIANIAL is present in the target then you are bound to get a strange mapping...

So please do a few things for me...

paste the Target Structure that comes whren no Plurianial node is present... also paste the relevant source structure and if you can let me know what mappings you are using and if possible what result you would want to get if there was no plurianial node...

Message was edited by:

Alex Ong

inigo_sacramento
Participant
0 Kudos

Hi Alex.

Could you please give me an email so i can send you a screenshot?

Regards.

Inigo.

Former Member
0 Kudos

yup no problem...

it is alex.ong@tvpsap.com

also if you are going to email me it could help if you give me your XSD's as well and I well try to make it work myself....

please screen shot me the mappings as well and what you want to achieve