In ABAP, if we want to use code to get how many records there are in a database table, the usual practice is to use SELECT COUNT.
If you are using a HANA database, there is now a new way to achieve the same. There is a system view called m_tables in the HANA database, which stores the metadata of the database tables.
For a detailed description of this system view, refer to the SAP help documentation .
I wrote a tool that can query m_tables to get the number of records and storage space occupied by a series of database tables in batches.
You can get the source code of my tool at this link . To get more original technical articles from Jerry, please follow the public account "Wang Zixi" or scan the QR code below: