Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Length

Former Member
0 Likes
677

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!!!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
648

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

4 REPLIES 4
Read only

Former Member
0 Likes
648

Data l_len type i.

l_len = strlen(wa_itab-field1).

Read only

gopi_narendra
Active Contributor
0 Likes
648
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

Read only

Former Member
0 Likes
649

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

Read only

kiran_k8
Active Contributor
0 Likes
648

Aswlkm,

DATA: salma(5),

LEN TYPE I.

DESCRIBE FIELD SALMA LENGTH LEN IN CHARACTER MODE.

RESULT:- LEN = 5.

K.Kiran.