cancel
Showing results for 
Search instead for 
Did you mean: 

message map help

Former Member
0 Kudos

Hi All,

I have a source structure like this below. Trying to achieve the output shown at the very end using message map. Any help is appreciated

Source Structure:

<E1EDT37 SEGMENT="1">

----<EXIDV>00000000001000000072</EXIDV>  - carton A

----<EXIDV2>1000000072OUT</EXIDV2>

     ---- <E1EDT43 SEGMENT="1">

----- <VELIN>1</VELIN>

----- <VBELN>0080020874</VBELN>

<E1EDT37 SEGMENT="1">

----<EXIDV>00000000001000000073</EXIDV>  - carton B

----<EXIDV2>1000000073OUT</EXIDV2>

     ---- <E1EDT43 SEGMENT="1">

----- <VELIN>1</VELIN>

----- <VBELN>0080020874</VBELN>

<E1EDT37 SEGMENT="1">

----<EXIDV>00000000001000000101</EXIDV> - pallet 1

----<EXIDV2>1000000101OUT</EXIDV2>

     ---- <E1EDT43 SEGMENT="1">

----- <VELIN>3</VELIN>

----- <EXIDV>00000000001000000072</EXIDV> - carton A

          ---- <E1EDT43 SEGMENT="1">

----- <VELIN>3</VELIN>

----- <EXIDV>00000000001000000073</EXIDV> - carton B

<E1EDT37 SEGMENT="1">

----<EXIDV>00000000001000000096</EXIDV> - carton C

----<EXIDV2>1000000096OUT</EXIDV2>

     ---- <E1EDT43 SEGMENT="1">

----- <VELIN>1</VELIN>

-----  <VBELN>0080020876</VBELN>

<E1EDT37 SEGMENT="1">

----<EXIDV>00000000001000000100</EXIDV> - carton D

----<EXIDV2>1000000100OUT</EXIDV2>

     ---- <E1EDT43 SEGMENT="1">

----- <VELIN>1</VELIN>

-----  <VBELN>0080020877</VBELN>

<E1EDT37 SEGMENT="1">

----<EXIDV>00000000001000000104</EXIDV> - Pallet 2

----<EXIDV2>1000000104OUT</EXIDV2>

     ---- <E1EDT43 SEGMENT="1">

-----   <VELIN>3</VELIN>

----- <EXIDV>00000000001000000096</EXIDV> -- Carton C

          ---- <E1EDT43 SEGMENT="1">

----- <VELIN>3</VELIN>

----- <EXIDV>00000000001000000100</EXIDV>  - Carton D

And I need to get the below output after mapping

Output:

<S_MAN>

     -<D_88>W</D_88>

     -<D_87>1000000101OUT<D_87> - Pallet level ID to be send when VBELN are same within the pallet

</S_MAN>

<S_MAN>

-<D_88>GM</D_88> 

     -<D_87>1000000096OUT<D_87>    --Carton level ID to be send when VBELN is different within the pallet

</S_MAN>

<S_MAN>

-<D_88>GM</D_88>

     -<D_87>1000000100OUT<D_87>   --- Carton level ID to be send when VBELN is different within the pallet

</S_MAN>

any help is appreciated

thx

mike

Accepted Solutions (1)

Accepted Solutions (1)

Ryan-Crosby
Active Contributor
0 Kudos

Hi Michael,

You could try this out - I tested out your sample and it seemed to work ok but I couldn't promise it covers all the possibilities.  The one key thing to mention is there is one context adjustment for EXIDV on the exists function to set it to the next highest level of E1EDT37.  See below for the screenshot:

Regards,

Ryan Crosby

Former Member
0 Kudos

Hi Ryan,

Sorry for the delayed reply bcoz I was not sure of the complete reqmt and it got changed drastically later on. Marked your answer as helpful because it was.

thanks

mike

Ryan-Crosby
Active Contributor
0 Kudos

Hi Mike,

Sure, let me know if you need any further help once your requirement is finalized - I always enjoy trying to tackle the complicated mapping requirements.

Regards,

Ryan Crosby

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Michael,

As I understand you try to use IDOC type SHPMNT*

In this case it is better to use XSL-mapping but how choose where is pallete and where is Carton??

Regards,

Vladimir

Former Member
0 Kudos

Attached notepad has the aligned source structure and the expected result

When  I copied and pasted from the doc, the alignment changed here. Sorry for that. Please refer attached note pad

thx

mike