Application Development 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: 

How to get Record Count Of a Database Tables in DBCNT?

Former Member
0 Kudos

HI ALL,

I checked these threads...

my question is ..

i uploaded data to table.. 39 records..

but when i debug the reprot sy-dcnt value showing 100 times...?

100 times execution going in select and endselect statement..

can any body explain...it?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

dbcnt will give u the database count(i,e. number of times select statement hit that table)

in ur example 36 times ur select statement satisfied ur where condition.

rgds,

bharat.

3 REPLIES 3

Former Member
0 Kudos

HI,

dbcnt will give u the database count(i,e. number of times select statement hit that table)

in ur example 36 times ur select statement satisfied ur where condition.

rgds,

bharat.

0 Kudos

Thank you

but this is a DBCNT BW point of view....

i wrote routine in Transfer rule level..

code is working fine.. but i uploaded data to ODS..

in between i debug routine..

39 records are uploaded.. but when i debug..

DBCNT showing 237.. why?..

0 Kudos

Hi,

see this code

data:itab like mara occurs 0 with header line.

select * from mara into table itab UP TO 20 rows where matnr like 'C%'.

write:/ sy-dbcnt.

LOOP AT itab.

write:/ sy-tabix.

ENDLOOP.

rgds,

bharat.