cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

Business Rule : How can I round the amount into integer number

Napat_Iamlaor
Discoverer
0 Likes
972

Hi Expert,

I have a business case in order to round the amount of Salary to integer number by using Business Rule in SuccessFactors to apply for this logic

for example case,

1. If employee has salary in ones position from 0.1 - 2.4 (Rank 1) they would like to round down to zero with no digit

For Example 1

   1.1 If Employee has Salary 101,632.40 THB, They would like to show this amount as 101,630.00 THB

   1.2 If Employee has Salary 101,632.35 THB, They would like to show this amount as 101,630.00 THB

 

2. If employee has salary in ones position from 2.5 - 7.4 (Rank 2) they would like to round to 5 with no digit

For Example2

   2.1 If Employee has Salary 101,632.72 THB, They would like to show this amount as 101,635.00 THB

   2.2 If Employee has Salary 101,635.50 THB, They would like to show this amount as 101,635.00 THB

   2.3 Employee has Salary 101,637.20 THB, They would like to show this amount as 101,635.00 THB

 

3. If employee has salary in ones position from 7.5 (Rank 3) they would like to round to tens position with no digit

For Example 3

   3.1. If Employee has Salary 101,637.50 THB, They would like to show this amount as 101,640.00 THB

  3.2 If Employee has Salary 101,638.50 THB, They would like to show this amount as 101,640.00 THB

 

Thank you in advance

 

SAP SuccessFactors Platform  

 

 

 

 

Accepted Solutions (0)

Answers (2)

Answers (2)

Alex_Monteverde
Explorer
0 Likes

I believe you can use the round option, follow the instructions on the link: https://help.sap.com/docs/successfactors-platform/implementing-business-rules-in-sap-successfactors/...

There are some examples of the combinations of precision and threshold you could use:

ValuePrecisionThresholdResult
50,782.76520.00550,782.77
50,782.76510.0550,782.80
50,782.76500.550,783
50,782.765-1550,780
50,782.765-25050,800
50,782.765-350051,000
50,782.765-4500050,000
ArunSuresh3
Active Participant
0 Likes

Hi @Napat_Iamlaor 

I think your requirement will be possible with look up table and business rule.

1. Create a look up in object definition to define the Minimum Range and Maximum Rage then round to defined number.

                 Example:- Minimum Range:- 101,629.40

                                  Maximum Range:- 101,632.35

                                  Round to:- 101,630.00 (Defined number)

2. Create business rule using Look up function to validate the salary amount and set the condition to round as per the look up value definition.

Note:- You have define the look up logic for all the number range.

 

Thanks & Regards

Arun