SAP SQL FUNCTIONS STRING



Get Example source ABAP code based on a different SAP table
  


• CONCAT ABAP_SQL_FUNC
• LPAD ABAP_SQL_FUNC
• LENGTH ABAP_SQL_FUNC
• LTRIM ABAP_SQL_FUNC
• REPLACE ABAP_SQL_FUNC
• REPLACE_REGEXPR ABAP_SQL_FUNC
• LIKE_REGEXPR ABAP_SQL_FUNC
• OCCURRENCES_REGEXPR ABAP_SQL_FUNC
• RIGHT ABAP_SQL_FUNC
• RTRIM ABAP_SQL_FUNC
• SUBSTRING ABAP_SQL_FUNC
• CONCAT_WITH_SPACE ABAP_SQL_FUNC
• LEFT ABAP_SQL_FUNC
• RPAD ABAP_SQL_FUNC
• INITCAP ABAP_SQL_FUNC
• INSTR ABAP_SQL_FUNC
• UPPER ABAP_SQL_FUNC
• LOWER ABAP_SQL_FUNC
• LOCATE ABAP_SQL_FUNC
• LOCATE_REGEXPR ABAP_SQL_FUNC
• LOCATE_REGEXPR_AFTER ABAP_SQL_FUNC
• SUBSTRING_REGEXPR ABAP_SQL_FUNC

ABAP_DDIC - SQL Functions for Strings
The following table shows the SQL functions for strings that can be used by ABAP CDS and AB_SQL . The columns CDS DDIC-Based Views, CDS View Entities and ABAP SQL indicate where a function can be used. The Table Buffer column indicates whether the function can be executed in the table buffer. SQL FunctionResultCDS DDIC-Based Views CDS View Entities AB_SQL Table Buffer
CONCATConcatenates strings. x x x x
CONCAT_WITH_SPACEConcatenates strings with a specified number of blanks in between. x x x x
INITCAPTransforms the first letter of a word to uppercase and all remaining letters to lowercase.- - x -
INSTRReturns the position of the first occurrence of a string in another string. x xx -
LEFTReturns the leftmost characters of a string with a specified length. x xx -
LENGTHReturns the length of a string. x x xx
LIKE_REGEXPRChecks whether a string contains any occurrence of a Perl Compatible Regular Expression (PCRE).-- x -
LOCATE Returns the position of a string in another string. The function enables the specification of further parameters like the starting position of the search and the number of the occurrence. - - x-
LOCATE_REGEXPRSearches a string for a PCRE pattern and returns the offset of the match.- - x-
LOCATE_REGEXPR_AFTERSearches a string for a PCRE pattern and returns the offset of the match plus 1. - - x-
LOWERTransforms all uppercase letters to lowercase letters. x xx -
LPADCreates a string with a specified length by adding a specified string to the beginning of another one. x x x -
LTRIMRemoves all trailing blanks and all leading characters that match a specified character. x xx -
OCCURRENCES_REGEXPR Counts all occurrences of a Perl Compatible Regular Expression (PCRE) pcre in a string and returns the number of occurrences . - -x -
REPLACESearches a string for all occurrences of a specified string and replaces them with another specified string. x xx -
REPLACE_REGEXPRA Perl Compatible Regular Expression (PCRE) is replaced in a string with another specified character string. - x x -
RIGHT Returns the rightmost characters of a string with a specified length. x x x-
RPADCreates a string with a specified length by adding a specified string at the end of another one. x xx -
RTRIMRemoves all trailing blanks and trailing characters that match a specified character. x x x-
SUBSTRINGReturns a substring of a specified string starting from a specified position within the string. x xx x
SUBSTRING_REGEXPRSearches a substring for a Perl Compatible Regular Expression (PCRE) pattern and returns the offset of the match. - - x -
UPPERTransforms all lowercase letters in a string to uppercase letters. x xx -
The possible operands and data types are described in the corresponding documentation for ABAP CDS, DDIC-Based Views, ABAP CDS, View Entities and AB_SQL .

ABAP_EXAMPLE_ABEXA
SQL Function UPPER
ABAP_EXAMPLE_END