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

How to limit an attendance type? (and how for a certain payroll area?)

Hi guys,

I've created an attendance type that I've to limit for a certain payroll area.

The limit has to be:

  1. Max 10 days in the solar year.
  2. Max 2 consecutive days.
  3. Limiting only for XX payroll area.

----

I can't set the maximum duration parameter in table V_554S_B (or T5ITIE) because it will work for all employees.

In this way I would just consider the 1st point.

I have also checked table T559P that I've never used before but it doesn't seem to be what I need.

Could you kindly help me to find out a solution, please?

Thanks in advance

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2014 at 05:25 PM

    Your best bet is to put in some code in the user exit for infotype 2001. There is no way to restrict attendance type by Payroll Area. Have you considered using Personnel Subarea groupings? However even if this works for you you still need to check on the number of days limits, so you will have to put in code for that.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 21, 2014 at 05:39 PM

    Create 2 "Counter" Time Types, such as ZABC (consecutive) and ZABT (total).

    Create a Time Evaluation PCR that will query the Attendance Type, an if it is the one you want to control, query if TT ZABC existed yesterday, and if so, what was it's value.

    If yesterday's value of ZABC was 2, generate an error since this is the third consecutive day, and

    if yesterday's value of ZABC is less than 2, query the current day to see if it's the first day of your "Solar Year". If it's not the first day of the year query yesterday's value of ZABT.

    If yesterday's value of ZABT was 10, generate an error since this the maximum was reached, and

    if yesterday's value of ZABT is less than 10, add 1 to yesterday's ZABT (HRS=LZABT HRS+1 ADDDBZABT) and to yesterday's ZABC (HRS=LZABC HRS+1 ADDDBZABC).

    If it's the first day of the year, ZABT should not be totaled with yesterday's value but ZABC should.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2014 at 11:13 AM

    Hi guys,

    after working on this customizing they have requested that limitations have to be checked during the input in the infotype 2002 and not when running TM.

    So I've looked for User Exits as Harish Krishnan said, related to this infotype and I found the following include into the FM EXIT_SAPFP50M_002 that is used for checking while saving:

    ZXPADU02

    But I feel a bit lost because I don't really know how to customize into this kind of user exit.

    And I don't have authorization for changing cause it seems to be on country side instead of customer.

    So I thought I could create a FM to check and work with dynamic actions that can be set through table T588Z.

    But I neither have authorization to modify this table.

    Do you have any suggestion please?

    Thanks a lot, best regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2014 at 11:39 AM

    Easy if you go with user Exit write simple code to check for payroll area and Max Limit ..as you wish which you feel better ...

    But no standard way to control like that..

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 29, 2014 at 05:51 PM

    If that Personnel Area has a distinct Personnel Area Subgrouping for Quota, have you considered creating an Attendance Quota?

    With it, you would only require a PCR to check on consecutive attendance days max.

    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.