on 03-16-2009 2:22 PM
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.
Hi,
Would you be able to provide the cardinality of the target structure?
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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,
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.
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.
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
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.