Skip to Content
avatar image
Former Member

Mapping issue : Multiple headers and multiple items

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 07, 2006 at 10:45 AM

    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>

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 07, 2006 at 12:03 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 07, 2006 at 01:10 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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