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

string length

Former Member
0 Likes
488

Hi,

Below is my requirement :

data :lv_var2(100) type c value '[D7]/[DG]',

lv_var3(100) type c,

i_count type i,

lt_data type table of ts_data,

ls_data type ts_data.

i_count = strlen(lv_var2).

i_count = i_count - 1.

lv_var3 = lv_var2+1(i_count).

split lv_var3 at '/' into table lt_data.

in i_count in need the length of the data : ir value 9.

But strlen is not working.. Please suggest me ..

3 REPLIES 3
Read only

Former Member
0 Likes
449

Hi Neha,

Try giving a space between strlen( and the variable.

strlen( lv_var2 ).

Regards,

Charumathi

Read only

Former Member
0 Likes
449

Well, there are problems in what you've written but it's not STRLEN operator...What is in the length variable in debug? seems a convoluted way to obtain a simple substring... and what is this:

split lv_var3 at '/' into table lt_data.

obviously won't work...

Read only

Former Member
0 Likes
449

Hi!

You have to let a space beside the brackets:

i_count = strlen( lv_var2 ).

Regards

Tamá