cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping help

glenn_karlsson2
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

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

Answers (3)

Answers (3)

glenn_karlsson2
Participant
0 Kudos

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

glenn_karlsson2
Participant
0 Kudos

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

former_member184681
Active Contributor
0 Kudos

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

glenn_karlsson2
Participant
0 Kudos

Hi,

I am mapping from item level in the soure to item level in the target. But I have multiple E2EDPA1 segments in the source and only one in the target, which should get created if there are a WE partner in the source.

regards,

Glenn

former_member184681
Active Contributor
0 Kudos

Then still you should to the same thing (change context to E1EDK01 for source fields, preferably).

Former Member
0 Kudos

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