‎2009 Sep 30 6:35 PM
<<By SEARCHING>>
Hello Gurus,
How can I find the last character of a string ?
Pleas help.
Regards,
Jainam.
Edited by: Matt on Sep 30, 2009 9:45 PM
‎2009 Sep 30 6:37 PM
Hi, Shah
Please SEARCH Before Posting BASIC Question
Reported...
Faisal
‎2009 Sep 30 6:37 PM
Hi, Shah
Please SEARCH Before Posting BASIC Question
Reported...
Faisal
‎2009 Sep 30 6:39 PM
<<stop it>>
Hi,
Have a look at this,
data: var type string,
len type i,
var1 type i.
var = 'abc1234f'.
len = strlen( var ).
var1 = len - 1.
write: 'the last character is', var+var1(1).
Regards,
Vikranth
Edited by: Matt on Sep 30, 2009 9:46 PM
‎2009 Sep 30 6:44 PM
Sorry, Vikranth
Please don't mind Reply to BASIC Question is also against the Rules Please Correct me if wrong
Faisal
‎2009 Sep 30 6:52 PM
‎2009 Sep 30 7:06 PM
Hello Jainam ,
To be honest its a bit of a basic question which can be easily found by searching in SCN. Generally even i remind those who post basic questions to search in SCN its just that i replied to you on-the-fly. Faisal is right. Its just to ensure that people search in SCN before posting. Just make sure you do a through search in SCN when posting in future.
Regards,
Vikranth
‎2009 Sep 30 7:28 PM
Hello Vikranth,
If you agree with the fact that it is a basic question why bother answering it? This forum will be a better place if we all make it a point of not answering redundant questions.
I know that we have mods cleaning up this rubbish, but unless we make a committment to stick to the Forum Rules it is hard for them as well.
@OP: Please dont make such noise. The forum rules are not decided by Faisal but by our very Mods so that we keep this ABAP Forum a very clean place.
Enough lecture for tonight !!
Suhas
‎2009 Sep 30 8:51 PM
Yes. And we deel quite robustly with people who violate those rules. Please see my comments at the top of each post.
Faisal. Respect.
matt
‎2009 Sep 30 6:42 PM
<<don't answer FAQs>>
Hi
Try this
data : str type string,
char.
data : len type i,
len1 type i.
len = strlen( str ).
len1 = len - 1.
char = str+len1(1).
write : /10 char.
Regards
Krishna
Edited by: Matt on Sep 30, 2009 9:53 PM