2007 Nov 21 1:14 PM
Hi to all
Plz tell me I want to select unique enteries from an internal table then then counting of that unique entrie.
For example
ITAB
EBELN
0026000060
0026000060
0026000060
0026000060
0026000061
0026000061
0026000061
0026000062
0026000062
0026000062
I NEED COUNT = 3.
THANKS
Hi to all
Plz tell me I want to select unique enteries from an internal table then then counting of that unique entrie.
For example
ITAB
EBELN
0026000060
0026000060
0026000060
0026000060
0026000061
0026000061
0026000061
0026000062
0026000062
0026000062
I NEED COUNT = 3.
THANKS
2007 Nov 21 1:16 PM
Hi Anubhav Gupta,
<b>Method one</b>
1) copy itab
itab2[] = itab[].2) sort itab2
SORT itab2[] BY ebeln.3) delete duplicates
delete adjacent duplicates FROM itab comparing ebeln.4)get record
describe table itab2[] LINES num. "num will contain 3<b>Method two</b>
sort itab by ebeln.
LOOP AT itab.
AT new ebeln.
count = count +1
ENDAT.
ENDLOOP.rgs