Skip to Content
0
Nov 13, 2015 at 06:30 AM

message map help

49 Views

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