cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Issue

Former Member
0 Kudos

I'm having a mapping issue I hope someone can assist with

I'm trying to map the serial numbers from a delivery IDOC line item buried as follows:

E1EDL20

-


E1EDL24

-


E1EDL15 - there will be multiple instances of this, I only need the ones w the right qualifier

-


E1EDL15-ATNAM = 'SN'

-


E1EDL15-ATWRT is the serial number

Trying to map to

ShipNotice

-


ShipNoticeDetails - mapped to E1EDL24 so the # of instances match the # of line items in the IDOC

-


Serial Number - mapped as below

ATNAM -> equalsS -> 'SN' -> ifw/outelse -> SerialNumber

My issue is that I get the 2 line items in the target structure, but only the first one contains the SerialNumber, the 2nd one does not have a value. The SerialNumber element isn't even present. I've played with various node functions but no luck. Any ideas?

Edited by: James Morales on Oct 21, 2008 8:04 PM

Accepted Solutions (1)

Accepted Solutions (1)

SudhirT
Active Contributor
0 Kudos

Hi james,

use if and not ifwithoutelse and pass nothing in constant in else part, u wil get the serial number.

thanks!

Former Member
0 Kudos

I got it now, I needed to change the contexts up to E1EDL24 and not 15. Thanks!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I think when the source node is not present then you are getting the suppressed value and because of that the values are not coming in correct place.

Use MapWithDefault(XYZ) in you mapping. This will replace the suppressed nodes with XYZ and hence you will be having values in eache context, now you can do your mapping.

Source ---> MapWithDefault(XYZ) ---> IF (ATNAM = 'SN') -


> SerialNumber.

Moreover you need to change the context of source message, so do accordingly.

Try this and let me know.

Regards,

Sarvesh