Skip to Content
Author's profile photo Former Member

PCR – Subtracting a Constant Value from a Wage type

PCR’s – Subtracting Constant Value from Wage Type

For the purposes of this example, we have a wage type /194.  When the payroll runs, we want to subtract from this value, a cash amount.  The cash amount is stored in the payroll constants table T511K with the key of ZCASH

The first task is to work through your Schemas in PE01, to decide where you should call the PCR.  This is not an easy task, but try to think about when the wage type will contain a value that you want to manipulate.

Often you will want to do this just before, or after partial period factors have been calculated, which would be before or after schema xAL0 (e.g. GAL0 for UK).

Once you have found where to put your call to the PCR, open up another session and create the PCR like so:

Note, this example is shown using the original ‘table’ method of editing PCR’s which is often easier to work with.  So, to follow this example, ensure you are using table display.  To turn table display on/off from PE02, go to the top menu, and click on table display.

now on with the example……

Go to transaction PE02, create a PCR starting with Y or Usually Z.

Here for this example, we do not enter the ES grouping and wage type, simply click the <create> button.

On the following screen, enter a description and enter C for the program class = Payroll, then click <save>.

Go back to the front screen, and enter the wage type number you want the PCR to run for.  In this example, we are entering * for the ES grouping which means this part of the PCR runs, irrespective of the ES grouping for PCR’s.

Here we enter as shown and click <change> even though it does not exist yet.   This displays the following screen:

This is a blank PCR !

Now lets consider what we need the PCR to do: when it’s called, the input table of wage types (IT) will have a value in the amount of wage type /194.  We want to subtract from this, the amount stored in T511K with code ZPEND.

The simple PCR to do this looks like so:

When you’ve entered this, click <save> and check the syntax by pressing . 

The PCR explained:

The commands entered all have to start under the + on the top line.

We see the first command is AMT-KZCASH. This is quite simple, it means subtract from the amount of this wage type (AMT-) the value of the constant ZCASH in table T511K (KZCASH).  This performs the calculation we want and is almost complete.

One important thing to realise about PCR’s is that when a PCR is called for a wage type, the values contained are LOST unless you specifically pass them back to the IT.  So, this is the command ADDWT *. Which adds the wage type back to the IT.

Calling the PCR from a Schema

That’s the PCR created, all that remains is to change the schema to call the PCR.  Go to PE01 and edit your main payroll schema, clicking through into sub-schemas until you find the appropriate place to call your PCR.  Bear in mind things like, should it call before partial period factors?, before or after gross to net etc.  In this example, we have called it just after partial period factoring in our copy of schema GAL0.

You can see line 150 is where we have called the PCR. 

PIT passes the IT table of wage types, YA01 is the name of the PCR.

NOAB means call irrespective of the ES Grouping for PCR’s. 

The 3rd column sometimes contains GEN which calls the PCR irrespective of the wage type.  By leaving it blank we call the PCR with the wage type number assigned.

All that remains now is to run the payroll with the log on, and check it works properly.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Chiedu Emenyonu
      Chiedu Emenyonu

      Hello, Harris, please can you provide the screen shots your referred to? it is blank.