Parameter | Reference | Type | Length | Default | Optional | Text |
---|---|---|---|---|---|---|
STRING | 0 | String |
Parameter | Reference | Type | Length | Text |
---|---|---|---|---|
LENGTH | 0 | Length of the string |
Functionality This function module calculates the number of characters in a string.Leading blanks are also counted, trailing blanks are not. Examples ' a b ' has length 4. Sample call: DATA: LEN TYPE I. CALL FUNCTION 'STRING_LENGTH' EXPORTING STRING = ' abcdefg ' IMPORTING LENGTH = LEN. Note The ABAP/4 keyword COMPUTE ... = STRLEN(...) provides the samefunctionality as the function module. Please refer to the ABAP/4documentation for The ABAP/4 language element provides better performance than thefunction module call. The call was retained to ensure compatibility with future releases. String length: The number of characters up to the last character String whose length is to be calculated. |