on 10-13-2021 5:43 PM
Dear,
We need some guides to work out the subtraction operation with some wage types in PCR, will be appreciated to get you guys' great help on this.
Our senarios is that: we have some wage types, 4000, 4040, and 4067, the calculation formula should be like below:
the amout in wt4067 = wt/101 - wt4000 - wt4040. (get the amount in /101 first, then minus 4000, and then minus 4040, finally store to wt4067 in RT).
We tried as below command lines:
--------------------------------------
*
/101
AMT-& 4000
AMT-& 4040
ADDWTE4067 RT
--------------------------------------
The calculation result is that: line 1-2 and line 5 worked, but line 2-3 (AMT-& 4000 and AMT-& 4040 didn't work).
We also tried with command something like AMT- 4000 or AMT+ 4000, neither worked, it seems the AMT did not get any value from wt4000 and wt4040, no matter subtraction or add operation...and those 2 wt should be already in IT?
We are stunk here and really need some one's great help. Thanks in advance.
-Weikko
Hi Weikko,
Here is an alternative to Armin's suggestion, this assumes you have the wage types in the IT table (and using function ACTIO):-
AMT= /101
AMT- 4000
AMT- 4040
ADDWTE4067
There are two spaces between the = or - sign, this is using the 5th variant when reading the help on operation AMT (transaction PE04)
If you are reading the wage types from the RT (depending where you are wanting to do this calculation) then you could use the first variant on the help - there is one space between the E and the wage type.....
AMT=E /101
AMT-E 4000
AMT-E 4040
ADDWTE4067
All the best,
Adrian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Adrian. I checked in the payroll running result log, and can see our PCR is in the PRT part in the Final Processing step. Seems not in PIT part. So I tried both Armin's and Adrian‘s suggestion and finally the solution working on RT works. Great thanks!
Well, then, we just got another issue to add amout in the wt of annual bonus... in this PCR, we also need to add the amount in wtwt 5000 (annual bonus) to final wt 4067, but reading wt 5000 in RT didn't work. In each month we run the regular payroll first, then run the off-cycle payroll for annual bonus (if needed).
So, in our PCR in PRT (the command line is something like PRT Z013 NOAB) part in Final Processing, how to read the amount in wt 5000 (annual bonus)? is there a relationship with the date in this wt? see, if we run the payroll in 22-24th Oct, but the date for the wt 5000 (annual bonus) is 25th,Oc. How to read the amount from wt5000 without autual proceeding the off-cycle payroll run for annual bonus..?
I tried to put AMT=E 50000, and then ADDWTE5000 RT, trying to read wt5000 to RT, but did not work.
The result we need is something like this: wt4067 = wt/101 - wt4000 - wt4040 + wt5000 (while wt5000 is not in the regular payroll run yet, so just need to read the amout but not to proceed the payroll run for annual bonus)
Thanks for guide in advance.
Hi Weikko,
I guess you are a doing a PIT. So you could try something like
*
/101 ADDWT * ADDWTE4067
4000 ADDWT * SUBWTE4067
4040 ADDWT * SUBWTE4067
That could do the job.
Good luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Armin. I checked in the payroll running result log, and can see the PCR is in the PRT part in the Final Processing step. Seems not in PIT part. So I tried both yours and Adrian‘s below suggestion and finally the solution working on RT works. Great!
Well, then, we just got another issue to add amout in the wt of annual bonus... tried to read the wt 5000 (annual bonus) but doesn't work. In each month we run the regular payroll first, then run the off-cycle payroll for annual bonus (if needed).
So, in our PCR in PRT (the command line is something like PRT Z013 NOAB) part in Final Processing, how to read the amount in wt 5000 (annual bonus)? is there a relationship with the date in this wt? see, if we run the payroll in 22-24th Oct, but the date for the wt 5000 (annual bonus) is 25th,Oc. How to read the amount from wt5000 without autualy proceeding the off-cycle payroll run for annual bonus..?
I tried to put AMT=E 50000, and then ADDWTE5000 RT, trying to read wt5000 to RT, but did not work. Thanks for guide in advance.
Well in order to work with wage type 5000 it needs to be somewhere in the tables you work with, so IT/ RT... is it?
In which infotype do you store that infotype? Usually payroll reads wagetypes for the entire month if you do a monthly payroll in functions such as WPBP - infotype 0008, P0014 - infotype 0014 or P0015 - infotype 0015. I suggest you search the protocoll for that wage type, maybe there is some logic that eliminates it in your regular run. This is where you could something like pass it to a variable.
I'm not an expert in off-cycle, I'm sorry. P0267 checks the off-cycle reason so maybe there is no standard way to read it in regular payroll. If everything else fails you could still code a custom function/ operation. Alternatively you could add a "dummy" wage type to IT0015 with the amount of wage type 5000 and use this for the calculation - if you enter 5000 using batch-input or something like that it might not be too difficult.
Good luck!
Thanks Armin, yes, adding a "dummy" wage type to IT0015 with the amount of wage type 5000 is something I am also thinking, because I have poor experience to modify the payroll schema and function/opeation- can't afford to modify and cause mal-functions of the existing payroll schema.
But, anyway, trying to do some study and test on PCR, function/opearation etc will still the 1st option and we need to spend some time on it..
Thanks Armin!
User | Count |
---|---|
89 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.