Skip to Content
0
Former Member
Mar 18, 2011 at 10:58 PM

Rule Problem_Help Needed

20 Views

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