on 11-03-2015 1:57 PM
HI all,
How can I count weeks in a payroll period.
I want to know how many weeks are in
01.01.02015 - 31.01.2015
what operation or function do I use?
Regards
Paul
Hi Paul,
If there have a integration in between payroll and time management then its easy to bring the no weeks value from time management .
Now the week is keep varying by month to month and I don't think so there have any standard operation is available in payroll so its better go with custom function which will give you the required output.
Regards,SD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could create a Constant in table view V_511K that would hold the number of weeks in a month, and query that constant in a pcr.
Example:
ZWKIM | Weeks in month | 01.01.2015 | 31.01.2015 | 4,43 |
ZWKIM | Weeks in month | 01.02.2015 | 28.02.2015 | 4,00 |
ZWKIM | Weeks in month | 01.03.2015 | 31.03.2015 | 4,43 |
ZWKIM | Weeks in month | 01.04.2015 | 30.04.2015 | 4,28 |
ZWKIM | Weeks in month | 01.05.2015 | 31.05.2015 | 4,43 |
ZWKIM | Weeks in month | 01.06.2015 | 30.06.2015 | 4,28 |
ZWKIM | Weeks in month | 01.07.2015 | 31.07.2015 | 4,43 |
ZWKIM | Weeks in month | and so on until 2020 or more |
Note that if you require more decimals, you could use 428571.43 (instead of 4.43) and divide the value of Constant ZWKIM by the value of Constant GENAU (100000.00) in your PCR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You also write a rule. If you look at the documentation of the operation NUM, using t code PE04, you can verify the information for 6 place operand. From here you can go into 2nd Variant(highlighted). That will tell what to use to determine number of calendar days in a month using specification G. Using this you can store the number of days for the month in a variable and then divide that by 7 to determine number full weeks in a month. If you want to find out how many calendar weeks are in a month, that can be tricky but you can figure that out from here.
Using this you can also count how many Sunday's are in the month or Monday's in the month. Based on the counted days of each week day you can determine the number of calendar weeks.
Hi Paul:
Not sure you can achieve this using standard operation. I know you can use SETIN X=WW when processing ZL table but that would only fetch week number into your variable split.
Cheers,
Antoine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
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.