cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping IDOC with repeated segment

Former Member
0 Kudos

Hi,

In my scenario IDOC may have repeated segments which different value in one filed (qualifier). For different qualifier, I want to map IDOC segment to different target field.

This is an example of my IDOC segment.

<E1EDS01>

<SUMID>10</SUMID> -


> Determine which target filed to map with

<SUMME>100</SUMME> -


> map with target field A

</E1EDS01>

<E1EDS01>

<SUMID>11</SUMID> -


> Determine which target filed to map with

<SUMME>200</SUMME> -


> map with target field B

</E1EDS01>

I already try to use if function in XI but it doesn't work because it can look up only first <SUMID> =10 and get <SUMME> = 100.

In my understanding, this could be solved by using UDF but I don't know how to write UDF code since i'm novice in JAVA language. Any example of UDF or other solution would be appreciated.

Thanks,

Pavin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

>>look up only first <SUMID> =10 and get <SUMME> = 100.

Just change the context of SUMID to the root node of IDOC and you will see all the values for SUMID.

Thanx

Aamir

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you very much. It works. Point rewarded.

Regards,

Pavin

Former Member
0 Kudos

Hi

Change the context to IDOC node and then simply use IF for both the target nodes. it will pass the value based on your condition.

Thanks

Gaurav