Days of absent

Hello Experts,
my requirement is  to calculate the number of days the employee absent in a given period of time..the employee might be full time(wrks 5 days ina week)  or part time( wrks less than 5 days in a week) .
Thanks

Hi,
try this short example:
DATA: TAGE TYPE I.
DATA: DATBEG LIKE SY-DATUM VALUE '20080101'.
DATA: DATEND LIKE SY-DATUM VALUE '20081231'.
WHILE DATBEG <= DATEND.
  CALL FUNCTION 'DATE_CHECK_WORKINGDAY'
    EXPORTING
      DATE                = DATBEG
      FACTORY_CALENDAR_ID = 'XX'  "-> your factory calendar
      MESSAGE_TYPE        = 'I'
    EXCEPTIONS
      DATE_NO_WORKINGDAY  = 4.
  IF SY-SUBRC <> 4.
    TAGE = TAGE + 1.
  ENDIF.
  ADD 1 TO DATBEG.
ENDWHILE.
WRITE: / TAGE.
Regards, Dieter

Similar Messages

  • Consider the Off day as Absent day

    Hi Experts,
    i am facing one problem while marking absence of employees in PA30 (IT2001)
    Absence is being marked from 06.01.2012 to 08.01.2012 system gives below error message
    "Last day 08.01.2012 of attendance/absence is a day off (att./absence type LWP)"
    If an employee goes on Leave without pay:
    My problem is how to Consider this Off day as Absent day for Employee so that his salary is deducted for this Off day also ?
    thanks

    Hi,
    Whatever you raised the issues with possible Counting rule..
    I was mentioned every thing in my earlier reply.. You need to select all week days, select all DWS class (0-9), select Holiday class (Depends upon client business, otherwise select not a public holiday),  select All day types..Select all counting class, select conditions for planned hours (two options i mean both), select conditions for absence/attendance (two options, i mean both of that), counting in days in hours and days as"100".
    the save record, Enough it will work..
    Note: you need to do all your ESG for time Quotas, PSG for Time Quotas which of the using all counting rules i mean your create 3 groups and 3 counting rules (With same number only) for LWP then need to changes all the rules.
    Hope this clear..

  • Auto Calculation of Calendar and absence day on 2001 screen.

    dear gurus
    I have half day absent type Z108, subtype of 2001.
    i want to default calender days on 2001 screen.
    I mean, when user select to create Half day leave/absent on 2001 and subtype z108,
    calendar day and absence should be calculated 0.5 automatically.
    I have worked with T554L,V_554S_G,V_T554E,V_T554C,T556 but didnt work
    at this moment, I am getting this on 2001 screen
    Absence hours                8,00
    Absence days                 1,00
    Calendar days                1,00
    when select Z108.
    I want above 3 as
    Absence hours                4,00
    Absence days                 0,50
    Calendar days                0,50
    kindly help in this scenario.

    Hi Monam,
    Can yuou check the view V_T554S for your absence type.
    The minimum duration and maximum duration in 'Input Chceks' Box should be '000' and '999'.
    Minimum duration in days                                                                               
    The Minimum duration in days defines the minimum permitted duration of
        an attendance or absence.                                                                               
    Attendances and absences that are allowed to last for less than one   
        workday are assigned the indicator 000. Attendances and absences that 
        are to be rejected by the system if they are shorter than one day are 
        denoted by an indicator greater than or equal to 001.                                                                               
    Dependencies                                                                               
    In the Unit field, you determine which of the three durations in days 
        should be used for the validation.                                    
    Thanks & Regards, Swapnil Mishra

  • Attendance Capturing : Training and Event Management

    Hi Experts,
    I'd like to know how to capture attendance for a Business Event.
    For an example,
    We have a Business Event (Course), say, Verbal Communication Level 1,
    Start Date : 17.04.2014            End Date  :  21.04.2014
    Each day schedule is as follows
    Start Time : 09:00:00hrs           End Time  : 15:30:00hrs
    1st session   : 9.30am to 11.00 am       break : 11.00 to 11.30am
    2nd session  : 11.30am to 1.00pm       lunch : 1.00pm to 2.00pm
    3rd session   :  2.00pm to 3.30 pm
    now my questions are,
    1. is there any standard way to capture attendance of the employees for the event?
    2. how to find get the attendance for each sessions ?  (say, present in morning session and absent in afternoon session)
    3. How to capture attendance for the vent in each day ? (say, present in first 2 days and absent in remaining days)
    i would like to know, among booked attendees, who all are present for the event and absent for the event?
    thanks in advance

    Hi Sebin,
    When you book the employees to event, automatic relation ship is created in table HRP1001, relationship type A025.
    But for your 2nd and 3rd questions, we cannot identify it is not possible in standard to capture partial attendance OR partial absence.
    OR you can create a curriculum and prepare events for each of the days and capture the day wise attendance/absence.
    Hope the above clarification clears your doubt.
    Thanks
    Srinivas Ch

  • Salary increase with batch but exception

    Hi everyone,
    When you use a batch to create new IT0008 for annual salary increase, how do you deal with exceptions ? (i.e employee is in long absence and will be eligible to the salaray increase only at its return)
    Most of my experiences when I was HR data analyst was to deal manually with these exceptions. Did any one found a great idea?
    Thanks a lot on the behalf of my HR data collegue

    Hi
    Thats is the only way i also think.
    Well on the techinical side i think if employee is in long absence in the program itself if condition is maintained like it should check first employee's time infotypes and according to the requirement let criteria is 20 days continous absent or 7 days continous absent then it should skip the upadation of it 8 otherwise update it.
    Now those who are not selected keep a record of all those in other file and update it by same program with conditions.
    less manual intervention is needed in this case but more program cost.
    Manoj Shakya

  • Rectifying Time evaluation errors

    Hi Gurus,
    Q.1 I want to know how the errors generated through Time evaluation are rectified.
    can we use PT40 and it wud be great if explain the process of rectifying errors.
    Q.2 We have rule where we have to mark a day as absent if an employee is late by 30 minutes? can some body guide me how to do this and which rule has to be writen how?
    Thanks in Advance!!
    Regards,
    Anil Kumar

    Hi Anil,
    May be I can try answering your first question:
    Regarding PT40 (Time evaluation), usually the User runs the program in the test run mode if the number of employeea are less. If the employees are more, then actual run is made directly but in batches of 500+
    Once you get the errors, the system will show the error with description for each employee record.
    The only way to correct it is to manually go into the employee record and make changes to the master data. There could be some errors where IT 0007 or IT 0041 is not maintained, we need to create these records from the start of the hire or the start of the financial year.
    Then the program is run again for those employee records, then the quotas get updated for those employees. Hope this suffices.
    Regards,
    Sridhar.

  • Calculate Present, absent days

    in my asp.net+vb+sql web is was trying to make a calculation of absent days. There are two dropdown lists to select Month , Year
    if i select Jan and 2015 in drop downlists. i want out put as 
    MID, Name, Room_No, Preasnt_days, absent_days
    i made the tables and inserted data into it. i was not able to query in correctly.
    I had made  the sql fiddle here http://sqlfiddle.com/#!6/e5a20
    I am a System Administrator at Vadodara

    sir, if you watch my fiddle there is a problem if person is absent from 1 Jan 15 to 2 Feb 2015 as per the query it shows 32 dats absent as shown below.
     http://sqlfiddle.com/#!6/e5a20/1
    I am a System Administrator at Vadodara
    Hi Baiju,
    In your sample data, there are only Out_dt and In_dt, and the two date can be in different month. It's hard to give the Present and Absent day in a particular month. As Vaibhav said, you can Datediff function to return the days between Out_dt and In_dt.
    However this result can be incorrect when the two date belong different month. What you can do is alter the table structure. Record users present or absent every day, then you can return the present and absent day by using COUNT function for a particular
    month.
    http://stackoverflow.com/questions/4322406/to-count-the-no-of-days-present-and-absent
    Regards,
    Charlie Liao
    TechNet Community Support

  • Consecutive Absent Days  Query.. Pls Help Gurus

    I have a table which stores attendance information
    For eg:
    Emp_No Date
    100 01-APR-2010
    102 05-APR-2010
    100 02-APR-2010
    I need a query with parameter From Date and To date..
    My Query Output should be like this .. considering that employee 100 is absent for 8 consecutive days and employee number 102 is absent for 2 consecutive days..
    It should return number of consecutive days he is absent.
    Empno Consecutive Days
    100 8 Days
    102 2 Days
    Pls Help Gurus.
    Edited by: suzvino on Jun 21, 2010 12:14 AM

    TUBBY_TUBBZ?with data as
      2  (
      3     select 100 as emp_no, to_date('01-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      4     select 102 as emp_no, to_date('05-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      5     select 100 as emp_no, to_date('02-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      6     select 100 as emp_no, to_date('01-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      7     select 100 as emp_no, to_date('03-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      8     select 100 as emp_no, to_date('04-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      9     select 100 as emp_no, to_date('05-APR-2010','dd-mon-yyyy') as absent_date from dual union all
    10     select 100 as emp_no, to_date('06-APR-2010','dd-mon-yyyy') as absent_date from dual union all
    11     select 100 as emp_no, to_date('07-APR-2010','dd-mon-yyyy') as absent_date from dual union all
    12     select 100 as emp_no, to_date('08-APR-2010','dd-mon-yyyy') as absent_date from dual union all
    13     select 100 as emp_no, to_date('09-APR-2010','dd-mon-yyyy') as absent_date from dual
    14  )
    15  select
    16     emp_no, max(level)
    17  from data
    18  connect by prior emp_no = emp_no and prior absent_date = absent_date - 1
    19  group by emp_no
    20  having max(level) >= 8;
                EMP_NO         MAX(LEVEL)
                   100                  9
    1 row selected.
    Elapsed: 00:00:00.01
    TUBBY_TUBBZ?Think i misread the post, so the query should be
    TUBBY_TUBBZ?with data as
      2  (
      3     select 100 as emp_no, to_date('01-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      4     select 102 as emp_no, to_date('05-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      5     select 100 as emp_no, to_date('02-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      6     select 100 as emp_no, to_date('01-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      7     select 100 as emp_no, to_date('03-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      8     select 100 as emp_no, to_date('04-APR-2010','dd-mon-yyyy') as absent_date from dual union all
      9     select 100 as emp_no, to_date('05-APR-2010','dd-mon-yyyy') as absent_date from dual union all
    10     select 100 as emp_no, to_date('06-APR-2010','dd-mon-yyyy') as absent_date from dual union all
    11     select 100 as emp_no, to_date('07-APR-2010','dd-mon-yyyy') as absent_date from dual union all
    12     select 100 as emp_no, to_date('08-APR-2010','dd-mon-yyyy') as absent_date from dual union all
    13     select 100 as emp_no, to_date('09-APR-2010','dd-mon-yyyy') as absent_date from dual
    14  )
    15  select
    16     emp_no, max(level)
    17  from data
    18  connect by prior emp_no = emp_no and prior absent_date = absent_date - 1
    19  group by emp_no;
                EMP_NO         MAX(LEVEL)
                   100                  9
                   102                  1
    2 rows selected.
    Elapsed: 00:00:00.01Edited by: Tubby on May 30, 2010 11:00 PM
    Added second query since i misread the post originally.

  • Team Calendar Iview showing all employees absent for every day?

    Hi All,
    We're using r/3 4.7, ESS 50.4 and MSS 60.1.20.  The team calendar displays with all employees absent for every day.  Clearly, this is not correct.
    Is there extra config to be done or something that we are missing?
    Thanks in advance,
    Liz.

    config issue

  • Over 30 day absent student list...

    I am trying to pull the names of all students who did not attend a class after 30 days. I usually do the MYsql syntax first before I write it for coldfusion. Each student's name in my meeting table is identified by an ID, studentID and meetingdate. Each studentID is also identified next to a date column showing that they were present. I would like to run a code that will identify all the students who's ID was null during the last 30 or so days as specified. I am able to run students who never came to class since the formation of the meeting table. However I am finding it difficult to specify the names of students who were not present (or null value) during a specific time span.
    /* This code below, which works just fine, will return a list of all of the students who never attended since the creation of the meeting table*/
    SELECT  trim(concat(name.fname,' ' ,name.Mname,' ',name.lname)) as student, name.noiid as Student_ID, sum(meeting.meestuid) as NO_CLASS, teamlt.ltfname as team
    FROM name
    LEFT JOIN meeting  ON name.stuid = meeting.meestuid
    LEFT JOIN teamlt  ON name.teamlt = teamlt.ltid
    WHERE  meeting.meestuid IS NULL
    AND name.Form4Complete ='yes'
    AND name.type = 'GOI'
    AND name.type <> 'jrgoi'
    AND name.city = 'orange county'
    GROUP BY student
    ORDER BY name.teamlt, student
    /* This code below will return an empty list. my goal is to produce a list of student who are  over 30days since their last class attendance*/
    SELECT  trim(concat(name.fname,' ' ,name.Mname,' ',name.lname)) as student, name.noiid as Student_ID, sum(meeting.meestuid) as NO_CLASS, teamlt.ltfname as team
    FROM name
    LEFT JOIN meeting  ON name.stuid = meeting.meestuid
    LEFT JOIN teamlt  ON name.teamlt = teamlt.ltid
    WHERE  meedate > '2014-10-17'
    AND meeting.meestuid IS NULL
    AND name.Form4Complete ='yes'
    AND name.type = 'GOI'
    AND name.type <> 'jrgoi'
    AND name.city = 'orange county'
    GROUP BY student
    ORDER BY name.teamlt, student
    /*i also tried the "WHERE  meedate between '2014-10-17'  and now() "*/
    it doesn't seem that difficult. If i can get this to run in MySQL i should be fine. Any Suggestions
    -JE

    It IS likely that the PrPro trial did leave behind some files, and likely Registry entries (if you are on Windows).
    I would uninstall the trial of PrPro, and then run the Adobe Cleaner Utility (http://www.adobe.com/support/contact/cscleanertool.html) several times, rebooting between each run. That should clean out any aspect of any of the Adobe Creative Suite programs.
    Before doing this, since you DO want PrE retained, I would do a System Restore Point (for today), just in case. When done, you might need to do a Repair Install of PrE, but when I have done those, they are very quick and simple. Going back, I had to do a Repair Install for my entire CS 2 Creative Suite (all programs), because installing PrE 4.0 broke them. It took about 45 mins., but that was because I had the full CS 2 Creative Suite installed.
    Good luck,
    Hunt

  • How can I compose an e-mail today and have it sent only in 2 days when I am absent?

    Is there a possibility to compose an e-mail today, but get it sent automatically only after a pre-determined delay?

    This add on will do that.
    https://addons.mozilla.org/en-US/thunderbird/addon/send-later-3/?src=search

  • Adobe creative cloud in desktop not opening because internet connection is absent

    Adobe creative cloud in my desktop (I have a mac) is not opening because it says that the internet connection is absent even though I am connected to the wifi and internet is working. It was working few days ago bot now not anymore. I tried to turn off and on internet and my laptop, I tried to look for other questions similar to mine but did not found anything. I dont know what to do because I'm afraid to do a real mess!  Please, help me urgently...
    Thankyou,
    A.

    Hi There,
    Kindly try the below link to test the connectivity.
    Link: Sign in, activation, or connection errors | CS5.5 and later
    Thanks,
    Atul Saini

  • Quota deduction when EE has been inactive for more than 180 days / Advance quota days when employee does not have enough balance

    Dear experts,
    We have two requirements regarding to the "Anual leave" quota.
    1. Quota reduction when employee is inactive for more than 180 days
    2. Advance quota days when employeee does not have enough balance
    We have in place an "Anual Leave" quota related to a calendar year period, that gets generated dialy in time evaluation. This quota gets the employee entitlement from a set of rules that stored the corresponding balance in a period time type, that is the one that we defined in the customizing. This is working fine. The problems start when we try to incorporate the other two requirements.
    Regarding the first requirement, if the employee has been inactive for more than 180 days in a calendar year due to unpaid leave, we need to start quota reduction as follow,
    First, we need to clear the balance that was calculated above in the schema.
    Then, we need to calculate one leave day for every 20 days worked till the end of the year, considering as such, everyday the employee is expected to work, except days on which the employee has been absent on unpaid leave.
    For the second requirement we created a manual quota call "Advance Anual Leave". So, if the employee, wishes to take 20 working days holiday, but in his/her Anual Leave quota has only 10 days available, we have to create an "Advance Anual Leave" quota manualy for 10 days. When the quota for next year gets generated, we need to deduct these advanced 10 days from it. This deduction should stop the year after.
    The problem we are finding with these two requirements is that, due to the Anual Leave quota gets generated dialy, we can't get the balance right.
    Thanks in advance!
    Kind regards,
    Alex

    Hello binbingogoABC,
    Shopping on BestBuy.com should be easy and fun and not fraught with the kind of trouble that you describe. I regret very much that this has been your experience.
    Using the information you provided when you signed up for Best Buy Unboxed I was able to locate your cancelled orders. I have requested more information from my back-office partners. As soon as I have additional details about your situation, I will reply again to this message. In the interim, I'm sorry that I must impose upon your patience.
    I'm very grateful that you wrote to us with your concerns.
    Sincerely,

  • No of days worked.

    Hi experts,
    Can anybody plz help me out.In negative time managemnt where is the no of days worked stored. In which table can we find this. The Payroll is processed for an employee. And i need the no of days worked to be reflected on the payslip.

    Hi, Archana
    According to negative  time management we are to record only absences for the employee or in other words he is always present unles not marked as absent.
    To display the total present days in payslip ABAP developement has to be there as it is too difficult in standard salary slip. you have to read absences from table PA2001 and minus these days from calendar days that becomes your total present days
    In a block leave or absent, leave balances and then
    ( calendar days - absence days ) = total present days.
    Hope it should work
    regds
    Punit

  • Payment for Absence Days in Off Cycle

    Hi,
    If an employee is to be absent during future payroll periods, for example, because of leave, you can pay the employee in advance for the period of the absence. The remuneration is calculated using Absence Valuation in Off Cycle Payroll.
    I facing problem in this to determine payment for Absence for Calendar Days = 22.
    The formula is Basic Salary/30 Days*Absence Day (Calendar Days).
    I tried changing the PCR X011 but the value is not determined.
    Can any Expert guide me to resolve this issue.
    I have one more doubts, If payment is made in Off Cycle for future Absence Days, then when regular Payroll run, system automatically reduce the Absence Days and pay for the remaining days.
    Regards,
    Ram

    Hi Sikindar,
    Thanks for the reply.
    Customer want every month the Calendar Days as 30 Days and 22 Days for two set of Employee Subgroup.
    The formula is below;
    ESG PCR 3 = Basic Salary/30 Days * No of Abscence Days (Calendar Days)
    ESG PCR 2 = Basic Salary/22 Days * No of Abscence Days (Calendar Days)
    You mean to say we can create two constant for two set of Employee Sub Group.
    Pls. see the screenshot of Table T554C.
    Now guide me how to write PCR for this.
    Regards,
    Ram

Maybe you are looking for

  • Do not save form when the filed is not completed correctly

    Hi i was create a form and publish in the Document library. i was create a Repeating Table with two filed(Combo box and text box) and set Action Rule from that filed.This means that the user can not selected same value. when publish it and full this

  • Create Transformation - Error

    Hi All, I am trying to create a Transformation from a Update rule. but when i am clicking on create Transformation i am getting the below error. <i><b>UNIT STD is not created in language EN</b></i>. Please help me to relsove this error. Thanks and re

  • Urgent... help me...

    Hi Friends, Im coading inside a BADI -->Method.As it supports OO concept, its not allowing me to use SUBROUTEINS (i.e) FORM & ENDFORM. But i need it desperitely. Is there any other alternative way to do this... But all my codes are inside single meth

  • When clicking on course details receive error " Error: Cannot Display Page"

    Error: Cannot Display Page You cannot complete this task because one of the following events caused a loss of page data: You accessed this page using the browser's navigation buttons (the browser Back button, for example). Your login session has expi

  • Flash lite signature grabber

    Hi there, I want to create a Flash lite signature grabber. Could someone give me a head start? I really need to be able to draw to a canvas and save the image using a png encoder to send binary data  to a coldfusion server. I can do the coldfusion si