cancel
Showing results for 
Search instead for 
Did you mean: 

populate field in last occurance of idoc node

Former Member
0 Kudos

Hello Expert

I have Target field E1EDP01: E1EDP04:MSWBT.

Occurrences E1EDP01 :0_unbounded

E1EDP04 : 0_unbounded

MSWBT : 0_1

P01 is occurred multiple times. But MSWBT get populated once.

In my mapping it is coming under first occurrence of E1EDP01.

But I want it in last occurrence of node E1EDP01

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

Why cann't you try an UDF .

Set a COUNTER , If the counter reaches the Last count of the Value then map it to the Target node .

So if you have 2 occ then tbe 2nd value will be populated and if you have 5, then the 5th value will be populated

Regards,

B.Jude

Former Member
0 Kudos

can u please tell in details?

which UDF can I use?and how to pass value in last occurance?

Former Member
0 Kudos

Hi ,

You can solve this by using the ONEASMANY

Check it ....

Dont forget to change the CONTEXT

Regards,

B.Jude

former_member200962
Active Contributor
0 Kudos

OneAsMany will populate the source node to all the occurence of the target node...however the requirement is to populate the source node to the last occurence of the target node

Former Member
0 Kudos

ya

I want to populate source field in Last Occurance only.Not in all occurance.