Rounding in a PCR
Hi Gurus,
I want to capture overtime times after 8 hours,in TM00 schema and want to round the OT hours as
if an employee work 8hrs 29mins it should show as 0 OT
if an employee work 8hrs 35mins it should show as 30 mins OT
if an employee work 8hrs 40mins it should show as 45mins OT
if an employee work 8hrs 50mins it should show as 45 minsOT
it should round to nearest 15 mins.......and want to include all the conditions in writing PCR
i have identified PCR TO40 to round overtime hours in TM00 schema or should i write my own PCR...
please help me out...........?????????
Akhil
Hi Akhil,
You have seen the PCR TO40 if u see here it will round the time with the constant TMRND which is 0.25 in T511k.You can insert a small rule in time for the total attendance hrs and check it and use operation ROUND S
The number field of the time pair irounded, and the start time adjuste accordingly.And then ROUNDnn where nn is the minutes u can set in your case it will be 15.
Thanks
Swati
Similar Messages
-
I am doing a calculation to determine a percentage value in a PCR by using HRS/37.5 where HRS is their planned work time for the week. The value is then multiplied by a constant. I want the final result to be rounded to 2 decimal places. How do I specify the number of decimal places using arithmetic operations and the HRS function?
Hi It works.
What I was suggesting looks like this
hrs=20
20*100000
200000/37.5
result/100000 will be rounded to two digits.I have used this somany times.
I have just tested on my system.Please try and let me know
Thanks
Venkat -
Absence quota generation with PCR in Time Evaluation
Dear All,
I am generation absence quota Annual leave = 50 through PT60- ZM04. Its daily calculation and transfered at the month end.
The quota entitlement is 30 days per year.
I have written this pcr. Have configured a time type too. but not sure why its not generating any quota.
The time type I have configured is:
Time Type: 0097
Save as day balance - No Formation
Save as period balance - 1
Store for time accounts - 1
Have assigned the time type 0097 in Base entitlement for Absence quota generation as Day Balance and even in generation rules.
Have placed the PCR with ACTIO Z003 before CUMBT fucntion.
The PCR Z003 is:
000010 D HRS?0
000020 *
000030 = D OUTAQTYP
000040 = **
000050 = 50 Z GCY ZQTY
PCR ZQTY is:
000010 D OUTWPMOLGA
000020 **
000030 99 HRS=FR50C ADDDB0097Z ADDDB0097 HRS=D0097
I didnt mention anywhere in configuration or PCR that its 30 days per year.
Do I need to do this?
Have I missed out anything, please help me.
Thanks & regards,
MajidHi,
This you can do through config also without using PCR.
Base entitlement is 30 for calender year. Selection rule- Accrual period is daily and transfer time is time evaluation period.
Use appropriate rounding rule in selection rule.
Rgds,
Lata -
Absence quota rounding in Time Evaluation
Hi All,
The monthly quota generation is 2.49962. I need to round this off too 2.50
I have written this PCR and calling it after Function QUOTA.
P2006 ZRND
000010 D OUTAQTYP?
000020 **
000030 50 ROUNDNR70
The rounding rule in T559L is as follows:
70 Round Percentage 001 0,25000 0,25000
70 Round Percentage 002 0,25000 0,50000 0,50000
70 Round Percentage 003 0,50000 0,75000 0,75000
70 Round Percentage 004 0,75000 99.999,99999 1,00000
Incl upper limit and Roll up is ticked.
The genreation is on daily basis.
If I do it on monthly basis it works fine.
BUt I need the same to be done on Dialy basis
Please help.
Thanks,
MajidHi ,
Thanks for your reply.
Cause :
Actually the employee had moved from one Personnel area to another but due to the settings same Absence quota was applicable to the employees in both cases.
Now i am not able to delimit the record in 2006 from transfer date.
Edited by: Tomesh Sahu on Jul 21, 2009 10:17 AM -
Issue with PCR to restrict absence quota
Hi Experts.
i have a requirement where the absence quota should never be over 24 at any particular time.
for this absence 24 leaves per annum with 2 leaves accumulate monthly.
we are using -ve time mgt and written a PCR to restrict absence to 24 by using Time type
VARSTLDYPP
N
Y
HRS=FR55C
HRS?24
<
HRS-24
HRS*-1
HRS?2
HRS=2
ADDDBXXXX
<
ADDDBXXXX
now the issue is when i run the simulation of time evaluation it is generating 2 leaves per year instead of
2 per month. can anybody help me solve the issue
Thanks & Regards
ramayyaI need a PCR for the below scenario. I created two types to store day balance and max entitlement to 25 days. We are not processing payroll from SAP. Any help writing PCR with details would be appreciated.
Schema we are copying TM04
Time types - storing daily balance one for below 60 days & one for after 60 days planned working time.
Vacation per calendar year 25 days not based on seniority.
Scenario:
2. Prorated entitlement for employees who will work fewer than 60 work days for company in a given year are calculated as follows:
a. 1/12 of annual vacation for every 21 days s/he performs work
b. For these purposes (60 days worked rule) the following is also considered as work performance: Planned working time from IT0007 and public holidays.
c. e.g. if hired on Nov 11, 2011, there < 60 wd remaining. They get 1/12 (25/12 = 2.1d) for every 21 work days remaining - in this case 2 periods of 21 wd, since RIM days and holidays are included as work days, for a total of 4.5 days (round up to half-day).
3. Prorated entitlement for employees who will work 60 or more work days for RIM in a given year are calculated as follows:
a. 1/12th of annual entitlement for every calendar month of completed work
b. E.g. If George is hired on July 15 2011, he gets 10.5 days of vacation entitlement.
c. The number of full months George will have worked by the end of the calendar year is five u2013 Aug to Dec incl. George gets no entitlement from the 16 days from July 15 to July 31st.
5 / 12 * 25 days = 10.4 days, rounded up to 10.5 days.
Thanks,
Mani.
Edited by: saphrtime on Apr 21, 2011 5:19 PM
Edited by: saphrtime on Apr 21, 2011 5:21 PM -
PCR Social Security: Want to use wage type amount for comparison
Dear Guru's,
hope u'll b fine and enjoying good health. Below is PCR for social security that I hav currently configured. Its working fine. However I have another scenario to add in this PCR.
Existing PCR works on the following logic
6% of Gross pay if employee's pay less than or equal to 10,000/-.
KZPESI=10000 from T511K
KZMESI=6 from T511K
IZPESI=600 from T511P
Now i want to add another comparison. also calculate Social security for employee those hire on pay less than or equal to 10,000 but currently have salary greater than 10K. for this I'll enter Social security amount in IT0014 subtype 6004. I
ZSSM Personnal Calculation Rule ZSSM
3
6004 Social security Contrib
AMT= 0001 Set
AMT+ 0002 Addition
AMT+ 0003 Addition
AMT+ 0004 Addition
AMT+ 1001 Addition
ROUNDGK100 Round AMT to next
AMT?KZPESI Comparison
<
AMT*KZMESI Multiplication
AMT/100 Division
RTE=TKSOLL Set
RTE-TKAU** Subtraction
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
=
AMT/TKDIVI Division
RTE=TKSOLL Set
RTE=TKAU** Set
MULTI ARA Multipl.amt/no/rate
AMT=IZPESI Set
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
>
if there is a value in 0014 subtype 6004 then
AMT/TKDIVI Division
RTE=TKSOLL Set
RTE=TKAU** Set
MULTI ARA Multipl.amt/no/rate
AMT=IZPESI Set
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
Want to know how I can use wage type amount in comparison. look at the above lines in bold where i want to apply
kindly help
Edited by: Imran on Oct 21, 2010 11:40 AMKZPESI=10000 from T511K
KZMESI=6 from T511K
IZPESI=600 from T511P
Social security wage type is 6004 and it is subtype of 0014.
ZSSM Personnal Calculation Rule ZSSM
3
6004 Social security Contrib
AMT= 0001 Set
AMT+ 0002 Addition
AMT+ 0003 Addition
AMT+ 0004 Addition
AMT+ 1001 Addition
ROUNDGK100 Round AMT to next
AMT?KZPESI Comparison
>
At this point I want to set another comparison based on amount in 6004.
if Amount in 6004 is > 0 then
do calculation.
hope it'll b more clear now -
PCR Social security: want to use wage type amount in decision operation
PCR Social Security: Want to use wage type amount for comparison
Posted: Oct 21, 2010 11:00 AM Reply
Dear Guru's,
hope u'll b fine and enjoying good health. Below is PCR for social security that I hav currently configured. Its working fine. However I have another scenario to add in this PCR.
Existing PCR works on the following logic
6% of Gross pay if employee's pay less than or equal to 10,000/-.
KZPESI=10000 from T511K
KZMESI=6 from T511K
IZPESI=600 from T511P
Now i want to add another comparison. also calculate Social security for employee those hire on pay less than or equal to 10,000 but currently have salary greater than 10K. for this I'll enter Social security amount in IT0014 subtype 6004. I
ZSSM Personnal Calculation Rule ZSSM
3
6004 Social security Contrib
AMT= 0001 Set
AMT+ 0002 Addition
AMT+ 0003 Addition
AMT+ 0004 Addition
AMT+ 1001 Addition
ROUNDGK100 Round AMT to next
AMT?KZPESI Comparison
<
AMT*KZMESI Multiplication
AMT/100 Division
RTE=TKSOLL Set
RTE-TKAU** Subtraction
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
=
AMT/TKDIVI Division
RTE=TKSOLL Set
RTE=TKAU** Set
MULTI ARA Multipl.amt/no/rate
AMT=IZPESI Set
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
>
if there is a value in 0014 subtype 6004 then
AMT/TKDIVI Division
RTE=TKSOLL Set
RTE=TKAU** Set
MULTI ARA Multipl.amt/no/rate
AMT=IZPESI Set
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
Want to know how I can use wage type amount in comparison. look at the above lines in bold where i want to apply
kindly help
Edited by: Imran on Oct 21, 2010 11:40 AMYou say "if there is a value in 0014 subtype 6004 then...", so I will assume that you are talking of WT 6004 in Infotype 0014.
So, in a PCR immediately after IT0014 is processed (with function P0014 in your schema), look for WT 6004. If it exists with a number (or an amount), create a temporary variable to act as a "flag" (as in ADDWT&6004 or ADDWT&HIRE).
Then, in PCR ZSSM, you can query that temporary variable with the sequence of operations NUM=& HIRE NUM?0 (or NUM=& 6004 NUM?0 ). If the return value is =, it means that there was no IT0014 with WT 6004, and if the return value is * it means that there was. -
I need to read the date of joining in PCRs. i am maintaining date specification infotype 41. how to get this date from IT 41 in PCR. What operation i need to use.. Or is there any operation which can directly give hiring date of person without maintaining 41 infotype.
pls tell its urgent.
Thanks in Advance.I sent you this information, words in bold I think would help you
Evaluating Date Specifications in Payroll
Object
Operations NUM, AMT and RTE evaluate date specifications for the
calculation of deadlines. Retrieval takes place using the function
DATES.
Two dates are determined. These are interpreted as the start and end
dates of a period. The evaluation of deadlines can return incorrect
results if the second date lies before the first date. Therefore, for
deadline calculation purposes, the first date should always be smaller
than the second date.
Date types with the following short names can be used for the
evaluation. All date types other than 'X' are only taken into account if
they are before the end of the current payroll period.
In the operations NUM, RTE und AMT, specification of the date type
follows the operand F directly.
A, B First entry from infotype 0000
C Last entry, or reentry
D Last change of individual working time from infotype 0041
In table T530, if the field KUNBZ (indicator for irregular payments)
is 05, then the start date of the work center is taken for D.
E Last change of capacity utilization level from infotype 0008
F Last change of weekly working hours from infotype 0007
A comparison is carried out with date type C for the date types D, E
and F. If the value determined for C is greater than the values
determined for D, E or F (that is, a later date), the value of C is
used for D, E or F. Any changes in the capacity utilization level or
the like before the last reentry are not evaluated. The date of the
last reentry is taken instead of this date.
G Birth date from infotype 0002
W Reentry
The last reentry date is entered in this date specification. If no
reentry data exists, the initial entry date is used. This date has
the short name 'A' in the evaluation.
X Employee leaves after the end of the period in accordance
with infotype 0000
The system checks whether there is a record for infotype 0000
(Actions) has a record where the Stat2 field has the value 0 (=
left). The start date (BEGDA) of this record is the leaving date.
This date type always has an entry. If an employee leaves after the
end of the period in question, this date will be used. If no leaving
date exists, the date December 12, 9999 is used.
Z Leaving before the end of the period in accordance with infotype
0000
The system checks whether there is a record for 0000 (Actions) where
the Stat2 field has the value 0 (= left). The start date (BEGDA) of
this record is the leaving date.
This date type always has an entry. If an employee leaves before the
period in question, this date is used. If no date is given, the date
December 31, 9999 is used.
nn Date type 'nn' from the Date Specifications infotype (0041)
Date types are taken from table T548Y.
Syntax
The operands are constructed as follows:
Operation NUM= is taken as an example: Processing is identical for
RTE and AMT:
NUM=Faaesb
F Fixed indicator for deadline calculation
aa Date type: Start date of period to be
calculated; if the date type is not 'nn,'
the second position is left blank.
e Unit, in which the duration is calculated:
T = days
W = week
M = months
C = complete months
K = complete calendar months
N = complete calendar months (rounded up)
J = Years
Y = Complete years
The difference between the individual
units is explained in
Calculation Examples
in more detail.
s End date of period to be calculated:
(blank) End of current payroll period
J End of current calendar year
A Start of current calendar year
B Start of WPBP period
No other specifications are possible.
b If the date type specified in parameter aa
does not exist for the person in question,
an alternative fixed identification is
selected. If 'SPACE' is entered, the
date 31.12.9999 is used. However, you can use
one of the date types listed above as
an alternative or enter 0
0 to set the alternative value to 0.
Example
NUM=FA_M_
F Identifier for deadline calculation
A Date type A, initial entry from infotype 0000
_ Blank; placeholder for 2-character
date type from infotype 0041
M Deadline calculation is in months
_ Blank; key date for deadline calculation
End of payroll period
_ Blank; If no specification exists for date
type A, the date 31.12.9999 is used as an
alternative.
NUM=F01M_A
F Identifier for calculation deadline
01 Date type for technical entry date from
infotype 0041
M Deadline calculation in months
_ blank, key date for calculating the
deadline
End of payroll period
A Alternative date: if no specification exists
for date type 01, the first entry from
infotype 0000 is used.
Under Calculation Examples for Evaluating Date Specifications you can
find more information and case studies regarding how to calculate the
period between a start and end date for the operations NUM, RTE and AMT.
Regards. Manuel Campos -
CATS Rounding up the Total Hours to next 1/10th hour.
Hi Everyone,
Is there any user exit or standard configuration which can be used to round up the total hours in CAT2 to the next 1/10th hour.
Eg : If the employee enters start time and End time as 08:00 and 08:06 then total hours is .1 ( 6/60 = .1)
But if the employee enters Start time and End time as 08:00 and 08:02 then the total hours should also give as .1 instead of .03 which is ( 2/60 = .03 ). That means it should round up to every next 6th Increment.
Kindly suggest,
Regards,
SAP HCMyou can round it in Time eval through PCR quering time pairs . ROUND operation can be helpful.
-
PCR for Social Security: Errro: 'Stop: No Rule in key'
Dear Gurus,
hop u'll be fine and enjoying good health. I have following requirement:
I want to calculate Social Security Contribution for all employees having Gross pay Less than or Equal to 10,000/- @ 6%.
I am writing PCR first time, which is copied from an existing PCR.
ZSSM Personnal Calculation Rule ZSSM
3
6004 Social security Contrib
AMT= 0001 Set
AMT+ 0002 Addition
AMT+ 0003 Addition
AMT+ 0004 Addition
AMT+ 1001 Addition
ROUNDGK100 Round AMT to next
AMT?ZPESI Comparison
<
AMT*ZMESI Multiplication
AMT/100 Division
RTE=TKSOLL Set
RTE-TKAU** Subtraction
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
=
AMT/TKDIVI Division
RTE=TKSOLL Set
RTE=TKAU** Set
MULTI ARA Multipl.amt/no/rate
AMT=ZPESI Set
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
Kindly guide me where is I am going wrong.
best regards,Hi,
You don´t have to worry. The idea of the forum is to give help on what you know no matter you are an expert or not.
Being ZPESI a constant from t511k it must have a K before. For example AMT?KZPESI.
Being ZMESI a constant from t511p it must have an I before. For example NUM=IZMESI
And as Remi say you should check the parameters use in the schema to call the PCR.
Hope this helps.
Kind Regards,
Edoardo -
Dear All
I am facing problem in resolving the issue of rounding of amounts. kindly guide me through the steps for PCR in schema.Dear Hassan..
Please write the following PCR for ur respective wage types
ZRND Personnel Calculation Rule ZRND
3
0001 Basic Pay
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
0002 House Rent
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
0003 Utility
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
0004 Medical
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
Call that in XAL9(ZAL9) in factoring and storage.
call this through PIT, after XPPF in ZAL9 or XAL9 what so ever.
You can use this PCR in other subschemas too.
Please do let me know if u r still facing the issue.
Other wagetypes which are not dependent on these above wagetypes should be rounded through Wage types Charateristics.
Edited by: Uzair Altaf on Oct 10, 2011 10:45 AM -
Rounding off salary components in Payresult table
Hi Experts,
I have a query around rounding off amounts in PC_PAYRESULT cluster. The basic pay should be rounded off two places from decimal ( This is done by v_512w_d, changing PC -10 (A)) but for other wage types the rounding of rule is no value post decimal and rounding off the amount after decimal to next number.
Really appreciate any help on the same. Thank you so much for all your support.
Regards,
J
Edited by: jyotsgsap on Aug 1, 2011 1:29 PMSorry , in case of wrong communication from my side, when i said about the process class 10 Spec A , it means this is the standrad one which was been provided by the SAP so for the wage types which are in IT0008 if they come into proration (i means PRCL 10 as 1 and if all them has to be rounded off in such cases instead of useing the PCRs we can go with the standrad one so i have said to go in the said manner in the previous thread) in standrad to round off the wage types we have to go with Custom PCRs if you are asking for Wage types in IT008 , 0014 , 0015 Etc
the pcr shd be inserted below XVAL if any or else u can use Spec A for wage types IT0008 , for wage types in IT0014 and 0015 you can use INAP -
Hi Gurus,
Please go through the following PCR with input & output tables and explain the calculation. What to do to get the proposed value.
IT
/092 - Rate: 12.07
WT X000 OT 1.5 rate- Number: 45.00
Z015 3 AMT?0
Z015 3 = NUM?0
Z015 3 = * RTE?0
Z015 3 = * = VALBS?
Z015 3 = * = X GCY Z115*
Z115 * VAKEYALZNR
Z115 * N VWTCL 18
Z115 * N * GCY ZZ15
ZZ15 * WGTYP?
ZZ15 * **** VALBS0
ZZ15 * **** ADDNA *
ZZ15 * **** FILLF N
ZZ15 * **** WGTYP=*
ZZ15 * **** VALBS1
ZZ15 * **** NEXTR A
ZZ15 * **** ADDNA *
ZZ15 * **** FILLF N
ZZ15 * **** WGTYP=*
ZZ15 * **** VALBS2
ZZ15 * **** ADDNA *
OT
WT X000 Rate: 18.11 Number: 45.00 Amt 814.95
Supposed formula here is: 12.07 * 45.00 * 1.5 = 814.725 ( Proposed Value )
Plese explain the above PCR calculation.Hi Remi,
Thank you for your answer.
Q. As for processing of your WT X000, what are it's Valuation Bases in V_512W_B ?
- it is valuated in current wagetype and Valuation basis 092 and rate is 150%.
Q. Have you checked through pe04 what is operation VAKEYALZNR ? Isn't it related to Alternative Payment ?
yes, it is alternative payment.
P.S. : 12.07 x 1.5 = 18.105, which will give 18.11 once it is rounded up.
A: we never used any round up function,
Though we not used the roundup function why it is rounded up. How and where can we remove this roundup.
Thank you for your help.
Rgds
-AADI -
Hello All,
I am new to Time Evaluation and need an expert guidance for below mentioned scenario:
I have a PCR as mentioned below
ZHO9 HB-Rounding of Working Hours
HRS=PNUM Set
ADDVS 3010 Add to table VS
ROUNDHR16 Round acc. to T559R
ADDVS 3011 Add to table VS
COLOP * TIP >TOP spec.TType
Here, with ROUND operation rounding is happening correctly and I can see the results in variable 3011.
Now I need to transfer this value back to TOP table and currently I am doing it using 'COLOP*'.
But TOP / TIP entry remains as it is and does not consider value of variable '3011'.
Can somebody suggest how I can transfer value of variable 3011 to TOP table ?
Thanks,
AvinashCOLOP is using the original hours value from your time pair. Use HRS to set hours to your rounded value in the variable table, then use COLOP.
-
Dear Consultants,
Can any one explain below PCR
Thanks & Regards,
NaveshHi Navesh,
The function in PCR is ROUND. You can find help in PE04.
If you go there you will see it's doing commerial rounding not round up or down. If you would do round up replace K in ROUNDGK100 with +. It will be like ROUNDG+100.
Regards,
Omid
Maybe you are looking for
-
Can't see files on MAC from File Manager on Passport
Don't know if this is truly a Link issue, but in File Manager on the Passport (both in 10.3.0 and 10.3.1.1581) I have the option of selecting either of my Mac's (both Yosemite, both on the same network) in the device menu. However no amount of waitin
-
Purchasing songs from other countries.
Is it possible to buy songs from another country, in this case from the japanese itunes site? I'd like to use my own itunes profile. I just think that its lame that you can only purchase songs from your own country. Whats the point of having itunes t
-
Toplink 9.0.4.5 gradually generate extra columns in SQL
We encounter a very interesting Toplink feature or bugs after we upgrade to 9.0.4.5 The general pattern is that when we have SQL generated that involves joining more than 1 tables, after toplink run for a while, the join SQL statement get bigger and
-
Hi there, after creating and releasing cs order type sm01, i recieve an error message in dp90 saying my cs order does not have an sd sales order item. Do i need to enter sd order in cs order? or need to configure from spro? thanks
-
I am running OSX 10.5.8 and every time I try to update itunes 9.2 to the most recent version I get this message: "The Installer could not install some files in "/". Contact the software manufacturer for assistance." Anyone here have any experience wi