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

REGARDING LENTH

Former Member
0 Likes
636

HI ALL,

HOW TO FIND LENTH OF NUMERIC FIELDS...........?

REGARDS,

IMRAN

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
618

Hi,

check this code :

data: len type i.

DATA : a type string.

a = '23232323'.

len = strlen( a ).

write : len.

reward points, if helpful,

Sandeep Kaushik

5 REPLIES 5
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
618

Hi,

What you can do is ASSIGN it to a STRING Variable and then use STRLEN().

As follows.

DATAL str type string.

str = num.

strlen(str) wil give you the result.

Regards,

Sesh

Read only

Former Member
0 Likes
618

Hi,

move the numeric field into character field

and use the key word

strlen ( char )

reward points if helpful

thanks & regards,

venkatesh

Read only

Former Member
0 Likes
618

hi Imran,

use DESCRIBE Statement

DATA: FLD(8),
      LEN TYPE P.
DESCRIBE FIELD FLD LENGTH LEN.

Read only

Former Member
0 Likes
619

Hi,

check this code :

data: len type i.

DATA : a type string.

a = '23232323'.

len = strlen( a ).

write : len.

reward points, if helpful,

Sandeep Kaushik

Read only

Former Member
0 Likes
618

hi

i think this code will be self explanatory to you

data i1 type i.

data i2 type i.

i1 = 6532.

write i1.

DESCRIBE FIELD i1 LENGTH i2 in BYTE MODE.

write i2.

reward points if usefull