Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to count SAP table entries

Hi , I have to count the number of entries in the mara table which have the material number '10006877' . I do not want to select it to an internal table and count it .

Is there a direct count statement that can be added to the usual select to get this.

A code will be useful

Tags:
Former Member
replied

Hi,

You can use SELECT COUNT statement.

TABLES MARA.
DATA   COUNT TYPE I.

SELECT COUNT( * )
INTO COUNT 
FROM MARA
WHERE <condition>.

WRITE: / COUNT.

Regards,

Ferry Lianto

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question