Skip to Content
author's profile photo Former Member
Former Member

Mapping multiplicity

Gurus salutem,

I think I have a seemingly simple question.

I would like to map a structure with mutiplicity 1 to a structure with multiplicity 3.

The non-repetitive structure looks like as follows:

<xsd:complexType name="inParameters">


<xsd:element maxOccurs="1" minOccurs="0" name="key1" type="xsd:string"/>

<xsd:element maxOccurs="1" minOccurs="0" name="key1Value" type="xsd:string"/>

<xsd:element maxOccurs="1" minOccurs="0" name="key2" type="xsd:string"/>

<xsd:element maxOccurs="1" minOccurs="0" name="key2Value" type="xsd:string"/>

<xsd:element maxOccurs="1" minOccurs="0" name="ownerID" type="xsd:string"/>


The repetitive segment looks like follows:

<xsd:complexType name="QueryFilter">


<xsd:element maxOccurs="1" minOccurs="0" name="operation" type="xsd:string"/>

<xsd:element maxOccurs="1" minOccurs="0" name="action" type="xsd:string"/>

<xsd:element maxOccurs="1" minOccurs="0" name="attribute" type="xsd:string"/>

<xsd:element maxOccurs="1" minOccurs="0" name="value" type="xsd:anySimpleType"/>

<xsd:element maxOccurs="1" minOccurs="0" name="valueLow" type="xsd:anySimpleType"/>

<xsd:element maxOccurs="1" minOccurs="0" name="valueHigh" type="xsd:anySimpleType"/>

<xsd:element maxOccurs="1" minOccurs="0" name="condition" type="cafpref3:condition"/>


The result of the mapping should be:

QueryFilter(1).attribute := inParameters.key1

QueryFilter(1).value := inParameters.key1Value

QueryFilter(1).condition := u201CEQu201D

QueryFilter(2).attribute := inParameters.key2

QueryFilter(2).value := inParameters.key2Value

QueryFilter(2).condition := u201CEQu201D

QueryFilter(3).attribute := u201CownerIDu201D

QueryFilter(3).value := inParameters.ownerID

QueryFilter(4).condition := u201CEQu201D

In short the three repetitive segments contain the values from the non-repetitive segment.

Probably more than one guru has encountered this issue.

Thanks for your replies,


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jan 04, 2012 at 12:05 PM


    Have a look on below threads.

    [How to deal with 0...n or 1...n mappings? |How to deal with 0...n or 1...n mappings?;

    [implement lists/multiple entries of one type within process context? |How to implement lists/multiple entries of one type within process context?;

    Best Regards

    Satish Kumar

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Satish,

      That is not the solution.

      SAP provided me with a solution (many thanks Martin!!), that seems rather simple.

      1. create a new mapping function in this case named createFilter, that returns queryFilter (multiplicity exactly 1), with inbound parameters attribute, value and condition.

      2. map attribute, value and condition to the queryFilter elements in the mapping expression of the mapping function

      3. when mapping the inType to QueryFilter (1..*) in the mapping object use the mapping function to define the following mapping expression:



      createFilter("ghi", DO_inType/ownerId, "EQ"))

      Use the standard assignment "Set".

      That's it!

      Best regards,


      Edited by: Martijn on Jan 4, 2012 3:15 PM

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.