Skip to Content

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

Problems in mapping [IDOC to EDI]

Hi experts,

I am facing a problem I could not resolve so far. My scenario is an Idoc to an EDI format.

In my IDOC I have a segment (E1EDP01) that contains another segment (E1EDP02). E1EDP02 contains the data that interests me. The problem is that the occurence of E1EDP01 is 0...99999 and E1EDP02 is 0..25.

It means that for each segment of E1EDP01 that appears, according to the value of a field in E1EDP02, I have to map the values of E1EDP02 in a specific target segment.

For example, I can have:

E1EDP01

>>E1EDP02

>>>>QUALF 012

>>>>BELNR BELNR012

>>E1EDP02

>>>>QUALF 087

>>>>BELNR BELNR087

>>E1EDP02

>>>>QUALF 088

>>>>BELNR BELNR088

>>E1EDP02

>>>>QUALF 089

>>>>BELNR BELNR089

If QUALF = 012, then BELNR has to go to a specific target field. If QUALF = 087, then BELNR has to go to another specific target field, and so on...

The problem is that E1EDP01 can appear several times, ie:

E1EDP01

>>E1EDP02

>>>>QUALF 012

>>>>BELNR BELNR012

>>E1EDP02

>>>>QUALF 087

>>>>BELNR BELNR087

>>E1EDP02

>>>>QUALF 088

>>>>BELNR BELNR088

>>E1EDP02

>>>>QUALF 089

>>>>BELNR BELNR089

E1EDP01

>>E1EDP02

>>>>QUALF 012

>>>>BELNR BELNR012bis

>>E1EDP02

>>>>QUALF 087

>>>>BELNR BELNR087bis

>>E1EDP02

>>>>QUALF 088

>>>>BELNR BELNR088bis

>>E1EDP02

>>>>QUALF 089

>>>>BELNR BELNR089bis

E1EDP01

>>E1EDP02

>>>>QUALF 012

>>>>BELNR BELNR012ter

>>E1EDP02

>>>>QUALF 087

>>>>BELNR BELNR087ter

>>E1EDP02

>>>>QUALF 088

>>>>BELNR BELNR088ter

>>E1EDP02

>>>>QUALF 089

>>>>BELNR BELNR089ter

Every time QUALF takes these value I have to create a specific target segment that contains the value of BELNR. In this example above, I would have 12 target semgnents created.

I could not find how so far,

any help would be greaatly appreciated

Best regards,

Jamal

replied

I did a test mappig with your requirement and it is working.

I am including the screenshots here...

Map the root node above ID as per this mapping:

http://farm4.static.flickr.com/3014/2846111812_db261a9f28_o.jpg

Field mapping to ID:

The contexts of all BELNR, QUALF should be made to E1EDP01 in the following mapping:

http://farm4.static.flickr.com/3115/2846111918_3e6f8b047b_o.jpg

It is working with the above mapping.

Regards,

venkat.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question