cancel
Showing results for 
Search instead for 
Did you mean: 

Business rule for calculating value having circular Reference

Goriparthi
Explorer
0 Kudos

Hi,

I have a requirement for India payroll calculation in EC, where the value of one pay component (Special Allowance) is dependent on another (PF) and vice - versa because which it is causing a circular reference the example for which along with the formula is below.

Example

CTC = 275000

Gross Pay = 216890 (CTC - Performance Incentive)*89.61963%

Basic = 75908 (Gross Pay *35%)

HRA = 37954 (Basic*50%)

Bonus = 25579 Fixed Value

Performance Incentive = 33000 Fixed Value

PF = 21471 (Basic+ Bonus+ Special Allowance) > 180000 then 21600 or else (Basic+ Bonus+ Special Allowance)*12%. In this case it will be the else condition since the total of (Basic+ Bonus+ Special Allowance) is less than 1800000

Gratuity = 3651 (Basic*4.81%)

Special Allowance = 77437 (CTC- Basic - HRA - Bonus - Performance Incentive - PF)

Since the PF value has a dependency on Special Allowance and at the same time the Special Allowance has a dependency on PF it is causing a circular reference.

Looking for a workaround or solution to achieve the same.

Regards

Pradeep

View Entire Topic
catmoye
Participant
0 Kudos

Hi Pradeep,

not sure if you solved this but i think that if you rewrite the formula for Special allowance as follows:

CTC- Basic - HRA - Bonus - Performance Incentive - 0.12*(Basic+ Bonus+ Special Allowance), you can get rid of the circular dependency, and it then gives you a formula for the PF, something like ABD*(CTC-PI)+(D*((1-AB-ABC-ABD)/(1+D))*(CTC-PI)) (A is 35%, B is 89%, C is 50% and D is 12%. You then have the value for PF. If it is greater than 21600, then set it to 21600. Then calculate the Special allowance

Cat