cancel
Showing results for 
Search instead for 
Did you mean: 

If Statements in PCR

Former Member
0 Kudos

Hello,

I have a group of wage types ranging from 9010 to 9018 and another group from 9110 to 9118.

I want to write a IF statement that will check if any Wage Type exists in IT in any on of these group and

if it does then to do some calculation in table RT.

example:

If in table IT the wage type 9113 exists then run PCR ZTT2 for processing table RT.

OR

If in table IT the wage type 9013 exists then run PCR ZTT1 for processing table RT.

Any ideas?

Thanks,

Chirag.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello!

I have an unique issue in terms of calculating Gratuity for my Customer. The customer is from UAE. And like any other country, UAE also has their own gratuity policy.

Present Situation

1. Gratuity is calculated automatically by the SAP system.

2. Every increase in the Basic the system calculates using a PCR (Personnel Calculation Rule) and the Gratuity is calculated.

Issue

1. There is a change in the basic where the Basic is reduced and not Increased.

2. The system still calculates the Gratuity. However, the gratuity is calculated on the reduced basic.

Now, we want a solution which will take care of this issue, the gratuity of the old basic till the effect date should be added as an opening balance for the gratuity with the reduced basic.

I am not too sure if i have to make changes in the PCR or what could be the way out for this issue.

Request any of your expertise on this..

Regards,

Balaji T R

+91 9840192007

li_zhang
Advisor
Advisor
0 Kudos

You may also use mask to cover the range of wagetype names.

E.g.

D WGTYP=###0WGTYP?

        • addwt *

9110 Z addwt * GCY ZTT2

9010 Z addwt * GCY ZTT1

former_member193210
Active Contributor
0 Kudos

Why don't you use operation WGTYP in your PCR, as in

D WGTYP?

          • addwt *

9113 Z addwt * GCY ZTT2

9013 Z addwt * GCY ZTT1

Former Member
0 Kudos

Hi guys,

i tried this and it still did not work. I wrote this PCR ZBLL, which is called as follows:

*****************************

PIT ZBLL

*****************************

which contains the following:

**********************************************************

000010 D WGTYP?

000020 **** ADDWT *

000030 9016 Z ADDWT * GCY ZTT1

000040 9114 Z ADDWT * GCY ZTT2

**********************************************************

In the payroll run under wage type 9016 it says "Calculation rule not processed for wage type".

any ideas why?

Edited by: cpatel on Jul 26, 2010 4:38 PM

Former Member
0 Kudos

I figures out one mistake in the actual call of the PCR ZBLL i forgot to add the variable GEN in the 2nd parameter.

However the wage types that i do not wish to process are giving an error as "STOP: No rule in key ZBLL1****".

They should have been added with the line ADDWT *.

Former Member
0 Kudos

Solved, see thread below.