Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

calculate position for decimal point

Former Member
0 Kudos

Hi experts,

I have 2 fields: value & decimal.

the requirement is that the "value" should have the number of decimal places equal to the value in field "decimal".

eg. if value = 43500 & decimal = 4, then the output should be 4.35,

if value = 1234 & decimal = 2, then output should be 12.34, and so on.

Is there any statement or FM which readily does this kind of conversion?



Product and Topic Expert
Product and Topic Expert
0 Kudos

I doubt there is FM like this.

But you can achieve oit easily using simple abap statements.

Active Contributor
0 Kudos

You can do this simply by declaring two variables, and use them for offset and output.

Former Member
0 Kudos

Moderator message - Please do not ask or answer basic questions or questions that are easily searchable - thread locked Rob