cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Requirement

former_member234749
Participant
0 Kudos

Hi All,

Source structure:

<DESDAV>

<IDOC>

 

   <E1EDL20>

    ---

    ---

    <E1EDL37> 0 to unbounded

        

          <VHART/>

          <EXIDV/>

           <E1EDL44>

         

                <EXIDV/>

            </E1EDL44>

       

     </E1EDL37>

   </EIEDL20>

</IDOC>

Target structure:

<Containers>

 

  <Container>

     <F1>

     <F2>

     <Item>

       <F1>

       <F2>

Here I have 3 conditions

1) if all the E1EDL37-VHART field values are '002' then <container> needs to be generated the same number of times as E1EDL37-VHART occurs.(container = line item)

2) if any one of the E1EDL37-VHART is 'ZPAL' then the <Container> needs to be generated only once all E1EDL37's(002) becomes line itmes where E1EDL37(ZPAL) :E1EDL44-EXIDV=E1EDL37-EXIDV

3) If any two or more of the E1EDL37-VHART values are 'ZPAL' then <Container> needs to be generated as same number of E1EDL37: ZPAL and the corresponding E1EDL37 (002) will be added as the line items using this condition again E1EDL44-EXIDV=E1EDL37-EXIDV

Could any one please suggest how can we achieve this the mapping.

Thanks in Advance!

Accepted Solutions (0)

Answers (3)

Answers (3)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

From what I understand VHART only has two values: ZPAL and 002. So you can use this logic for that:

sort is descending case insensitive.

The ZPAL E1EDL37-EXIDV should equal the 002 E1EDL44-EXIDV for it to create a line item, is this correct? If yes, you can use the logic below (click image to enlarge):

EXIDV in ifSWithoutElse is E1EDL37-EXIDV, EXIDV in UDF is E1EDL44-EXIDV. Context of EXIDV is set to E1EDL20.

code for match:

Input/output:

Hope this helps,

Mark

Former Member
0 Kudos

Mark,

   Actually we could get mutilple ZPAL and 0002 vaules in this queue, your logic worked for one of each, is there away we could this working for mutiple combinations?

Thanks,


markangelo_dihiansan
Active Contributor
0 Kudos

Hi Ganesh,

Please provide a complete input and expected output message so that we can visualize your requirement more

Regards,

Mark

Former Member
0 Kudos

Mark,

Here is the write up for ASN Requirement.

Basically we need to send packing information as per the requirement. Hierarchy order-->container-->item(details).

On the idoc we have E*37 for all containers (VHART=0002), one is to one container , along with one more E*37 for corresponding pallet VHART = ZPAL. The Pallet information is sent at the end, after all Containers. So each E*37 with ZPAL will have an E*44 segment with qualifier (VELIN=3) representing each container information. 

Let's start with an example of one order with 10 line items and different packing scenarios

#1) NO pallets E*37 (VHART=0002) only. So each E*37 becomes a container with one line item.

#2) one pallet with all line items. Then we need to create one container with all respective line items.

#3) one or more Pallets . In this case we need to create a container per pallet and the respective lines items per container goes with parent pallet.

Hope this helps

Ryan-Crosby
Active Contributor
0 Kudos

Hi,

Can you have a scenario where VHART = 002 are not associated with any matching ZPAL contexts?  If so, how do you need to handle this scenario?  I have some ideas on how you might do it but would have to be clear on that case first.

Regards,

Ryan Crosby

Harish
Active Contributor
0 Kudos

Hi,

It seems to some issue with mapping logic. how can you put the E1EDL37 as line where E1EDL37-VHART = 'ZPAL'. and for VHART = 'ZPAL' more then one how can you identify corresponding E1EDL37 (002)?

Please check your mapping logic condition.

regards,

Harish