cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping IDOC ORDERS05

valter_oliveira
Active Contributor
0 Kudos

Hello.

I'm new on idoc mapping so I think that this is not very difficult for you guys.

I'm trying to map ORDERS05's E1EDKA1 and E1EDP01 to an output xml. The problem is that this structures can have more than 1 occurrences and the mapping seems to find only the first one.

Example:

If I create a condition like:

IF E1EDKA1-PARVW is 'AG'.

map.

ENDIF.

It works because AG is the first to come. WE doesn't work. It seems that it only finds the first occurrence of this structures.

I found removecontexts function but I'm not getting how to use it. ...

Any help?

Thanks and regards,

Valter Oliveira.

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

Would you be able to provide the cardinality of the target structure?

Regards,

valter_oliveira
Active Contributor
0 Kudos

Hello Mark.

The target structure has one field called LIFNR (1:1) that I want it to be E1EDKA1-PARTN if E1EDKA1-PARVW is 'LF'.

The Items structure is like:

Items: (1:1)

Item: (1:n)

Matnr, qty (1:1)

Thanks for answering.

Former Member
0 Kudos

Make sure that the all incoming idocs have E1EDKA1 PARVW has partner type LF other wise your mapping get fails as target occurence is 1:1 (means mandatory)

right click the element and click context and make sure its level is decreased by one

better if you post the mapping what exactly you are expecting

Rajesh

Edited by: Rajesh on Mar 16, 2009 8:09 PM

valter_oliveira
Active Contributor
0 Kudos

Hello Rajesh.

Yes, what you said is a pre-requesite. Will always come a LF partner. But even with LF in the idoc, since is not the first E1EDKA1, never finds it to map.

Regards,

Valter Oliveira

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

Kindly provide the name of the target IDOC

Regards,

Former Member
0 Kudos

do one thing copy the segment E1EDKA1 in source and specify the condition like is LF then do map to Partner for copied segment and test map

Rajesh

valter_oliveira
Active Contributor
0 Kudos

Mark:

The target message is not an IDOC.

valter_oliveira
Active Contributor
0 Kudos

The mapping shoud do:

input:

0000004347

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

You can try this mapping:



PARVW --> removeContext --> equalsS: LF --> ifWithoutElse --> Item
PARTN --> removeContext -------------------> /

PARVW --> removeContext --> equalsS: LF --> ifWithoutElse --> splitByValue:EachValue --> Matnr
PARTN --> removeContext -------------------> /

Hope this helps,

valter_oliveira
Active Contributor
0 Kudos

Hi mark.

Using your suggestion the problem was almost solved (the partner part is solved, thanks).

I made:

PARVW-removecontexts-Equals-LF-IFwithoutElse-PARTNER

PARTN-removecontexts /

And it works!! My partner has the LF context PARTN.

Now, the material part. Is working only for one fieId (matnr). I want to map 2 fields (matnr and description). Matnr should be E1EDP019-IDTNR and description should be E1EDP019-KTEXT if E1EDP019-QUALF = '001'.

If I make:

Items = 1

item = E1EDP01

QUALF-removecontexts-Equals-001-IfwithoutElse-SplitByValue-MATERIAL

IDTNR-removecontexts /

DESCRIPTION = constant

It works too ...

But of I make:

Items = 1

item = E1EDP01

QUALF-removecontexts-Equals-001-IfwithoutElse-SplitByValue-MATERIAL

IDTNR-removecontexts /

QUALF-removecontexts-Equals-001-IfwithoutElse-SplitByValue-DESCRIPTION

KTEXT-removecontexts /

It gives error on second item. Am I missing something?

Regards,

Valter Oliveira.

Former Member
0 Kudos

You need to set the context in right way for this..

valter_oliveira
Active Contributor
0 Kudos

Hello Sarvesh.

I'm not sure IF I got what you proposed. Duplicate subtree for Item ou description field? Could you explain a bit more?

The 4 mappings i'm using for materials are:

Items = 1

item = E1EDP01

QUALF-removecontexts-Equals-001-IfwithoutElse-SplitByValue-MATERIAL

IDTNR-removecontexts /

QUALF-removecontexts-Equals-001-IfwithoutElse-SplitByValue-DESCRIPTION

KTEXT-removecontexts /

Thanks.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Valter,

For this to work, you need to have IDTNR and KTEXT to have the same number of contexts.

Hope this helps,

Former Member
0 Kudos

Hello Valter,

Do you mapping like this..

Items = 1

item = E1EDP19 (because you need to generate item for every E1EDP19 which is under E1EDP01)

QUALF--Equals-001-IfwithoutElse--MATERIAL

IDTNR---- /

QUALF--Equals-001-IfwithoutElse--DESCRIPTION

KTEXT--- /

If it doesn't work, paste your target structure here with it's occurrences.

Regards,

Sarvesh

Answers (0)