Skip to Content
0
Former Member
Oct 31, 2013 at 02:57 AM

Obtain count of unique items of itab field

20 Views

Hello all,

I am new to ABAP development and I have this following question which might seem silly to experienced ABAPers

I have an internal table say itab1 with two fields say T and K.Sample data may be like

T K

t1 k1

t2 K2

t2 K3

t3 K2

t3 K1

t3 K3

t3 K1

t4 K3

(This table will not have duplicate rows since before this step I've already performed DELETE ADJACENT DUPLICATES FROM itab1 COMPARING T and K.)

I need the count of every unique T in another itab.So required output in another itab is

T Count

t1 1

t2 2

t3 3

t4 1

Thanks and regards.