Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Processing Internal Data →  Character String and Byte String Processing →  Expressions and Functions for String Processing →  String Functions →  Common Parameters of Character String Functions 

sub - Substring

Other versions: 7.31 | 7.40 | 7.54

Syntax


... ( ... sub = substring ...  ) ...

Effect

substring is used to pass a character string whose characters are to be found or inserted. substring is a character like expression position. Only arguments with elementary types can be specified.

If a character-like data object with a fixed length is specified, any trailing blanks are ignored.


Note

The behavior displayed when an empty string is specified in substring depends on the function in question.


Example

The result of the following function call is 2.

DATA(result) = count( val = 'axaxa' sub = 'x' ).