Skip to Content
author's profile photo Former Member
Former Member

Count weeks in a payroll period

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?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Nov 04, 2015 at 05:54 PM

    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.


    ZWKIMWeeks in month01.01.201531.01.20154,43ZWKIMWeeks in month01.02.201528.02.20154,00ZWKIMWeeks in month01.03.201531.03.20154,43ZWKIMWeeks in month01.04.201530.04.20154,28ZWKIMWeeks in month01.05.201531.05.20154,43ZWKIMWeeks in month01.06.201530.06.20154,28ZWKIMWeeks in month01.07.201531.07.20154,43ZWKIMWeeks in monthand 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.

    Add a comment
    10|10000 characters needed characters exceeded

    • 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.

  • Posted on Nov 03, 2015 at 09:43 PM

    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.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 10, 2015 at 12:43 PM

    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.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.