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 another problem in my mapping...

I have as source my Idoc, the source is the following:

IDOC

>E1EDP01 0..99999

>>E1EDP02 0..25

>>>QUALF 0..1

>>>ZEILE 0..1

My target is as following:

InvoiceDME 1..1

>Invoice 0..1

>>InvoiceLine 0..unbounded

>>>LineNumber 0..1

I have to create an InvoiceLine statement each time I have E1EDP01 in my Idoc.

My problem is that if QUALF = 012, then I have to map the value to respective LineNumber.

It works if for each statement of E1EDP02 I have QUALF 012. In case I have a statement that does not have QUALF=012, it shifts all the values in LineNumber. Here is my example:

IDOC

>E1EDP01

>>E1EDP02

>>>QUALF = 012

>>>ZEILE = 10/12

>E1EDP01

>>E1EDP02

>>>QUALF = 012

>>>ZEILE = 10/12bis

>E1EDP01

>>E1EDP02

>>>QUALF = 012

>>>ZEILE = 10/12ter

as result I find the right values:

InvoiceDME

>Invoice

>>InvoiceLine

>>>LineNumber = 10/12

>>InvoiceLine

>>>LineNumber = 10/12bis

>>InvoiceLine

>>>LineNumber = 10/12ter

The problem is as soon as one value of QUALF is not 012, it shifts everything. For the same example, if QUALF is not equals to 012, then I have this:

IDOC

>E1EDP01

>>E1EDP02

>>>QUALF = 022

>>>ZEILE = 10/22

>E1EDP01

>>E1EDP02

>>>QUALF = 012

>>>ZEILE = 10/12bis

>E1EDP01

>>E1EDP02

>>>QUALF = 012

>>>ZEILE = 10/12ter

Result:

I get:

InvoiceDME

>Invoice

>>InvoiceLine

>>>LineNumber = 10/12bis

>>InvoiceLine

>>>LineNumber = 10/12ter

>>InvoiceLine

instead i should get:

InvoiceDME

>Invoice

>>InvoiceLine

>>InvoiceLine

>>>LineNumber =10/12bis

>>InvoiceLine

>>>LineNumber = 10/12ter

It doesnt map the right values anymore... do you have any idea how i can solve this problem?

My mapping is as follow:

I map InvoiceLine to segment E1EDP01 and then I have for LineNumber:

http://www.flickr.com/photos/30317046@N05/2848727298/

Any help would be greatly appreciated

Thanks,

Jamal

replied

Hi Jamal,

Make following changes:

1. Map InvoiceLine with E1EDP02.

2. add a mapWithDefault after if for field mapping of LineNumber

or

In the field maping for LineNumber,

replace "if without else" with a "If".

if condition remains the same.

add else ->constant -> " " and input it to else.

adjust contexts and that should work with listed 2 changes.

Regards,

Venkat.

Edited by: Venkat Anusuri on Sep 12, 2008 4:04 PM

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