Code for employee worked hours calculation

Hello everyone,
I need some help with an ABAP code:
I have records coming in with Employee ID, Date and Worked hours along with some other fields.
I need to look up the employee id aginst another table to figure out if the employee depends to a particular state or not and the date is holiday or not from different table.
Also I would like to see if worked hours are more than 8 and put the extra hours into a differemt field for calculating if the total hours in a week exceed 40.
Can you please help with this code?
Thanks,
Raj

>
Raj Coppar wrote:
> Hello everyone,
>
> I need some help with an ABAP code:
>
> I have records coming in with Employee ID, Date and Worked hours along with some other fields.
>
> I need to look up the employee id aginst another table to figure out if the employee depends to a particular state or not and the date is holiday or not from different table--- u can use FM BKK_CHECK_HOLIDAY to find out the given date is holiday or not ? Also I would like to see if worked hours are more than 8 and put the extra hours into a differemt field for calculating if the total hours in a week exceed 40.
>
> Can you please help with this code?
>
> Thanks,
> Raj

Similar Messages

  • Work Hours Calculation - ERROR

    Hi All,
    I'm having difficulty with the Work Hours Calculation in Project. It seems that when the number of hours within a subtask group exceeds 1000 hours, the display returns 1 hour. Whilst the Project Statistics for cost are correct, the number of hours is wrong!
    Has anyone seen this error before and can help?
    I would post piccy but Microsoft wont allow that yet. 

    Thanks for the reply Guillaume,
    The Project version in question is 2007 SP3.
    The issue occurs on every project that I am currently handling so it is causing me some troubles at the moment. I have even tried using the example you gave and it still does not work correctly.
    Unfortunately until my account is approved I cannot post pictures however the following is the equivalent to your project above:
    Project 1 67 days
    Mon 15/12/14 Tue 17/03/15
    1 hrs
    Summary
    67 days Mon 15/12/14
    Tue 17/03/15 1 hrs
    A 50 days
    Mon 15/12/14 Fri 20/02/15
    400 hrs A
    B 67 days
    Mon 15/12/14 Tue 17/03/15
    536 hrs B
    C 30 days
    Mon 15/12/14 Fri 23/01/15
    240 hrs C
    D 10 days
    Mon 15/12/14 Fri 26/12/14
    80 hrs D
    Many thanks,
    Jon

  • Process code for Routings & Work Centers

    Hello All,
                I want to transfer Routings & Work Centers from server to server using ALE transaction <b>POIM</b>.
    What is process code for Routings & Work Centers?
    Regards,

    Hi,
    Routing
    A routing is a description of which operations (process steps) have to be carried out and in which order to produce a material (product).
    Thus in routing  contains details about the work centers at which they are carried out, standard value  and component.
    Therefore there is no limitation for assigning number of time for same work center.
    Regards
    Suresh

  • Daily working hours calculation but Half an hour flexi before start of planned time & shortfall hours calculation

    Dear All,
    I want to calculate daily working hours but Half an hour flexi before start of planned time & shortfall hours calculation if a person didn't completed 9 hours job.
    We have different types of DWS, PWS & WSR for different PS/PSA & EG/ESG groupings.
    We have a requirement for Executives/Officers (E0-E8/ S1-S2) for only one PSA (1100) for only one DWS(GFLX). In this requirement I want to calculate daily working hours but Half an hour flexi before start of planned time & shortfall hours calculation if a person didn't completed 9 hours job.
    Please see the requirement and my configured DWS and PCR's in detail with example and suggest me the solution:-
    Overview
    I want to calculate (Please take the reference from DWS screenshot)
    daily working hours, but starting from first Begin Tolerance Time
    Shortfall of hours if 9 hours not completed, but again starting from first Begin Tolerance Time, although employee has come before Begin Tolerance Time
    I've configured one DWS as below,
    Requirement:-
    The planned shift timings is 9:30 - 18:30. Employees should work and complete 9 hrs in a day, but this 9 hours should be counted only from 9:00 (i.e. Begin tolerance time). It means. In time should not consider before 9:00.
    1. Suppose 1st day employee punch In time is 9:00 then he has to work up to 18:00, then only 9 hours of working will be completed & no shortfall will be calculated.
    In above case, if Out time is 17:00 then shortfall will be calculated 1.0 hours, because his working hours will be counted 8 hrs only.
    2. Suppose 2nd day employee punch In time is 9:45 then he has to work up to 18:45, then only 9 hours of working will be completed & no shortfall will be calculated.
    In above case, if Out time is 18:00 then shortfall will be calculated 0.75 hours, because his working hours will be counted 8.25 hrs only.
    3. Suppose 3rd day employee punch In time is 8:30 then he has to work up to 18:00, then only 9 hours of working will be completed & no shortfall will be calculated. (In between 9:00 - 18:00 ). Here In time is 8:30 but system should consider and count from 9:00.
    In above case, if Out time is 17:30 then shortfall will be calculated 0.5 hours, although he has worked 9 hrs.
    4. Suppose 4th day employee punch In time is 10:11 then he will be marked as Late Come(as per DWS) and then he has to work up to 19:11, then only no shortfall will be calculated, because he completed 9 hours.
    Now the below PCR is calculating Daily Working Hours,
    Now the below PCR is calculating Late Coming Hours,
    Overview
    I know that use of begin tolerance time is different in from my requirement. Please guide me if this DWS configuration will not work.
    As of now system is able to calculate Daily Working Hours (but not from the begin tolerance time), Late coming days and Late coming hours, but shortfall is not getting calculate properly.
    Please give me the idea how to write PCR for these requirement, I know that my ZDHR PCR (Daily Working Hours) needs to change or replace to fulfill this requirements.
    If you want any other details please let me know.
    Best Regards,
    Deepak

    Hi Sankarsan,
    After changing the function PTIP and I used GEN in PAR2, because in PAR3 error was coming.
    After the changes PCR is processing as below for three different IN time :
    1. when IN time is 8:45
    and in this case, ZES table No Time type is showing which is wrong because he worked from 8:45 to 18:30 it means 9:30 hours (calculation should start from 9:00 am).
    2. when IN time is 9:15
    and in this case, ZES table Time type 9002 is showing 9.25 hours which is correct because he worked 9.25 hours.
    3. when IN time is 10:30
    and in this case, ZES table Time type 9003 is showing 9.00 hours which is wrong because he worked only 8 hours.
    Pls suggest.
    Best Regards,
    Deepak

  • Employee overtime hours calculation

    Hello everyone,
    I need some help with an ABAP code:
    Records coming in with Employee ID, Date and Worked hours along with some other fields. There will be multiple records with the same Employee id.
    I would like to have a count for all the hours for that particular employee and keep a track if it goes above 40 hours.
    I also need to keep a track of hours in a particular day to see if they are above 8 hours.
    Can you please help with this code?
    Thanks,
    Raj

    Hi Raj....
    As we are not having such a kind of data....
    I tried this with appending itab...
    check this code....
    data: begin of itab occurs 0,
          empid(4),
          whrs(2) type n,
          flag1,
          exday(2) type n,             <---to capture the extra working hours of the day
          flag2,
          exemp(2) type n,             <----to capture the extra working hours of the employee
          date like sy-datum,
          end of itab.
    data: sum(3) type n.
    itab-empid = '1111'.
    itab-date = sy-datum.
    itab-whrs = 10.
    append itab.
    clear itab.
    itab-empid = '1111'.
    itab-date = sy-datum.
    itab-whrs = 80.
    append itab.
    clear itab.
    itab-empid = '1111'.
    itab-date = sy-datum + 1.
    itab-whrs = 10.
    append itab.
    clear itab.
    itab-empid = '1112'.
    itab-date = sy-datum.
    itab-whrs = 10.
    append itab.
    clear itab.
    itab-empid = '1112'.
    itab-date = sy-datum + 1.
    itab-whrs = 2.
    append itab.
    clear itab.
    itab-empid = '1112'.
    itab-date = sy-datum + 1.
    itab-whrs = 10.
    append itab.
    clear itab.
    itab-empid = '1113'.
    itab-date = sy-datum + 1.
    itab-whrs = 10.
    append itab.
    clear itab.
    itab-empid = '1113'.
    itab-date = sy-datum + 2.
    itab-whrs = 7.
    append itab.
    clear itab.
    itab-empid = '1113'.
    itab-date = sy-datum + 1.
    itab-whrs = 8.
    append itab.
    clear itab.
    loop at itab.
      at end of date.
        if itab-whrs > 8.
          itab-flag1 = 'X'.
          itab-exday = ( itab-whrs - 8 ).
          modify itab.
          endif.
        sum.
        sum = sum + itab-whrs.
      endat.
      at end of empid.                         <-----change code to avoid stars due to end of ..event
        if sum > 80.
          itab-flag2 = 'X'.
          itab-exemp = sum - 80.
          modify itab.
          clear itab.
         endif.
       clear: sum.
       endat.
      endloop.
    loop at itab.
    write:/ itab-empid,
            itab-date,
            itab-whrs,
            itab-flag1,
            itab-exday,
            itab-flag2,
            itab-exemp.
    endloop.
    Thanks,
    Naveen.I

  • Working Hours Calculation possible ?

    Anyone know if there is a FM to calculate the Working Hours that exist between two dates.
    For instance ...entire year may = 2080 working hours.  User wants to know Working hours between
    any two dates ....  like....   July 1, 2007 and   May 5, 2008.....
    Thanks
    MPersson

    Rob,
    Thats a valid point.  In my case I am only determining the total possible working hours for a budget report.
    Prior to this, the supervisors were simply using a full year of 52 weeks x 40  hrs = 2080.  This report takes
    the hours captured on the CATS timesheet and processes them accordingly. So Holidays and any leave
    time is identified within the program code and handled then.
    Thanks
    MPersson

  • Daily working Hours Calculation

    Dear All
           Time Management - >Work Schedules->Set Work Schedule rules and work schedule
           How to calculate the Daily working hours if my shift time is as given below
      Night  00:25 to  Morning 07:30
    My break time is between 3:30 to 4:00
    So my actual working hours is  6:35 hours (6 hrs and 35 min).
    What i need to enter in the Daily working hours, whether 6.35 or 6.58 (0.25/15*35)?
    regards
    Suresh S

    Hi,
    First create a break shedule from 3:30 to 4:00 AM and specify if paid or unpaid.
    Use this break schedule while creating daily work schedule. Specify the timings of 0:25 as start in planned working time, the end time will be calculated automatically.
    Use this DWS in your PWS which you in turn use while setting WSR as you stated above. The Daily Working time will be automatically taken from DWS. And I think it should be 6:35 hrs.
    cheers
    Ajay

  • A proprietary page I use for logging work hours is not compatible with 4.0. How can I downgrade?

    I use a work-hour logging site called "Infowit" to account for my time on the job. After downloading 4.0, I can no longer log in at the site. It tells me that my browser is not compatible with it.
    As a result, I want to go back to the older version I was using before. How do I do this?
    Thanks.

    To keep your computer and files safe, you should not go back to Firefox 9. Firefox 10 contains security fixes. You may be able to make your toolbar work by using the add-on compatibility reporter as described in this article [[Add-ons are disabled after updating Firefox]].
    If you really must go back to Firefox 9, you can find it here: https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/9.0.1/win32/

  • Cannot find source code for Employee Benefit application

    Hello,
    I am trying to find the Employee Benefit Sample Application which used to be provided by Oracle at http://otn.oracle.com/sample_code/products/ias/content.html. Unfortunately I couldn’t find the source code anywhere, neither by searching through oracle sites, nor through the internet.
    Could someone please help me get it, since I just started working on applications based on this model and it is really important for me to have a complete example that works.
    Thanks in advance,
    Stefanos

    Hello,
    This sample application used to work on older versions which is no longer supported. This is the reason, it has been removed.
    Thanks.

  • Query to retrieve Currency Code for Employee Salary

    Hi,
    I'm stumped by this issue.  Does anyone know what table(s) contain the employee's salary currency code?
    Thanks!
    Bruce Marcoux

    Did you check the business components for the salary page ?
    Check the VO query -
    select fct.name as currency ,fct.currency_code as currency_code from per_pay_bases ppb ,pay_input_values_f piv ,pay_element_types_f pet ,per_all_assignments_f paa ,fnd_currencies_tl fct where paa.pay_basis_id = ppb.pay_basis_id and ppb.input_value_id = piv.input_value_id and piv.element_type_id = pet.element_type_id and fct.currency_code = pet.input_currency_code and fct.language = USERENV('LANG') and paa.assignment_id = :1 and :2 between nvl(paa.effective_start_date,hr_general.start_of_time) and nvl(paa.effective_end_date,hr_general.end_of_time) and :3 between nvl(pet.effective_start_date,hr_general.start_of_time) and nvl(pet.effective_end_date,hr_general.end_of_time) and :4 between nvl(piv.effective_start_date,hr_general.start_of_time) and nvl(piv.effective_end_date,hr_general.end_of_time) 

  • Netherlands Working Hours Formula

    Hi Group,
    I need to overwrite a fast formula for Netherlands. This is what oracle has provided without give any explanation what is the type of the formula where to attach the formula. Please if any one has any input please share. I am stuck with this
    Netherlands Working Hours Formula
    Oracle HRMS enables you to derive the weekly working hours to appear on the Central
    Bureau of Statistics (CBS) file. You define a FastFormula with the name
    NL_WEEKLY_WORKING_HOURS, to return a parameter called Working_Hours with
    a value for weekly working hours in the format 99.99. The formula code uses any
    database items or balances to obtain a value for the weekly working hours.
    Note: If you do not define a FastFormula, the application draws the
    working hours from the Individual Working Hours held on the
    assignment.
    Thanks,
    Nitin Singh

    Hussein,
    I know how to write a formula it is this particular formula i need to overwrite. Oracle has not provide where to attach it or what type of formula is that the only thing which they wrote in the article u have mentioned is
    Netherlands Working Hours Formula
    Oracle HRMS enables you to derive the weekly working hours to appear on the Central
    Bureau of Statistics (CBS) file. You define a FastFormula with the name
    NL_WEEKLY_WORKING_HOURS, to return a parameter called Working_Hours with
    a value for weekly working hours in the format 99.99. The formula code uses any
    database items or balances to obtain a value for the weekly working hours.
    Note: If you do not define a FastFormula, the application draws the
    working hours from the Individual Working Hours held on the
    assignment.
    This is just partial information. What should be the type of formula where it need to be attached. Oracle has not provided with that at all.
    Thanks,
    Nitin Singh

  • Employee Work Details

    Dear Gurus,
        In which infotype we can maintain for Employee Work Details like Project Name, Project Role, Project location, Area of Responsibility etc.,
    Regards,
    Ravi Kanth .G

    HI Ravi,
    There is no such infotype where we can store these information.
    We have to go for Z infotype.
    Regards,
    Kapil Kaushal

  • Event linakge for PO work flow not transporting to Qualty system

    This is Sudhakar ,
    I have a problem in Event linkage for PO Release strategy work flow.
    I have created a work flow for PO release strategy and done the event linkage through SWETYPV transaction code.
    I have added a new entry in SWETYPV transaction code and tick the 'Linkage Activated' check box. I have done this in development server. When I saved it prompted for a request and I have saved this Under the request( Customize request).
    When I create the purchase Order  for the first time the work flow is getting triggered. When I run the second time its not triggering.
    If I observe the reason is 'Linkage Activated' check box  is getting unchecked  when I create the PO. If I check it again it is asking for a request again.But after next run the linkage is again deactivated.
    Can you please help why this is happening.
    I have created another request in Customize client and transported first the development client, next the customise client request. When I observe in quality system an entry is created in SWETYPV transaction code for my work flow but 'Linkage Activated' check box is not checked.
    How to transport 'Linkage Activated' check box  to quality.
    This is an urgent one. Any body please help me
    Thanks
    Sudhakar

    Hi Imthiaz,
    What you said is correct. Its throwing one error in event trace
    Feedback after error - The message is.
    The mandatory input parameters of the workflow must be set.
    I think I am missing some input parameters.
    One more queation, I had transported this already to Quality
    But the linkage activation flag is not moved.  What could be the reason.
    Thanks
    Sudhakar

  • Increase Working Hours in HR

    Dear friends!
    I am new in SAP HR and working in a company. I have an inquiry from my HR personnel to increase the weekly working hours from 37.5 to 40.
    Can you please help me in the configuration. I would be grateful.
    Regards
    Sajid

    hI,
    For your work schedule you can make changes for weekly working hours in table  V_T508A
    this is under the  node for work schedule in spro .
    Regards,
    Kapil Kaushal

  • How to create work schedules for hours calculation

    HI Experts,
    We are working on payroll process which has to be consider  the number of working hours  for calculation.
    Now we need to generate the workschedule based on hours.
    What is the process of creation of workschedule  with respect to the consideration of number of hours.
    Please share your ideas on creation of workschedules with respect to number of hours.
    Thanks and regards,
    Sairam.

    Dear Siki,
    I want to create a new work schedule for the employees for whom the  salary calculation to be based on  working hours.
    Is there any preacautions to be maintained for the generation of work schedules in these directions.
    Regards,
    Sairam.

Maybe you are looking for

  • Pop up java web pages......

    when ever i click on a java web link kinda thing...for a page to pop up it won't happen. does anyone one have a clue why this is. i'm absolutely clueless to computers and i despretly need to access a java page. thank you in advance annie

  • WHEN ITOUCH IS VIEWED BY ALBUM ARTWORK SOME ALBUMS DONT SHOW!

    I HAVE LOADED ABOUT TEN ALBUMS ON MY ITOUCH IN OSX AND XP BUT ONLY SOME OF THE ALBUMS SHOW WHEN VIEWED BY THE ALBUM ARTWORK BUT THE ALBUMS ARE ON THE TOUCH BECAUSE THEY SHOW IN THE ALPHABETICAL LISTS ( ITOUCH VERTICAL )OF MUSIC! BUT WHEN YOU ROTATE T

  • Inserting titles between multiple dynamic EPM reports

    Hi, I am currently working on some templates where there are multiple dynamic EPM reports with shared column dimensions and multiple dimensions in the rows.  I am using EPM Add-in SP21 patch 1. We would like to have a section title appearing between

  • Iphone4 - Two Gmail Accounts - Outgoing server does not work anymore

    I started using my private Gmail account on my Iphone and everything worked fine (having found help in Youtube videos about how to set up Ingoing/Outgoing server). Now I added my Gmail account from work (ends on .nl instead of .com - Dont know if tha

  • Why is my trackpad clicking on everything that I pass over?

    I've been having some difficulty using my MacBook Pro lately. The trackpad is acting up. It's being extremely sensitive. When I am trying to navigate on my computer, it is very difficult for me to click on things, let a alone get to the thing I want