cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on Mapping

former_member234749
Participant
0 Kudos

Source: two delivery line items

<Delivery>

   <AddressLine1>1237 South Main Street

   <AddressLine1>Apt 4E

</Delivery>

<Delivery>

   <AddressLine1>1237 West Main Street

   <AddressLine1>Apt 5G

</Delivery>


Here <AddressLine> is 1 to unbounded


Target: Two Ship to Addresses


<Address>

<Street>1237 South Main Street

<Strret2>Apt 4E

</Address>

<Address>

<Street>1237 West Main Street

<Strret2>Apt 5G

</Address>


I did the mapping as below. It works fine for the single delivery to single ship to address but not working for multiple deliveries to Multiple ship to addresses. Can anyone please help me how can I solve this?


Thanks




Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186851
Active Contributor
0 Kudos

Hello SAP PI,

Why your using count function.

You can do direct mapping right?which will create if one delivery then one address else 2 means 2.

former_member234749
Participant
0 Kudos

Thank you Harish!

Some of the deliveries doesn't have the street2 information..so I am checking with count function.

Thanks!

Harish
Active Contributor
0 Kudos

Hi,

change the mapping as

AddressLine1 -> collaps cotext --> splitbyvalue -> street


regards,

Harish

former_member234749
Participant
0 Kudos

Thank you for the suggestion..What about the street2 mapping?

Harish
Active Contributor
0 Kudos

Hi,

Street2 mapping having two option

1) If you are sure that first field always start with numberr and second always start with alphabat then use the sort function and sort the second field in first position.

Then apply the same logic as street field.

2) Write the java code and suppress the first value of queue.

regards,

Harish