Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

PI / HCI useOneAsMany mapping question

Hello everyone,

let's say we have following node structure :

/compoundemployee/person/employment_information -> 0:1 records

    custom_string1

    end_date

    start_date

    user_id

    ...

/compoundemployee/person/personal_information -> 0:n records

      end_date

      start_date

      ....

Question:

For selection of personal_information, personal_information/start_date needs to be >= employment_information/start_date <= personal_information/end_date.

I tried the mapping below, but for attached test data I get for person_id 2714 the personal_information from 2810. For 2810 I get the personal_information from 2830. There seems to be some context issue, but can't exactly point out why.

The personal_information/end_date value can be null, so I have added 'mapWithDefault'. To keep the queue consistent, I have added 'mapWithDefault' to personal_information in 'useOneAsMany', as i.e person_id 20 has no personal_information.

The context of employment_information/start_date below is changed to /person, this is a 0:1.

Test data attached :

  • the used xsd file
  • xml file with sample data
  • person_id's with no or multiple personal_information records are 20, 2090, 2112, 2173, 2490, 2510, 2671, 2714, 2791, 2810

   

Any clue?

Thanks again, appreciated -

joiners_full.xml (161180 B)
Former Member replied

Hi Kevin,

Use below mapping.

Regards,

Praveen.

1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question