11-29-2007 11:20 AM
Hi All,
I have a small problem in sorting the internal table,
The scenario is like this:
I have 2 internal tables.
1st internal table contains 2 fileds like TRKORR , AS4TEXT. Here TRKORR values are unique.
2nd internal table contains 3 fields like TRKORR , TIMESTAMP , USERNAME.Here one TRKORR value has multiple values of TIMESTAMP ,
I need to get the lastest TRKORR with respect to TIMESTAMP and ignore the rest of the values .
Note: The timestamp values are jumbled........
can anyone suggest a small logic for this..
Thanks in advance
11-29-2007 11:22 AM
Hi,
try like this
sort itab2 by TRKORR TIMESTAMP descending.
Regards,
Prashant
11-29-2007 11:25 AM
Sort itab2 descending by TIMESTAMP.
read itab2 into wa index 1. " This will get the desired trkorr value.
Lokesh