cancel
Showing results for 
Search instead for 
Did you mean: 

Rounding off to nearest number- SF compensation

Ritanshi
Participant
0 Kudos

Hello Team,

Can you please help in rounding the value to nearest 10 places. I have already tied implementing below blog given by Xavier. I would like to convert value from 4020 to 4000 .

Tried with formula as:- round(‘halfUp’,round(‘halfUp’,lumpSum)/10)*10. It throws the same value as 4020.

https://blogs.sap.com/2020/09/29/how-to-use-dates-in-formulas-in-compensation-worksheets/

Can you pl help me in validating the formula to convert the value to 4000.

Thanks

Ritanshi

View Entire Topic
FrantisekHumpal
Explorer

Hello Ritanshi,

If you want to round to the nearest hundred, try following:

round(‘halfUp’, lumpSum/100)*100

  • 4020 will be rounded to 4000
  • 4080 to 4100

If your intention is to round to the nearest ten, than the given example is correct

round(‘halfUp’, lumpSum/10)*10

  • 4020 will be remain 4020
  • 4082 to 4080
  • 4051 to 4050

Hope this helps.

Frank