‎2008 Jan 24 2:18 PM
Hi,
how can i find no of records of a physical table, is there any simple way something like a describe which works for internal table.
Regards
Anuj
‎2008 Jan 24 2:23 PM
DATA: W_LONG TYPE I.
SELECT COUNT(*)
INTO W_LONG
FROM SPFLI.
WRITE:/ W_LONG.
Greetings,
Blag.
‎2008 Jan 24 2:25 PM
Hi,
Go to SE11->click on contents button-> double click on NUMBER OF ENTRIES push button. You can get total no of records in that table.
‎2008 Jan 24 2:31 PM
Hi,
Please refer to the code and document below :
... COUNT( * ).
Effect
Returns the number of lines selected. If the SELECT command contains a GROUP-BY clause, the system returns the number of lines for each group. You can use COUNT( * ) instead of COUNT(*).
Example
Displays a list of all the customers on all the Lufthansa 0400 flights in the year 2001, with the number of bookings for each flight, ordered by customer name:
DATA: name TYPE scustom-name,
postcode TYPE scustom-postcode,
city TYPE scustom-city,
count TYPE I.
SELECT scustomname scustompostcode scustom~city COUNT( * )
INTO (name, postcode, city, count)
FROM scustom INNER JOIN sbook
ON scustomid = sbookcustomid
WHERE sbook~fldate BETWEEN '20010101' AND '20011231' AND
sbook~carrid = 'LH ' AND
sbook~connid = '0400'
GROUP BY scustomname scustompostcode scustom~city
ORDER BY scustom~name.
WRITE: / name, postcode, city, count.
ENDSELECT.
Thanks,
Sriram Ponna.