cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue - can I solve this with a udf?

Former Member
0 Kudos

Hi,

I am having an issue trying to map my source structure to the traget structure.

The source structure consists of regular line items and batch line items all contained at the item node level. The target node requires the batch line items to be placed underneath the appropriate line item in a Batch node. The line item that the batch item is associated with is determined using the Higher Item field.

Source Structure

<Item>

        <ItemNo>10</ItemNo>

    </Item>

    <Item>

        <ItemNo>20</ItemNo>

    </Item>

    <Item>

        <ItemNo>30</ItemNo>

    </Item>

    <Item>

        <ItemNo>40</ItemNo>

    </Item>

    <Item>

        <ItemNo>50</ItemNo>

    </Item>

    <Item>

      <ItemNo>90001</ItemNo>

      <BatchNo>XYZ</BatchNo>

      <HigherItem>20</HigherItem>

    </Item>

    <Item>

      <ItemNo>90002</ItemNo>

      <BatchNo>ABC</BatchNo>

      <HigherItem>50</HigherItem>

    </Item>

Target Structure

<Item>

        <ItemNo>10</ItemNo>

    </Item>

    <Item>

        <ItemNo>20</ItemNo>

        <Batch>         

          <BatchNo>XYZ</BatchNo>

       </Batch>

    </Item>

    <Item>

        <ItemNo>30</ItemNo>

    </Item>

    <Item>

        <ItemNo>40</ItemNo>

    </Item>

    <Item>

        <ItemNo>50</ItemNo>

        <Batch>

           <BatchNo>ABC</BatchNo>

        </Batch>

    </Item>

I have tried using various mapping functions and udf's without success. If anybody has any suggestions on how to resolve these then I would greatly appreciate it.

Thanks

Ian

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

>>I have tried using various mapping functions and udf's without success

Did you check for formatByExample function?

http://scn.sap.com/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-x...

Former Member
0 Kudos

This resolved the issue. Thanks.

Answers (0)