CNT : ABAP Keyword a day
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)
———————
ABAPer, mail: abap.community@gmail.com http://abaplearner.blogspot.com
If you like this post, you may as well like these too:
- EXTRACT : ABAP Keyword a day EXTRACT Basic form EXTRACT fg. Effect Writes all fields of the field group fg (see FIELD-GROUPS) as one record to a sequential dataset (paging). If a field group HEADER...
- AT : ABAP Keyword a day AT Events in lists- AT LINE-SELECTION.- AT USER-COMMAND.- AT PFn.Events on selection screens- AT SELECTION-SCREEN.Control break with extracts- AT NEW f.- AT END OF f.- AT FIRST.- AT LAST.-...
- COLLECT : ABAP Keyword a day COLLECTBasic formCOLLECT [wa INTO] itab.Addition… SORTED BY fEffectCOLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab...
- CLEAR : ABAP Keyword a day CLEARBasic formCLEAR f.Additions 1. … WITH g2. … WITH NULL EffectResets the contents of f to its initial value. For predefined types (see DATA ), the following initial values...
- EXPORT : ABAP Keyword a day EXPORT *Export data - EXPORT obj1 ... objn TO MEMORY. - EXPORT obj1 ... objn TO DATABASE dbtab(ar) ID key. - EXPORT obj1 ... objn TO DATASET dsn(ar) ID...

















Leave a Reply