Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

count field in table

Former Member
0 Likes
511

hallow

i have a table and i wont to now if i have field datbi appear more then once

datbi is<b> variable</b>

i give example

table a_itab

datbi

<b>20071231</b> 20070201 0000014848

<b>20071231</b> 20070401 0000014849

20061231 20070401 0000014849

here databi appear 2 times

table a_itab

datbi

<b>20001231</b> 20070201 0000014848

<b>20001231</b> 20070401 0000014849

</b>20001231</b> 20070401 0000014849

20041231 20070401 0000014849

here databi appear 3 times

regards

hallow

i have a table and i wont to now if i have field datbi appear more then once

datbi is<b> variable</b>

i give example

table a_itab

datbi

<b>20071231</b> 20070201 0000014848

<b>20071231</b> 20070401 0000014849

20061231 20070401 0000014849

here databi appear 2 times

table a_itab

datbi

<b>20001231</b> 20070201 0000014848

<b>20001231</b> 20070401 0000014849

</b>20001231</b> 20070401 0000014849

20041231 20070401 0000014849

here databi appear 3 times

regards

2 REPLIES 2
Read only

Former Member
0 Likes
489

Hello

You can use this code :

data : begin of t_count,

datbi type d,

num type i,

end of t_count.

loop at a_itab.

t_count-datbi = a_itab-datbi.

t_count-num = 1.

collect t_count.

endloop.

In the table T_COUNt, you will have in the colum NUM the number of occurs for each DATBI

Regards

Read only

0 Likes
489

thankes jean

i try it

regards