cancel
Showing results for 
Search instead for 
Did you mean: 

PCR To compare two wagetypes and output lesser of these to Output Table

Somdeb
Active Participant
0 Kudos

Hi Experts,

I want to code a PCR wherein I want to compare only the amt of two wagetypes and output lesser amt wagetype to the output Table.

I want to do something like this :

Is

WT 01 - WT02 > 0

If Yes,

Output WT02 to Output Table.

Else,

Output WT01 to Output Table

Can ypu please help ?

Regards,

Somdeb.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

User the AMT operation to compre the amount.

1) First add amount of WT1 to a variable &****

2) Then add amount of WT2 to AMT

3) Compare AMT with &****

With Regards

Shyam V

Somdeb
Active Participant
0 Kudos

Hi Shyam,

Thank you for the response.

I have coded:

*

2390

AMT=& 2390 Set

AMT?& 2340 Comparison

<

ADDWT * OT Output table

=

>

2340

AMT=& 2340 Set

AMT?& 2390 Comparison

<

ADDWT * OT Output table

=

>

However this is not working.

Regards,

Somdeb.

Edited by: Somdeb Banerjee on Mar 29, 2010 6:00 PM

Former Member
0 Kudos

Do a small change as fllows

*

2390

AMT=E 2390 Set

ADDWT&2390

AMT=E 2340

AMT?& 2390 Comparison

with Regards

Shyam V

Somdeb
Active Participant
0 Kudos

Hi,

In th input table

Value of WT 2390 = 74.02

Value of WT 2390 = 37.01

However the Rule that I have coded seems to take the two values to be equal !!!

My rule does not specify any action if the WTs are equal.

Hence the WTs are not processed.

Regards,

Somdeb.

Former Member
0 Kudos

Hi

Did you write the logic as i suggested?

I have given AMT=E 2340 (if you want to read from IT table write as AMT= 2340)

With Regards

Shyam V

Somdeb
Active Participant
0 Kudos

Hi Shyam,

Apologies for the late reply. Thanks for your effective inputs. The rule did work. I just need to test with a couple of more scenarios.

Would also like to thank everyone else too who have contributed to this thread. It was great to share your inputs

Regards,

Somdeb.

Answers (1)

Answers (1)

kammaje_cis
Active Contributor
0 Kudos

Let me try, though I am not an expert.

AMT=E WT01

AMT?& E WT02

If >

AMT=E WT02

ADDWT * OT

Thanks

Krishna

Edited by: Krishna Kishor Kammaje on Mar 29, 2010 2:22 PM

Edited by: Krishna Kishor Kammaje on Mar 29, 2010 2:23 PM

Somdeb
Active Participant
0 Kudos

Hi Krishna,

I want to play with the IT Table not the RT Table.

Regards,

Somdeb.