Description Functions

The argument arg of a description function is a data object that is to determine a property. The return value for all description functions belongs to the type i. There are length functions for elementary data objects and a line function for internal tables.

Length Functions

The following table lists the length functions. The arguments of the functions must be character-like, with the exception of the function xstrlen. An argument for the function xstrlen must be byte-like.

Function func Return value
charlen Length of the first character of arg in the code page used: 1 for non-Unicode single-byte code; 1 or 2 for non-Unicode double-byte code; 1 for Unicode with single Unicode characters; 2 for Unicode with double unicode characters;
dbmaxlen Maximum length of a string defined in the ABAP Dictionary (RAWSTRING, SSTRING, STRING). If the string is unlimited, the constant abap_max_db_string_ln or abap_max_db_rawstring_ln is returned from the type group ABAP.
numofchar Same as for the function strlen, except that in this case when a non-Unicode double-byte code is used, a character that occupies 2 bytes is only counted once.
strlen Number of characters in arg; blanks at the end of data objects with a fixed length are not counted, although they are counted in type string data objects. If you use a non-Unicode double-byte code, a character that occupies 2 bytes is counted twice.
xstrlen Number of bytes in arg.

Before Release 6.10, only the length function strlen was available. The argument of strlen could also be byte-like. Since Release 6.10, the argument for all length functions except xstrlen can only be byte-like in non- Unicode programs.

Line Function

... lines( arg ) ...

The function lines determines the number of lines in an internal table. The argument arg must be an internal table.