‎2010 Apr 30 4:50 AM
Hi I have a text field which have legth 150 . it gets filled fully or partially. and finally i want to take only the last ten digits of the filled message into another variable. please let me know the way.
tehre is no fixed length it is flled dynamically
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
‎2010 Apr 30 5:03 AM
Hi,
you can use strlen function and can take that length in a variable then you can take the last ten words.
hope this will solve your prob.
‎2010 Apr 30 5:03 AM
Hi,
you can use strlen function and can take that length in a variable then you can take the last ten words.
hope this will solve your prob.
‎2010 Apr 30 5:09 AM
Try this way:
DATA:
V_IP_TXT TYPE STRING,
V_OFF TYPE I,
V_OP_TXT TYPE STRING.
V_OFF = STRLEN( V_IP_TXT ) - 10.
V_OP_TXT = V_IP_TXT+V_OFF(10).
WRITE:
/ V_IP_TXT,
/ V_OP_TXT.
‎2010 Apr 30 5:24 AM
Try this:
PARAMETERS: x(150) type c.
data: var1(150) type c,
var2(10) type c.
var1 = STRLEN( x ).
var2 = STRLEN( x ) - 10.
x = x+var2(var1).
write: x.
Hope this might help...
‎2010 Apr 30 6:05 AM
Hi Revanth....
Try this piece of code...
data : string type string.
data : string1 type string.
data : len type i.
data : offset type i.
string = 'fdshfjfhjh34876384yfdi3jhf80'.
len = strlen( string ).
offset = len - 10.
string1 = string+offset(10).
write string1.
This should resolve your problem..