on 10-18-2006 1:23 PM
Hi Guys,
We have a problem when mapping with contexts. Couldyou please help.
What we are trying to achieve is if PARVW = X then map name2 to name2. We have done this all the way down the DT_Address. The context on both input values are set to IDOC.
The problem is that when all the fields are in a particular segment occurence then it maps perfectly. But on numerous occurrences of E1EDKA1 various fields are missing i.e.name2 or pstl2 etc. What we want to happen is if the field doesnt exist in that particular occurrence then just leave blank and dont map. What is happening instead is XI keeps looking for this field and maps the first occurrence it can find of it. So we end up with like 6 occurrences of the same thing.
Is their a way to specify that only map the fields if it is within the same occurrence as the qualifier. So basically Name2 follows PARVW to the same occurrence.
Also is their a way of making it so we dont get
Name
Name
Name
Id
Id
Id
Address
Address
Address
And instead get
Name
Id
Address
Name
Id
Address
Name
Id
Address
Thanks people
Hi Thanks for your input.
It was a little to do with the context but in the end I had to put another element in the target structure. So it went
Customer 0-unbounded
customerAddress 1-1
Details 0-1
ETC 0-1
ETC 0-1
I mapped the customer to E1EDKA1
I mapped customer address to a constant
and the details I ampped as before but with no context.
This seemed to work.... I have no idea why but it did work. If anybody could explain the why, I would appreciate it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am not sure if I got the question right. If yes: Have you already considered working with "mapwithdefault"?
Set the context of PARVW back to KA1, after the "equals" (=) insert a removecontext. Insert "mapwithdefault" after NAME2.
What it does, is that for every empty context a default value is inserted. So the sequence of the name2 queue keeps as it is.
MfG,
Christoph
Hi,
What is the context of PARVW in the graphical editor for this mapping
if PARVW = X then map name2 to name2
I think you have changed it to IDOC. Change it to E1EDKA1 and try.
You yourself can debug by giving test values in the messages tab and taking the disply queue of each function in the mapping. Just try changing contexts of the functions.
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.