on 02-03-2012 8:50 AM
Hi,
I am mapping from Idoc to xCBL bussiness document and need to map the delivery address on item level.
How do I do this mapping from E2EDPA1 to DeliveryAddress? I only want to create the DeliveryAddress target node if there are a E2EDPA1 source node with PARVW eq 'WE'.
If there are only PARVW eq 'AG' or some other, I don't want the DeliveryAddress target created.
regards,
Glenn
Hi,
Simply add the ifWithoutElse to the DeliveryAddress node and all subnodes or fields. As the if condition put PARVW equals constant WE. And put the source field (or E2EDPA1 node for target DeliveryAddress node) as a value to be conditionally mapped.
Hope it's clear enough
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I got it right in the end, I think
I changed context on the PARVW source field and added a SplitByValue after the ifWithoutElse.
I have tried have just one AG on one of the items and that did't get a target mapped. When changed to WE, it mapped as it should.
Also switching order on AG and WE works fine.
Thanks for the help.
regards,
Glenn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the answers. That was what I assumed as well. But it don't work as I hoped for.
To tell you a bit more about the case, If that changes anything.
The occurence of the DeliveryAddress is 0..1.
When trying out your solution I have two items, the first with one address of type AG, the other with two addresses type AG and WE.
When I order the two addresses on the second item as AG then WE I get no DeliveryAddress, but the other way around it works out fine. So I think it has something to do with the context. That perhaps that despite I have two E2EDP20-segments on the second item I still get just one chance to create the DeliveryAddress (because of the occurence) and that is suppressed when I have AG first, then WE.
Could that be correct? If then, how do I get around that problem?
best regards,
Glenn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Glenn,
You are right about the contexts. In case you are mapping the delivery address from items to the header of the target structure, you have to change the context of the source field to the top node of your source structure, or possibly also use the removeContext mapping function (but the first solution is the preferred one, I think).
Hope this helps,
Greg
E2EDPA1 to DeliveryAddress? I only want to create the DeliveryAddress target node if there are a E2EDPA1 source node with PARVW eq 'WE'.
PARVW -> constant(WE) -> euals -> if without else
then->E2EDPA1->target
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.