Skip to Content

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

Need only the last 7 characters from string


I have some strings that i have to process and i only need the last 7 characters out of each one.The problem is that those strings have different length each time.Is there any offset function that can help me or how can i do this in the easy way.I would not want to count the length of the string each time to process it using offsets




Try this, hope it will solve ur problem .

x(3) type c.

strn = ''aaaa aaa aaa''

x = strlen( strn ) .

x = x - 7.

strn2 = strn+x(7).

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