Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert

The ABAP language offers so many features that you easily can lose track of them all. A recent discussion showed that. The task is some operation on a character string and the question was how to achieve that. The first answer was to do it with regular expressions, and I guess I would have answered the same. Regular expression are general and powerful and you can achieve almost anything you want in finding and replacing characters in strings. They can be easily tested with programs DEMO_REGEX and DEMO_REGEX_TOY. Because of that one can easily forget that there are other more simple and performant means for accomplishing many fundamental tasks. Another answer pointed that out: There is a wealth of built-in functions available in ABAP, especially for string processing, that can be used for many requirements. Those functions can be nested and can use expression (especially string and regular expressions) as operands. If you do not want to break a butterfly on a wheel, built-in functions can help you in many cases to achieve your results.

As a reminder I copied the overview of the built-in functions from the documentation below. Check also the examples in the respective sections of the documentation.

Built-in Functions - Overview

The following tables show the predefined functions by purpose. Predefined functions are generally processing functions or description functions.

  • A processing function performs general processing and returns a return code according to its purpose.
  • A description function determines a property of an argument and usually returns this property as a numeric value.

Furthermore, there are logical functions that either are boolean functions that evaluate a logical expression or predicate functions that return a truth value.

Logical Functions

boolc, boolx, xsdboolBoolean functions
contains, contains_any_of, contains_any_not_ofPredicate functions for strings
matchesPredicate function for strings
line_existsPredicate function for internal tables


Numeric Functions

abs, ceil, floor, frac, sign, truncGeneral numeric functions
ipowInteger power function
nmax, nminNumeric extremum functions
acos, asin, atan, cos, sin, tan, cosh, sinh, tanh, exp, log, log10, sqrtFloating point functions
round, rescaleRounding functions


String Functions

charlen, dbmaxlen, numofchar, strlenLength functions
char_offLength function
cmax, cminCharacter-like extremum value functions
count, count_any_of, count_any_not_ofSearch functions
distanceSimilarity function
condenseCondense function
concat_lines_ofConcatenation function
escapeEscape function
find, find_end, find_any_of, find_any_not_ofSearch functions
insertInsert function
matchSubstring function
repeatRepeat function
replaceReplace function
reverseReverse function
SegmentSegment function
shift_left, shift_rightShift functions
substring, substring_after, substring_from, substring_before, substring_toSubstring functions
to_upper, to_lower, to_mixed, from_mixedCase functions
translateTranslation function


Byte String Functions

xstrlenLength function
bit-setBit function


Table Functions

linesRow function
line_indexIndex function


Labels in this area