cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer an header value to all the lines in mapping

Former Member
0 Kudos

Hi expert,

maybe is a simple question, but I don't remember how to do that.

In a receiver scenario in my input mapping I have:

header (0..1)

- header field1

- header field2

- header field3

- lines (0...unbounded)

--- line field1

--- line field2

....

In output mapping I want to transfer header field2 value into line field2 value (same value for all the lines).

But if I try with graphic mapping only the value of the first line get populated, and the value of other lines is null.

What I have to do to populate the field for all lines?

Thanks

Fabio

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Fabio,

You can use the copyValue function. Check how it works in this wiki http://wiki.scn.sap.com/wiki/display/XI/Standard+Functions+in+PI+7.0

Regads

Former Member
0 Kudos

Hi Inaki,

thank you for your reply.

I've tried with copy value: it works if you have only1 header.

But I have:

-RecordSet (1...n)

--header (0..1)

--header field1

--header field2

--header field3

-- lines (0...unbounded)

--- line field1

--- line field2

Excuse me if I've not been clear on this point.

If I use copyvalue the linefield get populated for all the lines and all the Recordsets, but  always with header value from the same RecordSet.

My need is that linefield get populated with header value of the same RecordSet of the lines.

Thanks

Fabio

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Fabio,

Have you tried mapping Header-field2 with lines-field2 directly?

Regards,

Mark

Former Member
0 Kudos

Yes,

only linefield2 of first line get populated.

Fabio

former_member184720
Active Contributor
0 Kudos

Use "use one as many node function" and repeat the headerfield2 as many times as corresponding lines.

Explain node functions - Process Integration - SCN Wiki

Former Member
0 Kudos

Hi Haaresh,

it works!!

thank you!

Fabio

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Fabio,

Can you share a sample input/output message?

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

here's the mapping.

Fabio