2007 Dec 26 5:30 AM
Hi,
i want to know the difference between DESCRIBE TABLE.. command and SY-DBCNT.
2007 Dec 26 5:34 AM
Hi,
Describe tells how many records are there in the table
Sy-dbcnt tells number of records u retrieved
Regards
Hi,
i want to know the difference between DESCRIBE TABLE.. command and SY-DBCNT.
2007 Dec 26 5:34 AM
Hi,
Describe tells how many records are there in the table
Sy-dbcnt tells number of records u retrieved
Regards
2007 Dec 26 5:34 AM
i m not sure..but i think so that the describe table list the number of records in internal table at runtime where sy-dbcnt gives the no. of records of database table.
2007 Dec 26 5:41 AM
hi santosh,
To find out the attributes of an internal table at runtime that were not available statically, use the statement:
DESCRIBE TABLE itab [LINES lin] [OCCURS n] [KIND knd].
The DESCRIBE TABLE statement is processed before and after the table is filled. The current number of lines changes, but the number of initial lines cannot change.
The sy-dbcnt system field displays the number of records for which the desired database operation was actually carried out.
Reward points if useful.
Thanks you,
Regards.
2007 Dec 26 5:49 AM
DESCRIBE TABLE - Related to Internal Table. If u want to know how many number of records in Internal Table means it will provide the details.
SY-DBCNT - Related to Database Table. After select statement we come to know how many records we retrieved.
- S
2007 Dec 26 5:51 AM
SY-DBCNT ( No of database lines processed)
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.
· DELETEsets SY-DBCNT to the number of lines deleted.
· FETCHsets SY-DBCNT to the number of lines already read by the current cursor.
· INSERTsets SY-DBCNT to the number of lines inserted.
· MODIFYsets SY-DBCNT to the number of lines processed.
· UPDATE sets SY-DBCNT to the number of lines changed.
DESCRIBE TABLE ( No of Records in the Internal table)
- is to Determining the Attributes of Internal Tables .
To find out the attributes of an internal table at runtime that were not available statically, use the statement:
DESCRIBE TABLE : T for standard table, S for sorted table, and H for hashed table
Regards,
Maha
2007 Dec 26 6:04 AM
hi
good
SY-DBCNT->
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.
DESCRIBE->
DESCRIBE LIST
The DESCRIBE LIST statement allows you to import certain list attributes, such as the number of lines or pages, into program variables.
you need to know the attributes of list levels that were not stored in system variables during list creation, you can use the DESCRIBE LISTstatement.
To retrieve the number of lines or pages of a list, use:
DESCRIBE LIST NUMBER OF LINES|PAGES n ...
To get the page number of a particular line number, use:
DESCRIBE LIST LINE lin PAGE pag ...
To get the properties of a particular page, use:
DESCRIBE LIST PAGE pag ...
Use DESCRIBE LIST for completed lists only, since for lists in creation (index is sy-lsind) some properties are not up to date.
http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba42335c111d1829f0000e829fbfe/content.htm
thanks
mrutyun^
2007 Dec 26 6:14 AM
sy-dbcnt gives the no-of records fetched from the database.
describe gives the no-of records exist in the ITAB.
after fetching records from datyabase to ITAB, if we do not manipulate the ITAB, these 2 values r same.
if we manipulate iTAB (deleteing some rows/ adding some rows) , these values will be differ
Narendra
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |