Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Last letter of a word

In ABAP, how can we find the last letter of a word.

For eg, if the word is ABAP , how will I find the last letter of ABAP (i.e) P.

Any help will be highly appreciated.

TIA,

Sinthu

Tags:
Former Member
Former Member replied

HI sinthu,

1. simple.

2. this is one way.

we have to use strlen, and offset concept.

3. just copy paste in new program.

report abc.

*----


data : str(10) type c.

data : l type i.

str = 'ABAP'.

*----


l = strlen( str ).

l = l - 1.

write :/ str+l.

regards,

amit m.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question