10-01-2010 2:48 PM
Dear forum members,
I`ve written a program that selects some specific entries from different database tables if they exist. Now I need to know how to count the lines that have been read from those tables.
Here´s a part of my coding:
...
SELECT bukrs FROM EVER appending TABLE lt_tab
WHERE bukrs = '2101'.
SELECT bukrs FROM KNB1 appending TABLE lt_tab
WHERE bukrs = '2101'.
DESCRIBE TABLE lt_tab LINES n.
IF n = 0.
...
Now I need the number of the lines of the tables to be shown (that have been read in ever or in KNB1) !?
Thank`s in advance
10-01-2010 2:53 PM
After each SELECT you can check the value of SY-DBCNT. Thsi returns the number of records selected.
10-01-2010 2:57 PM
10-01-2010 3:11 PM
10-01-2010 3:18 PM
Moderator message - Please do not ask or answer basic questions - thread locked Rob
10-01-2010 3:19 PM
Might I suggest that if you're an inexperienced developer that you read the help files as you program? This answer is explained clearly in the help files for SELECT - you'll become a better developer if you do this...