Skip to Content

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

syntax check

Hi all,

How to check the last word of the sentence to have a '.'

example

hello world -


> hello world.

anycode

thks

Tags:
Former Member
Former Member replied

data: w_str type string value 'hello world',

w_len type i.

w_len = strlen( w_str ).

w_len = w_len - 1.

if w_str+w_len(1) eq '.'.

write: / 'String ends with a period'.

else.

write: / 'String doesn't end with a period'.

endif.

Arya

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