Skip to Content

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

How to find the position of the deicmal place?


I have a String '-234.45'. I need to determine it decimal place.

I have try:

SEARCH '-234.45' FOR '.'.

but the sy-fdpos is 0.

How to get the decimal place? Is there other way to get it?

Please advise.



Former Member
Former Member replied


you can try split function.

split var1 at '.' into var1, var2.

this means if it gets split decimal is present.


if sy-subrc = 0.

strlen( var1 ) + 1. will give you place of decimal point.

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