on 07-17-2011 4:37 PM
Hi,
I am working on ASN scenario (IDOC to EDI) to develop the HL loops. But i am facing a problem to sort all the HL loops depending on one unique key. I tried with different way, but could not achieve the same:(
Used a java code, but it fails if there is multiple IDOCs (basically all the HLs of second IDOC will come in the first HL...)
Can someone help me in sorting the entire node using an unique key....
Regards,
Vasantha
set the source field to parent context and something similar to as below
source field and unique key --> removecontext --> sortbykey --> collapsecontext --> target field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Baskar,
Thanks for the quick reply.
This functionality will sort only the individual fields. But I need to sort the entire HL segments.
There will be many segments inside HL segment. There are some elments which are not mandatory. In this case SortBy key will fail to sort based on the key.
I want to sort all the nodes.
Regards,
Vasantha
Hi Vasantha ,
This can be easily achive with Contexts.
Please set the context of HL field to IDOC level.
and then use standard SORT function.
Input to SORT function should be.
It basically means all the HL values of a IDOC should be in same context .No context change between them
Contextchnage
1
3 (1st IDOC 3 HL field in Same Coontext)
2
Contextchnage
6
1 (2nd IDOC 3 HL field in Same Coontext)
3
Contextchnage
OUTPUT
Contextchnage
1
2 (1st IDOC 3 HL field after sort)
3
Contextchnage
1
3 (2nd IDOC 3 HL fieldafter sort)
6
Contextchnage
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here is the requirement...
It is an EDI ASN development with SOPI structure.. For each E1EDL37 segment there will be "P" segment and for Each E1EDL44 there will be an "I" segment. E1EDL44 can be multiple with in E1EDL37. so it can be SOPII, PI ...
I have one map that will ceate the HL segment as SOPPP.. IIII... with the unique key. basically the corresponding P and I will have the same key. In my second map, i would like to sort the HL segments, so that it will be SOPIPI.. (corresponding P and I will come together).
Hope you got the requirement now. Let me know if you need more information.
Regards,
Vasantha
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.