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 text field length

Former Member
0 Likes
424

Hi I have a text field which have legth 60 . it gets filled fully or partially. and finally i want to take only the last ten digits into another variable. please let me know the way

eg error in the material whcih have the number as 4000888

here i want the last 10 characters to be taken.

the length of this message can varry

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
399

Hi,

Below is the logic to get the last 10 charaters of the message.

data : var1(60) type c,

var2(10) type c,

var3 type i.

var3 = strlen( var1 ).

var3 = var3 - 10.

var2 = var1+var3(10).

Regards,

Naveen

1 REPLY 1
Read only

Former Member
0 Likes
400

Hi,

Below is the logic to get the last 10 charaters of the message.

data : var1(60) type c,

var2(10) type c,

var3 type i.

var3 = strlen( var1 ).

var3 = var3 - 10.

var2 = var1+var3(10).

Regards,

Naveen