cancel
Showing results for 
Search instead for 
Did you mean: 

Rule Problem_Help Needed

Former Member
0 Kudos

Hello Friends,

I have written following rule to calculate deduction based on two wage types. The output from 1st wage type is stored in VAR1. The calculation of second wage type is as follows where I am calculating deduction, storing it in VAR2 and comparing it. In the comparison, i need to deduct the lower value from VAR1 and VAR2 and add it to VAR3.

000010 ZERO= NR RTE=KZDD11MULTI ARA AMT/100 ZERO= R NEXTR A

000020 A D ADDWT&VAR2AMT?& VAR1

000030 * ADDWT&VAR3

000040 > AMT=& VAR1ZERO= NR ADDWT&VAR3

I have two cases. In the first case, I have VAR1= $15 and VAR2= 18 and VAR3 should be $15. So, system is doing this correctly.

In the 2nd case, I have VAR1=$15 and VAR2=$13 but still system writes VAR3=$15. I don't know why is this happening.

FYI, I am calling this rule using PRT.

Please help.

Mayuresh

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member193210
Active Contributor
0 Kudos

Try the following:

000010 ZERO= NR RTE=KZDD11MULTI ARA AMT/100 ZERO= R NEXTR A

000020 A D ADDWT&VAR2AMT?& VAR1

000030 * ZERO=RNA AMT=& VAR2 ADDWT&VAR3

000040 > ZERO=RNA AMT=& VAR1 ADDWT&VAR3

Former Member
0 Kudos

Thank you Remi for your response.

I changed the rule per your instructions but still it didnt work.

Please let me know what needs to be done?

FYI, I am processing this rule using PRT.

Mayuresh