cancel
Showing results for 
Search instead for 
Did you mean: 

a little help needed in message mapping

Former Member
0 Kudos

a little help needed in message mapping

I have to map one of the idoc header segments as many times as it occurs to each Idoc when using the split message funcionality

let us say we have the segment seg1 and there is a QUALF in it

<seg1>

<qualf>001</qualf>

</seg1>

<seg1>

<qualf>002</qualf>

</seg1>

then we use the vbeln to split the idoc into 2.

so if we have

<vbeln> 1 </vbeln>

and

<vbeln>2 </vbeln>

then 2 Idocs should be created like this

<Idoc>

<vbeln> 1 </vbeln>

<seg1>

<qualf>001</qualf>

</seg1>

<seg1>

<qualf>002</qualf>

</seg1>

</Idoc>

<Idoc>

<vbeln> 2 </vbeln>

<seg1>

<qualf>001</qualf>

</seg1>

<seg1>

<qualf>002</qualf>

</seg1>

</Idoc>

it is easy to create the segment by using createif with the QUALF field but my problem how to map the qualf twice for each idoc

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

To copy the QUALF many times you can simply use the standard function "CopyValue(0)".

QUALF ---> CopyValue(0) --->TargetField

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Copyvalue solved the problem

Thanks

Former Member
0 Kudos

UseOneAsMany is the function you need to use.

It takes three parameters:

1 --- The node you want to duplicated

2 --- How many times you want to duplicated

3 --- The context you want to place for it.

Regards

Liang