Hi!
I am trying to get the count of similar items of a field in an internal table and put it in the counter column. I ahve the following code below but the result always shows zero in the entire column. Would really appreciate if someone can pls help me out on this.
What I want the output to show is :
Name Address Counter
A A01
B A01 02
C B01
D B01
E B01 03
F C01
G C01 02
H D01 01
SORT c_t_data BY build.
DATA : lv_build
TYPE build,
c_t_data1 TYPE TABLE OF ptdw_times WITH HEADER LINE,
wa_data1 TYPE ptdw_times,
v_flg TYPE c.
c_t_data1[] = c_t_data[].
LOOP AT c_t_data1 INTO wa_data1.
AT NEW build.
counter = counter
+ 1.
ENDAT.
AT END OF build.
wa_data1-counter
= counter.
ENDAT.
ENDLOOP.
c_t_data[] = c_t_data1[].
ENDFORM. "execute_user_exit
Thanks