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

sy-dbcnt

Former Member
1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
7,533

Hi

Database Count. It will count number of records in a database table.

Regards

Haritha.

what is sy-dbcnt

11 REPLIES 11
Read only

Former Member
0 Likes
7,534

Hi

Database Count. It will count number of records in a database table.

Regards

Haritha.

Read only

Former Member
0 Likes
7,533

SY-DBCNT gives the number of records in database table

After an open SQL statement, the system field sy-dbcnt contains the number of database lines processed.

REPORT ychatest.

DATA : v_matnr LIKE mara-matnr.

SELECT matnr FROM mara INTO v_matnr UP TO 1 ROWS.

ENDSELECT.

WRITE : sy-dbcnt.

Message was edited by:

Chandrasekhar Jagarlamudi

Read only

Former Member
0 Likes
7,533

it will return the number of records processed in the database.

Read only

Former Member
7,533

hi,

Welcome to SDN

SY-DBCNT:: no. of records processed in database table after a query.

SY-DBCNT

SQL statements set the content of SY-DBCNT to the number of database lines processed. With SELECT loops in Open SQL, SY-DBCNT is set after the ENDSELECT statement. In Native SQL, SY-DBCNT is set after the ENDEXEC statement.

DELETE sets SY-DBCNT to the number of lines deleted.

FETCH sets SY-DBCNT to the number of lines already read by the current cursor.

INSERT sets SY-DBCNT to the number of lines inserted.

MODIFY sets SY-DBCNT to the number of lines processed.

UPDATE sets SY-DBCNT to the number of lines changed.

Return Value

~~Guduri

Read only

0 Likes
7,533

it is a System Field which gives you the Number of Records In database table

regards,

santosh.

Read only

Former Member
0 Likes
7,533

Hi,

Number of elements in edited dataset with DB operations

WRITE: /12 'Number of selected records:', SY-DBCNT CENTERED.

Regards,

Bhaskar

Read only

Former Member
0 Likes
7,533

when a selct query was executed it will have how many records fetched from database

Read only

Former Member
0 Likes
7,533

nmhnh

Read only

Former Member
0 Likes
7,533

no of records read (rows processed) in database.

Read only

0 Likes
7,533

Dear,

this thread is marked as answered s no need to give answer

Read only

0 Likes
7,533

ohh...okk...new here so didn't noticed that.