on 07-09-2014 12:32 PM
Is there any way to know length of string with out using any pre defined string function.
Ex- ' hello good morning '
i want know length of this string without using built-in methods.
Hello,
data:p_string. "Your string
data :w_num(10) value '0123456789',
w_len type i.
w_len = strlen (p_string).
Thanks
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Please find below if helpful.
Class Name: CL_SWF_EXP_WFSYST_STRING
Method: LENGTH
***********************FM*****************************
data: lv_length type SWAEXPDEF-ELEMLENGTH,
lv_string type string.
CALL FUNCTION 'SWA_STRINGLENGTH_GET'
EXPORTING
expression = lv_string
* CONDENSE_NO_GAPS =
* CONDENSE =
* WITH_LEADING_BLANKS =
* IMPORTING
LENGTH = lv_length
* EX_MODIFY_EXPRESSION =
Thanks
Sam
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.