CNT (ABAP Keyword)

CNT (ABAP Keyword) introduction & details

CNT


Basic form
... CNT(h) ...

Effect
CNT(h) is not a statement, but a field which is automatically created and filled by the system if f is a sub-field of an extract dataset .

CNT(h) can only be addressed from within a LOOP on a sorted extract.
Type Standard output length Output
C len left-justified

D 8 left-justified

F 22 right-justified

I 11 right-justified

N len left-justified

P 2*len or 2*len+1 right-justified

T 6 left-justified

X 2*len left-justified

sorted extract.

If h is a non-numeric field (see also ABAP/4 number types ) from the field group HEADER and part of the sort key of the extract dataset, the end of a control level (AT END OF , AT LAST ) is such that CNT(h) contains the number of different values which the field h has accepted in the group, i.e. the number of records in the group for which the field f has changed its value.
Related
SUM(g)

Most readed SAP Tutorials

Latest Added SAP documents

Custom Search
ABAP Tutorials ABAP Syntax BAPI SAP Jobs SAP Glossary SAP Netweaver SAP XI SAP Download SAP Interview questions

Complete SAP Study materials | SAP JOBS | PDF Tutorials   List of SAP Companies India

Google-Translate-Chinese (Simplified) BETA Google-Translate-English to French Google-Translate-English to German Google-Translate-English to Italian Google-Translate-English to Japanese BETA Google-Translate-English to Korean BETA Google-Translate-English to Russian BETA Google-Translate-English to Spanish

All of the product names here are trademarks of their respective companies. The site sapbrainsonline.com no way affiliated with SAP AG. Use information on this site at your own risk. Information furnished in the site is collected from various sites and posts from users. This site does not host any files on its server. If any compliants about the posts please contact us at sapbrain.support@gmail.com

Sitemap
web counter