SAP ABAP SYNTAX FOR CLOSE AND 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 DATA SET.

CNT(h) can only be addressed from within a LOOP on a 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.

CLOSE

Basic form


1. CLOSE DATASET dsn.
2. CLOSE CURSOR c.

Basic form 1

CLOSE DATASET dsn.

Effect

Closes the file dsn , ignoring any errors which may occur. CLOSE is required only if you want to edit dsn several times. For further details, see the documentation for OPEN DATA SET .

Basic form 2

CLOSE CURSOR c.

Effect

Closes the database cursor c . CLOSE CURSOR is only required if you want to read sets of database records several times with c . For further information, refer to the documentation on OPEN CURSOR and FETCH .

CLOSE CURSOR belongs to the Open SQL command set.
24.5 RELATED POST

No comments :

Post a Comment