Using STRLEN to find a string length in SAP ABAP

Using STRLEN to determine the length of a string variable in SAP ABAP programming

+ -

The keyword/ string function STRLEN is used to determine the length of a string in SAP ABAP programs.

Syntax: STRLEN(  ).

Using STRLEN to find a string length

REPORT ZSAPN_STRLEN.
DATA : STRING TYPE STRING.
DATA LV_LENGTH TYPE I . "variable to store length
STRING = 'THIS IS SOME STRING'.
LV_LENGTH = STRLEN( STRING ).
WRITE : LV_LENGTH. "out put will be 19

Learner Questions


No Questions by learners, be first one to ask ..!!

    Please Sign in to ask a question

    Was this lesson helpful to you? Yes No 12 People out of 12 think this lesson helpful


    Lesson Navigation

    ←Previous Chapter
    Next Lesson → SAP ABAP real-time scenarios