cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue : Multiple headers and multiple items

Former Member
0 Kudos

Hi

We are having multiple headers and multiple items left side. We need to check the condition of each header and map the corresponding items with some concatenated message based on header value to the right side items.

LEFT SIDE RIGHT SIDE

Header_1

Field_1 - Condition-Compare some X value

Field_2

Item_1

Field_1 -


Map the value based Item_1

on above condition -


Field_1

Field_2

Item_2

Field_1

Field_1

Header_2

Field_1

Field_2

Item_1

Field_1

Field_2

Item_2

Field_1

Field_1

Please could help us.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Using java mapping would be overkill for this requirement.

As mentioned before, an user-defined function can accomplish this.

The user function would have 2 inputs, the header field and the item field. Test the header field for the desired value, then output the corresponding item field.

Regards,

Bill

Former Member
0 Kudos

Hi Bill,

Thanks for the inputs.

As you have said :

The user function would have 2 inputs, the header field and the item field. Test the header field for the desired value, then output the corresponding item field.

This Java user function would handle all the multiple header fields and Item fields i.e, it will take care of internal looping.

If so thanks, otherwise how to write a code so that it would handle.

What my thought is , should I need to give all the inputs and treat it as array in Java function-user defined.

Pleasse let me know.

Thanks,

Ramesh

prabhu_s2
Active Contributor
0 Kudos

Pls check with Java Mapping. There are few blogs in the SDN which will help you in understanding Java mapping.

MichalKrawczyk
Active Contributor
0 Kudos

hi,

if you need to loop (to search for item values)

there are a few ways to do that:

- you can do it in the advanced user defined function

(put all values to one function and

do the java coding there and put the results in global

arrarys ) then you can get those values from other user defined functions

- you can also do it in java or abap mappings

which will allow you to handle to java/abap code

easier

you can also combine - java/abap mappings

with graphical mappings

/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>