09-13-2007 4:23 AM
Hi experts!!
Do you if theres a way on how to get the lenght of a variable.
example::
wa_itab-field1
i need to get watever length it will have..
somewhat dynamic..please help me..
more points!!!
09-13-2007 4:30 AM
first of all you have to take the variable value in a character variable...
declare like this
data : vchar(50) ,
len type i.
vchar = wa_itab-field1.
len = strlen( vchar ).
write : / len.
regards
shiba dutta
09-13-2007 4:28 AM
09-13-2007 4:29 AM
PARAMETER : p_c(20) TYPE c.
DATA : len TYPE i.
DATA : str TYPE string.
str = p_c.
len = strlen( str ).
WRITE : len, str.
Check this code
Regards
Gopi
09-13-2007 4:30 AM
first of all you have to take the variable value in a character variable...
declare like this
data : vchar(50) ,
len type i.
vchar = wa_itab-field1.
len = strlen( vchar ).
write : / len.
regards
shiba dutta
09-13-2007 4:30 AM
Aswlkm,
DATA: salma(5),
LEN TYPE I.
DESCRIBE FIELD SALMA LENGTH LEN IN CHARACTER MODE.
RESULT:- LEN = 5.
K.Kiran.