1. ABS absolute value
2. ROUD:
In addition to calling functions, there is another usage:
Round (val = arg {dec = n} | {prec = n} [mode = m])
3. SUBSTRING:
SUBSTRING (VAL = GS_STRING OFF = GI_FLAG-1 LEN = 1)
1. substring (val = text [off = off] [len = len])...
2. substring_from (val = text {sub = substring} | {regex = regex}
[Case = case] [occ = occ] [len = len])...
3. substring_after (val = text {sub = substring} | {regex = regex}
[Case = case] [occ = occ] [len = len])...
4. substring_before (val = text {sub = substring} | {regex = regex}
[Case = case] [occ = occ] [len = len])...
5. substring_to (val = text {sub = substring} | {regex = regex}
[Case = case] [occ = occ] [len = len])...
Example
The return codes of the following function cballs are: "CD", "CDEFGH" .., "EFGH" .., "AB" .., and "ABCD ".
DATA result TYPE string.
Result = substring (val = 'abcdefgh' off = 2 len = 2 ).
Result = substring_from (val = 'abcdefgh' sub = 'CD ').
Result = substring_after (val = 'abcdefgh' sub = 'CD ').
Result = substring_before (val = 'abcdefgh' sub = 'CD ').
Result = substring_to (val = 'abcdefgh' sub = 'CD ').
ROUND details:
Effect
This function rounds a decimal floating point number declared as an argument for the parameter val. A data object specified for arg is converted to the data type decfloat34 before the function is executed, if necessary.
If the parameter dec is given a value, the value entered is rounded to the number of decimal places specified in n and returned. data objects of type I is expected for n. the value of these data objects cannot be less than-6144. if a negative value is given, the relevant whole number place is rounded.
A rounding can reduce and but cannot increase them. if dec is specified, the mantissa of the return code does not contain any zeros after the position where the rounding applies. if prec is specified, the input value is returned without being changed, if the specified precision is greater than or equal to the input value.
You can use the mode parameter (optional) to set the rounding type. for m it is only possible to specify values that exist as ROUND _... constants in class. the following table shows the possible rounding rules. if mode is not given a value, specified cial rounding is used.
SUBSTRING usage instructions:
In the argument, the substring functions determine a substring and return it.
The substring is determined as follows:
The function substring_from scans text for the match (specified in) with the character string specified in or with the specified in and returns the subrange of the length from the offset of the found location. if len is not specified, the substring is returned to the end of the character string. if substring is empty, an exception from the class CX_SY_STRG_PAR_VAL is raised. the search is case-sensitive by default, but you can override this with the parameter case. if no substring is found, the return code is empty.
The function substring_before works in the same way as substring_from, but the subrange of the length is returned, before the offset of the found location. if len is not specified, the subrange is formed from the start of the character string.
The return code has the type string accordingly.
Note
The performance of the substring functions is not as good as a direct. They do, however, allow you to use in all operand positions.
Some common functions of ABAP