2006 Feb 24 2:11 PM
Hi,
I have defined an internal table for Production order operation sequence as :
DATA : BEGIN OF SORT_SEQ OCCURS 0,
APLFL TYPE AFVGD-APLFL,
VORNR TYPE AFVC-VORNR,
COUNTER(10) TYPE C, APLZL TYPE AFVGD-APLZL,
END OF SORT_SEQ.
I am getting data populated as
SEQ. OPERATION Sort 1 Sort 2
0 0010 100000001 00000001
0 0020 100000002 00000002
1 0020 100000004 00000006
1 0030 100000004 00000007
0 0030 100000003 00000003
0 0040 100000004 00000004
0 0050 100000005 00000005
I want sort sequenceas :
SEQ. OPERATION Sort 1 Sort 2
0 0010 100000001 00000001
0 0020 100000002 00000002
0 0030 100000003 00000003
0 0040 100000004 00000004
1 0020 100000004 00000006
1 0030 100000004 00000007
0 0050 100000005 00000005
any help in this regard will be highly appreciated.
Regards,
Lanka
2006 Feb 24 2:15 PM
2006 Feb 24 2:15 PM
2006 Feb 24 2:16 PM
2006 Feb 24 2:17 PM
Hi,
Just make a sort table sort_seq by counter vornr ...
Rgd
Frédéric
2006 Feb 24 2:17 PM
2006 Feb 24 2:17 PM
Hi,
Use sort as
Sort SORT_SEQ by Sort1 Sort2 operation SEQ
Regards,
GSR.
2006 Feb 24 3:21 PM
Hi All,
Thanks for yor responses. I have tried all type of sort sequences . No luck . I have changed my program logic with a different approach.
Regards,
Lanka
2006 Feb 24 3:26 PM
Hi,
Can you have the first 2 fields in your internal table as Sort1 & Sort2 heading,so that the SORT statement would work.
2006 Feb 24 4:11 PM
In order to have it sorted in your format, both the last fields should be declared as first fields in other temporary int. table and sort. Then move it to the main int. table back.