09-09-2008 10:57 AM
i want to show the last 3 charecter from a string ,
how do i do that
09-09-2008 11:00 AM
Hi,
Try this,
DATA : wf_len type c.
wf_len = strlen(wf_string).
Wf_len = wf_len - 3.
write : wf_string+wf_len(3).
Regards,
Sachin M M
Edited by: Sachin Mathapati on Sep 9, 2008 3:30 PM
09-09-2008 11:00 AM
Hi,
Try this,
DATA : wf_len type c.
wf_len = strlen(wf_string).
Wf_len = wf_len - 3.
write : wf_string+wf_len(3).
Regards,
Sachin M M
Edited by: Sachin Mathapati on Sep 9, 2008 3:30 PM
09-09-2008 11:02 AM
hi Atiul,
use this
data v_len type p.
v_len = strlen( v_string ).
subtract 3 from v_len.
write: v_string+v_len(3).
regards,
Peter
09-09-2008 11:03 AM
Hi,
I hope the below link can help you.
http://help.sap.com/saphelp_nw04/helpdata/en/79/c55470b3dc11d5993800508b6b8b11/frameset.htm
Thanks,
Khushboo.
09-09-2008 11:04 AM
DATA a TYPE string VALUE 'satharra'.
data b TYPE i .
b = STRLEN( a ).
b = b - 3.
WRITE a+b(3).
09-09-2008 11:09 AM
try it this way:
Data:
w_string type string,
w_strlen type i.
w_string = 'abcdecbsjdbjkl'.
w_strlen = strlen( w_string ).
w_strlen = w_strlen - 3.
w_string = w_string+w_strlen(3).
Write:
w_string.
Regards and luck,
Pritam.
09-09-2008 11:20 AM
Hi,
Data:
w_name type string,
w_str type i.
w_name = 'atiul eshan'.
w_str = str( w_name ).
w_str = w_str - 3.
w_name = w_name+w_str(3).
Write:
w_name.
Regards,
Sravanthi
09-09-2008 11:30 AM
Hi,
RIGHT(@SHORT_TEXT,3)
Displays the last three characters of the string. For example, a value of FINALCOST would be displayed as OST.
Hope that helps.
Regards,
Surinder
09-09-2008 11:37 AM
Hi,
data: name type char length 10.
data: len type i.
name = 'sap.sdn'.
len = strlen(name).
len = len - 3.
name1 = name0(len).
write: name1.