on 09-10-2008 6:36 PM
Hey all,
I'm working on an 856 EDI with this structure:
- E1EDL37 [Pack Level]
- - E1EDL44 [Item Level (many details for every pack)
In this structure i have a code that determinates a message split for every unique code, everything looks ok, but, when i get an order like this:
E1EDL37-EXIDV2: "1132"
E1EDL37-EXIDV2: "2138"
E1EDL37-EXIDV2: "3319"
E1EDL37-EXIDV2: "1132" <-- repeated and not in order
- I can't sort the item levels correctly [EDL44]
- I only sort correctly the EDL37 order (since i'm mapping within "VHILM_KU" which is a customer material code, i sort the structure like this:
EXIDV2 ===>
VHILM_KU ===> SortByKey ===>SplitByV [Each] => "HP"
But when i need to map the item level i don't know how to sort it (I need to map E1EDL44-MATNR, POSNR, CHARG, etc), since i can't use the E1EDL37-EXIDV2 as key since this belong to other other queue
Example:
E1EDL37 [EXIDV2 => 1132]
E1EDL44-POSNR = 1
E1EDL37 [EXIDV2 => 2138]
E1EDL44-POSNR = 2
E1EDL44-POSNR = 3
E1EDL37 [EXIDV2 => 1132]
E1EDL44-POSNR = 4
I would need to sort it and then map like this:
E1EDL37 [EXIDV2 => 1132]
E1EDL44-POSNR = 1
E1EDL37 [EXIDV2 => 1132]
E1EDL44-POSNR = 4
E1EDL37 [EXIDV2 => 2138]
E1EDL44-POSNR = 2
E1EDL44-POSNR = 3
My map is like this:
E1EDL37 ---> . "G_HI" [0.unbounded]
. "HP" [0.unbounded
[ with the sort i mentioned, and pack data]
E1EDL44 -
> . "HI" [0.unbounded] [Item level data within]
Any ideas?
Thanks!
Hello,
I have worked specifically for this map in my previous project. It would be very complex to achive this with Graphical mapping. So go for UDF, The type would be "queue".
Inside UDF , you will get the array of the input, Sort them and than start adding in the result array.
Let me know if you find any difficulties.
Thanks & Regards,
Dijesh Tanna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Refer following link to have some idea on Advance UDF.
When you create new UDF with type "Queue", all the input would be available as array inside UDF.
Than you can loop around that element.
f.e.
for (int i = 0 ; i < Input.length;i++)
{
// Write your sort logic here , search on google and you would find many sorting algo in Java.
// Add sorted element in result.
result.addValue (SortedElement);
}
Thanks & Regards,
Dijesh Tanna.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.