Skip to Content
0
Jun 20, 2010 at 06:55 AM

HRMD_A07 Idoc to MDM using PI

47 Views

Hi Team,

We had a scenario where the HR Idoc (HRMD_A07) data is getting integrated to MDM 7.1 using PI 7.1

For example 1 Pernr is having Multiple status like Active, InActive , retire etc.., so we are getting Infotype 000 & 001 multiple times.

So how do we need to Map to target where target has only 1 structure.

Source Structure

<EPLOGI>

<E1P1TYP>

<IT0000>

<PERNR>

<BEGDA>

<ENDDA>

....

</IT0000>

<IT0001>

<PERNR>

<BEGDA>

<ENDDA>

<BUKRS>

<PERSG>

....

</IT0001>

<IT0002>

<PERNR>

<BEGDA>

<ENDDA>

<ENAME>

<ANRED>

.....

</IT002>

<IT1000> </IT1000>

</EPLOGI>

Target Structure to MDM

<Record>

<EmpNo>

<Status>

<Last_Name>

<First_Name>

.....

</Record>

Here when we execute 2 perner's (10004300, 10004435) IDOC is getting created we are getting source structure as follows

<EPLOGI>

<E1P1TYP>

<IT0000>

<PERNR>10004435</PERNR>

<BEGDA>

<ENDDA>

<STAT2>3</STAT2>

....

</IT0000>

<IT0001>

<PERNR>10004435</PERNR>

<BEGDA>

<ENDDA>

<BUKRS>1030</BUKRS>

<PERSG>10</PERSG>

....

</IT0001>

<IT0002>

<PERNR>

<BEGDA>

<ENDDA>

<ENAME>xxx</ENAME>

<ANRED>1</ANRED>

.....

</IT002>

<IT1000> </IT1000>

</EPLOGI>

<EPLOGI>

<E1P1TYP>

<IT0000>

<PERNR>10004300</PERNR>

<BEGDA>

<ENDDA>

<STAT2>2</STAT2>

....

</IT0000>

<IT0000>

<PERNR>10004300 </PERNR>

<BEGDA>

<ENDDA>

<STAT2>3</STAT2>

....

</IT0000>

<IT0001>

<PERNR>10004300 </PERNR>

<BEGDA>

<ENDDA>

<BUKRS>1030</BUKRS>

<PERSG>10</PERSG>

....

</IT0001>

<IT0001>

<PERNR>10004300 </PERNR>

<BEGDA>

<ENDDA>

<BUKRS>1030</BUKRS>

<PERSG>12</PERSG>

....

</IT0001>

<IT0002>

<PERNR>

<BEGDA>

<ENDDA>

<ENAME>yyy</ENAME>

<ANRED>2</ANRED>

.....

</IT002>

<IT1000> </IT1000>

</EPLOGI>

The Output target Structure should be as follows...

<Record>

<EmpNo>10004435</EmpNo>

<Status>3</Status>

<Last_Name>xxx</Last_Name>

<First_Name>

.....

</Record>

<Record>

<EmpNo>10004300</EmpNo>

<Status>2</Status>

<Last_Name>yyy</Last_Name>

<First_Name>

.....

</Record>

<Record>

<EmpNo>10004300</EmpNo>

<Status>3</Status>

<Last_Name>yyy</Last_Name>

<First_Name>

.....

</Record>

I had done an message Mapping as follows.

IT0001 ==> Record

PERNR ==> Empno

STAT2 ==> Status

ENAME ==> Last_Name

.....

As per the mapping I m getting Output Structure as follows

<Record>

<EmpNo>10004435</EmpNo>

<Status>3</Status>

<Last_Name>xxx</Last_Name>

<First_Name>

.....

</Record>

<Record>

<EmpNo>10004300</EmpNo>

<Status>2</Status>

<Last_Name>yyy</Last_Name>

<First_Name>

.....

</Record>

<Record>

<EmpNo>10004300</EmpNo>

<Status>3</Status>

<Last_Name>

<First_Name>

.....

</Record>

There are some values missing in target for the Record <EmpNo>10004300</EmpNo> since the Infotype IT0002 is not repeated. Some Infotypes are not getting repeated, so the values are not getting mapped to target like Last_Name, First_Name etc...

but how do we solve it by using message mapping, Can we use any Java UDF or XSLT Mapping for this issue.

the problem in brief is some infotypes in source is getting multiple times and some are getting only 1 time.

Please suggest.

Thanks in Advance,

Sriram