Need total worked hours of each employee

Hi all
I need the total work hour for each employee
create table pde(empno number(10),act_hour varchar(10 byte));
Table created
insert into pde values(211,'12:20');
insert into pde values(211,'06:00');
insert into pde values(213,'07:00');
insert into pde values(213,'07:20');
WITH  got_total_hours     AS
     SELECT SUM (   TO_NUMBER (SUBSTR (act_hour, 1, 2))
                + ( TO_NUMBER (SUBSTR (act_hour, 4, 2))
                  / 60
                ) AS total_hours 
     from      pde
SELECT        TO_CHAR (FLOOR (total_hours))
       || ':'
       || TO_CHAR ( MOD (total_hours, 1) * 60
              , 'fm00'
               )     AS hh_mm,empno,act_hour
FROM     got_total_hours ,pde
this is the output i am getting 
HH_MM  EMPNO  ACT_HOUR
32:40     211     12:20
32:40     211     06:00
32:40     213     07:00
32:40     213     07:20
i require    HH:MM EMPNO ACT_HOUR
               18:20  211      12:20
               18:20  211      06:00
               14:20  213      07:00
               14:20  213      07:20
kindly help meThanking in advance
regards,
oracleuser

Hi Ravi,
Your solution works perfectly fine but there is a prob when i incorporate ur solution in the main query
WITH temp AS
  (SELECT employee_number,
    act_hour   ,
    SUM(to_number(regexp_substr(act_hour,'[^:]+',1,1))*60+to_number(regexp_substr(act_hour,'[^:]+',1,2))) over (partition BY employee_number) tot
     FROM nap_PUNCH_DATA_EMP_LIST trn where DATE_ENTRAY between '23-Aug-2009' and  '24-Aug-2009'
SELECT employee_number,act_hour,ROUND(tot/60)||':'||mod(tot,60) tothours FROM temp
o/p i am getting is
EMPLOYEE_NUMBER     ACT_HOUR             TOTHOURS
408                            06:31                         07:31
408                            00:00                         07:31
410                            18:12                          30:59 ------SUM of 18:12 and 11:47 should be 29:59
410                             11:47                          30:59
this is working correctly for majority of employee_numbers with exception of some employee_numberskindly help
regards,
oracle user
Edited by: makdutakdu on Jan 4, 2010 12:45 PM

Similar Messages

  • Calculating total working hours

    Hai Experts ,
    i want to calculate the total working hours of every employee.
    my scenario is .. i am having a table zworkinghours
    the fields are
    SNO  -numc
    EMPID-int4--- employee id
    DATEE-dats--- date
    WHOURS-tims--- hours worked
    sample datas:
    (PK)SNO       EMPID    DATEE        WHOURS
           01           101        2008/01/12    11:12:20
           02           102        2008/05/14      12:12:45
           03           103        2008/06/24      07:45:56
           04           101        2008/04/13      12:12:20
           05           102        2008/07/21      15:12:45
           06           103        2008/04/25      03:45:56
    now i want to calculate the total working hours of a every employee
    the output needed is
    EMPID(101)     TOTAL WORKING HOURS(11:12:45  + 12:12:45)
          101                    23:25:40
    plz help with the code ..
    thanks and kind regards

    Hi,
    Slight change in your code will work. Remember that the Headerline gets cleared inside at AT....ENDAT processing Block. You need to use an explicit workarea to take care of this.
    See the BOld Code with the Changes...
    Data wa like line of itab.
    loop at itab .
    Clear wa.
    Move itab to wa.at new empid.
    write :/ 'Employee Id ',wa-empid.
    uline.
    sum.
    endat.
    write :/ 'date' , itab-datee,
    'time worked',itab-whours.
    itab-total = 0.
    itab-total = itab-total + itab-whours.
    Clear wa.
    Move itab to wa.
    at end of empid.
    uline.
    write : / 'total working hours ', wa-total .
    skip.
    endat.
    ENDLOOP.
    This should solve your problem
    Edited by: AJAY TIWARI on Nov 9, 2008 9:02 AM

  • How to Calculate Total Worked Hours in a date range

    <p><span>WorkedHours column type is varchar(8) (for HH:MM:SS), <br />how to sum working hours of an employee for every month.</span> <br /></p><p><span>ex. of data : WorkedHours<br /><br />attencode   attendate   WorkedHours<br />1573         20-01-2007    07:34:22<br />1573         21-01-2007    12:31:10<br /><br />how can i sum the WorkedHours and print it in Hours format.<br />(like 20.17 for this 2 values)<br /><br />Can u able to follow me.<br />If not pls. feel free to get more information in this regard.</span></p>

    Create a formula like this :
    ((hour({tmpDate.attendate }) * 60 * 60) +
    (minute({tmpDate.attendate }) * 60) +
    Second({tmpDate.attendate }))/3600
    and then take the Sum of it. You can get the result.
    logic behind this is all the hours and minutes are converted into seconds and then added and divided by 3600 to get the actual hours.
    thanks
    kanak

  • Working hours of an employee between a given date range

    Hi Everyone,
    how to calculate working hours of an employee between a given date range
    Please anyone qive me some idea..
    Thanks in advance

    Hi Lathessh,
    Thanks for the reply here is the sample data. Actually we have two datetime field and i want to calculate the Ageing of an employee , by excluding of sunday and holiday between startdate and endDate.
    Ageing should be in hours.   Thanks
    StartDateTime
    EndDateTime
    HolidayList
    2/24/2014 11:55
    3/1/2014 16:45
    1/1/13 0:00
    2/24/2014 12:08
    2/28/2014 12:55
    1/14/13 0:00
    2/24/2014 16:16
    2/28/2014 15:20
    1/25/13 0:00
    2/14/2014 12:56
    3/4/2014 16:20
    3/27/13 0:00
    2/14/2014 12:56
    3/4/2014 16:20
    3/29/13 0:00
    2/14/2014 12:56
    3/4/2014 16:20
    4/24/13 0:00
    2/14/2014 12:56
    3/4/2014 16:20
    5/1/13 0:00
    2/26/2014 13:53
    3/4/2014 16:20
    8/9/13 0:00
    2/27/2014 12:13
    3/5/2014 13:05
    8/15/13 0:00
    3/3/2014 14:42
    3/5/2014 17:05
    8/20/13 0:00
    3/3/2014 14:42
    3/5/2014 17:05
    8/28/13 0:00
    3/3/2014 14:42
    3/5/2014 17:05
    9/18/13 0:00
    3/6/2014 12:28
    3/6/2014 17:55
    10/2/13 0:00
    3/6/2014 12:59
    3/7/2014 13:55
    10/16/13 0:00
    3/6/2014 14:37
    3/7/2014 11:15
    11/5/13 0:00
    3/6/2014 14:57
    3/7/2014 12:10
    11/15/13 0:00
    3/4/2014 17:21
    3/10/2014 15:55
    12/4/13 0:00
    3/4/2014 17:21
    3/10/2014 15:55
    12/25/13 0:00
    3/6/2014 12:08
    3/10/2014 14:10
    12/31/13 0:00
    3/6/2014 13:31
    3/10/2014 13:05
    1/1/14 0:00
    3/6/2014 13:14
    3/11/2014 13:20
    1/14/14 0:00
    3/6/2014 13:14
    3/11/2014 13:20
    3/17/14 0:00
    3/11/2014 14:29
    3/13/2014 11:20
    4/8/14 0:00
    3/11/2014 14:29
    3/13/2014 11:20
    4/14/14 0:00
    3/12/2014 12:56
    3/13/2014 11:45
    4/18/14 0:00
    3/12/2014 12:56
    3/13/2014 11:45
    5/1/14 0:00
    3/12/2014 14:02
    3/12/2014 18:10
    7/29/14 0:00
    3/12/2014 14:22
    3/12/2014 18:05
    8/15/14 0:00
    2/24/2014 16:49
    3/14/2014 12:10
    8/18/14 0:00
    2/24/2014 16:49
    3/14/2014 12:10
    8/29/14 0:00
    2/24/2014 16:49
    3/14/2014 12:10
    10/2/14 0:00
    2/24/2014 16:49
    3/14/2014 12:10
    10/3/14 0:00
    3/12/2014 11:31
    3/14/2014 15:55
    10/6/14 0:00
    3/12/2014 13:31
    3/15/2014 12:20
    10/23/14 0:00
    3/12/2014 15:31
    3/15/2014 11:10
    10/24/14 0:00
    3/12/2014 15:49
    3/14/2014 13:55
    12/25/14 0:00
    3/12/2014 16:19
    3/14/2014 15:05
    12/31/14 0:00

  • Working Hours Summation by selected parameter

    Hi 
    I am preparing a report which displays employee's minimum working hours. Each employee has a minumum working hours amount in SQL table as below.
    Also, I have mounth and year parameters. Moreover, my month parameter is multi select. For instance, when I select parameters as below
    then report should give me the total of the hours of January,February and March in a textbox. How can I handle this? 
    Thanks in advance.

    Hi Omnipotent06,
    After testing the issue in my test environment, we can refer to the following steps to achieve your requirement:
    Drag a Matrix from Toolbox to design surface.
    Insert the corresponding fields to the matrix.
    In the Column Groups pane, right-click the month group to add a total- after.
    Add some filters as below to the matrix.
    Expression: [year]
    Operator: =
    Value: [@year]
    Expression: [month]
    Operator: In
    Value: [@month]
    Expression: [employee]
    Operator: =
    Value: [@empolyee]
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
     If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Updating work hours

    Greetings everyone,
    I'm trying to update a field in a table with the total work hours in a specific month. To achieve this I've tried using a piece of SQL found in several other threads to retrieve the number of work days in a month. This doesn't work properly in my case however, since the subquery doesn't know the reference to a field on a higher level. Here is the SQL:
    UPDATE PS_EMPL_WRK_HRS Z SET WRK_HRS = (
    SELECT Z.STD_HOURS * (SELECT COUNT(*)
        from (select trunc(Z.EFFDT, 'mm')+level-1 dt
               FROM   DUAL
               connect by level <= last_day(Z.EFFDT) - trunc(Z.EFFDT, 'mm')+1
        where to_char(dt, 'dy' ) not in ('sat', 'sun'))  END AS WRK_HOURS
    FROM PS_GENL_DEDUCT_NLD GD
    WHERE   Z.EMPLID = GD.EMPLID
      AND Z.EMPL_RCD = GD.EMPL_RCD
      AND (GD.DEDUCTION_END_DT >= Z.EFFDT OR GD.DEDUCTION_END_DT IS NULL)
    )The error message will be ORA-00904: "Z"."EFFDT": invalid identifier, because the subquery to retrieve the number of workdays in a month doesn't know about the Z alias.
    The PS_EMPL_WRK_HRS contains the EMPLID, EFFDT and STD_HOURS. For each employee the record contains one row for each last day of the month, which is stored in the EFFDT field.
    Any help would be appreciated!
    CREATE TABLE PS_EMPL_WRK_HRS (EMPLID VARCHAR2(11) NOT NULL,
       EFFDT DATE,
       STD_HOURS DECIMAL(6, 2) NOT NULL,
       WRK_HOURS DECIMAL(6, 2)
    Insert into PS_EMPL_WRK_HRS (EMPLID,EFFDT,STD_HOURS) values ('010382',to_date('31-05-2013','DD-MM-RRRR'),40);
    Insert into PS_EMPL_WRK_HRS (EMPLID,EFFDT,STD_HOURS) values ('010382',to_date('30-04-2013','DD-MM-RRRR'),40);
    Insert into PS_EMPL_WRK_HRS (EMPLID,EFFDT,STD_HOURS) values ('010382',to_date('31-03-2013','DD-MM-RRRR'),40);
    Insert into PS_EMPL_WRK_HRS (EMPLID,EFFDT,STD_HOURS) values ('010382',to_date('28-02-2013','DD-MM-RRRR'),40);
    Insert into PS_EMPL_WRK_HRS (EMPLID,EFFDT,STD_HOURS) values ('010382',to_date('31-01-2013','DD-MM-RRRR'),40);Edited by: Michel on Feb 5, 2013 3:53 PM - Added CREATE and INSERT script

    Fixed it already:
    UPDATE PS_EMPL_WRK_HRS Z SET  WRK_HOURS  = (
    CASE WHEN (SELECT
    1
    FROM PS_GENL_DEDUCT_NLD GD
    WHERE   Z.EMPLID = GD.EMPLID
      AND Z.EMPL_RCD = GD.EMPL_RCD
      AND (GD.DEDUCTION_END_DT >= Z.EFFDT OR GD.DEDUCTION_END_DT IS NULL)) = 1
    THEN 1 ELSE (Z.STD_HOURS - Z.DED_HRS_ILL_K ) * (SELECT COUNT(*)
            FROM
              (SELECT rownum rnum
              FROM ps_country_tbl
              ) Y
            WHERE y.rnum <= Z.EFFDT - to_date(TO_CHAR(Z.EFFDT,'YYYY-MM')||'01','YYYY-MM-DD') + 1
            AND TO_CHAR( Z.EFFDT + Y.RNUM - 1, 'D' ) NOT IN ( '1', '7' )
            ) END );

  • Project server 2013 how to check work hours per hour per project

    Hi all,
    I would like to know how to check the total work hours for a project per month. For examples, I want to know all the work hours for all resources spent for the project A in August. Any idea?
    Thanks,
    Anna

    Hi Anna,
    If you don't want to write queries, I'd suggest you to simply open the project unchecking the option "load resources summary assignments" and go to the task usage view. Then display the project summary task and choose the monthly timeframe ("view"
    tab) for the timephased part of the screen (right part).
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • 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

  • Get employees salary and worked hours history

    Hi guys,
    I am currently trying to model a control that we would like to implement. In short, we would like to check whether in the past, employees that worked less than a given amount of time per month (say X hours a month) did not receive any salary for that month.
    I struggle to find the appropriate reports that would allow me to do this.
    I saw that the report RPLEHSU0 can display the salary history, but I'm not sure whether this corresponds to the actual monthly wage of each employee.
    Could someome highlight what specific SAP reports would provide me these information?
    Thank you.
    Regards,
    François.

    I think what you need is the data from payroll results. That is only way you can determine if employee has been "paid". IT8 may have a dollar amount but this does not mean employee got paid. Are you using time evaluation and payroll..? You can develop a custom report...to read payroll results...you have to read actual hours worked...and compare with target...and then see if employee has any payment for the corresponding payroll period (s).
    I don't know if there is a one single standard report for this. You can get this in individual reports - get actual hours worked you can use PT_BAL00 which gives the hours worked provided your time evaluation is generating time types/time wage types for hours worked. You can use payroll wage type reporter to get the payment information for a given payroll period...you still have to combine these two to get your final report.

  • I bought CS6 creative suite. As of now i need to work each application in separate separate system. Can any one please help me how to solve this problem.

    I bought CS6 creative suite. As of now i need to work each application in separate separate system. Can any one please help me how to solve this problem.
    I saw the below quote on Adobe forum
    "You may install software on up to two computers. These two computers can be Windows, Mac OS, or one each."
    If i install each application in single single system the system count is more than two. In this case, are we have any license issue? Please advice how the problem will solve?
    If possible please send the advise to my mail id: <Removed by Moderator>
    Thanks
    Uvaraj S

    I already answered that.  If you purchased a Suite then you can only install and activate it on two machines.  Even if you only insdtall one of the applications of that suite, it counts as one activation of the suite.  You cannot take the six or seven different applications that might be in a suite and install and activate them in six or seven different machines... only two machines.
    If your scenario will allow for it, one thing you can do is install the programs on all the different machines and only activate two of the machines at any given time.  If you need to activate a program on a third machine then you need to deactivate on one of the currently activate machines first so that you have an open activation to use again.  I do not remember if there is a limit to the total number of activations you can process for the life of the software.

  • Total Man Hours worked

    Hi All,
    I need to find out the total man hours worked in a timeline in Plant Maintenance. Can some one please let me know as to how we can do this?
    Thanks in advance for your help,
    Kanthi.

    Greetings Kanthi,
    IW47 will give you the hours of actual work that have been Confirmed against PM orders
    Or if you have a process where you don't confirm hours manually, try Planned hours for Operations in IW37N
    Also http://forums.sdn.sap.com/thread.jspa?threadID=2014538&tstart=0

  • Yes Verizon has contacted me by phone.  I never scheduled a call time nor did I call them.  They also are not making it easy to contact them through email.  I need to discuss a way to assure that my phone is never called again during work hours without a

    Yes Verizon has contacted me by phone.  I never scheduled a call time nor did I call them.  They also are not making it easy to contact them through email.  I need to discuss a way to assure that my phone is never called again during work hours without a prearranged meeting.  I will not speak on the phone nor use a live chat.  I want email as I want this documented offical and no other means offeres me that assurance.  I'd also like to discuss comensation for being harrassed with phone calls.

    Well if you pay your bill the calls would not happen.
    You need only tell them not to call you during working time.
    The Fair Debt Collections Practices Act states you must tell them it is not convenient.
    Now if marketing calls you can opt out at the Verizon web portal under your My Verizon account.
    You will not get compensation for them to call you. Nice try.
    However they could just shut your phone off and then you will call them.
    Email is not an option.
    Good Luck

  • Project 2013 - entering work hours at a monthly level

    Hi all, 
    Any help with this 'hopefully small' problem will be hugely appreciated. It's not so much a problem, but
    me still being new to Project - sorry! As a summary of what I am working with:
    I have entered a list of tasks (all set to Manually Scheduled).
    I have entered a number of resources into the Resource List. 
    I have also assigned relevant resources to the tasks. 
    Using the Task Usage view, I would now like to begin entering Work hours for the resources assigned to the
    tasks. We are planning at a monthly level, so I know how many hours each resource is expecting to be spending on each task over each month. 
    I have set the Timescale of my Task Usage screen to a monthly scale, thinking that this would allow me to
    enter total hours for each month. As an example, one of the resources assigned to a task is set for 15 hours of Work in April. It all seems to look OK on input. 
    My problem is however, I would like the Start and Finish fields to reflect this, and span over the months
    in which the Task's resources will be doing work. It doesn't seem to pick up the month accurately. Although I have entered the 15 hours in the column labelled April, the Start and Finish dates have come out as 30/04/14 and 30/05/14 respectively. I was hoping
    the Start and Finish times of that row to be 01/04/14 and 30/04/14 respectively, but they are a month out of line, and has show the work to be happening over May, not April. Is there y way I can change this?
    I hope this makes sense as a question? Any help at all would be brilliant. Please do let me know if I've
    missed any detail and you need some more info. I'll also continue looking through the forums to check if this has already been asked. 
    p.s. I tried to upload an annotated image, but my account needs to be verified first. Do I need to do anything to request this? I didn't receive any usual 'verification' links in MS's email on opening this account.
    Thanks very much, 
    ac18

    Hi John, Julie,
    Thank you both very much for the help! Yes good spot, I did post it on both forums (http://www.msofficeforums.com/project/21190-project-2013-entering-work-hours-monthly-level.html) - it's been years since I've used forums of any kind, and it's great to see
    experts being active across multiple sites! 
    I have given both suggestions a try, but unfortunately am still not quite there yet. 
    John, although your tip seems to work OK, I think I was hoping to find a way for the Start and Finish times to automatically span across the Work hours I have entered. If I was to then enter another 5 hours, but this time for March, the Start-Finish dates
    should auto update to be 01/03/14 - 30/04/14. I understand now that this may require me to be on an Automatically Scheduled project? 
    Julie, your screen shot on the msofficeforums.com website is exactly what I am looking to achieve! I would like to enter month-level Work data, and that looks to be exactly that. I did try entering a zero in the month immediately after the last month that
    had hours in it, but Project seemed to simply ignore it, with no visible change to the dates. 
    I have done some further investigating, and there does seem to be something different happening with my Project version (it's Proj Prof 2013). I have access to another computer with Project 2010 installed on it, and this doesn't seem to cause an issue. Note,
    I did need to have set the tasks as Auto Scheduled. 
    Essentially, if I try and exactly replicate Julie's example on both versions with the following steps, I get slightly different results:
    Tasks set to Auto-Scheduled. 
    Set Project Start Date to 01/01/14
    Enter some resources. 
    Switch to Task Usage view. 
    Set the Timescales on the right hand side to: Bottom tier=Months, Middle tier=Quarters. 
    Enter a task. 
    Assign resources to the task. At this point, by default 8 hours worth of work appears for each assigned resource. In 2010, these hours appear in the January 14 column. But on my 2013 laptop however, these hours appear under the December 2013 column. Strange?
    Anyway, in both cases I clear these default hours by entering zeros in their places.
    I now enter 15 hours under April 2014 for one of the resources on the task.
    In 2010, the Start and Finish dates of the assigned resource's row update to 01/04/14 - 30/04/14.
    In 2013 however, the Start and Finish dates update to 30/04/14 - 30/05/14. 
    I have a feeling that this discrepancy is perhaps at the heart of my problem? Is there a setting with the application that I am not making?
    Thanks again, 
    Arjun

  • Worked hours code

    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 against another table to figure out if the employee depends to a particular region 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?

    Sorry. here the Post again (complete )
    Hi Raj Coppar,
    try this code:
    this should be implemented in the End-Routine if you're working with BI 7.0.
    first you need to define the internal tables that have same structure as table where comparing information is stored.
    Code:
    Data: it_table TYPE TABLE OF /n42/YOURTABLE,
             li_table  LIKE LINE OF it_table.
    DATA:
               KALENDER      LIKE SCAL-FCALID,
               with_ATTRIBUTE LIKE SCAL-INDICATOR,
               lc_holiday_found    LIKE SCAL-INDICATOR.
    DATA: BEGIN OF FEIERTAGE OCCURS 5.
                INCLUDE STRUCTURE THOL.
              DATA: END OF FEIERTAGE.
    *Store needed information for comparison
    select * from /n42/YOURTABLE into table it_table.
    sort it_table by /n42/employeeID.
    Loop in the Data_PAckage
    LOOP AT SOURCE_PACKAGE ASSIGNING <source_fields>.
    *Check if Date is a Holiday
          CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
               EXPORTING  DATE                 = <source_fields>-Date.
                           HOLIDAY_CALENDAR_ID  = KALENDER
               IMPORTING  HOLIDAY_FOUND        = lc_holiday_found
               TABLES     HOLIDAY_ATTRIBUTES   = FEIERTAGE
               EXCEPTIONS HOLIDAY_CALENDAR_ID_MISSING       = 1
                            DATE_AFTER_RANGE                  = 2
                           DATE_BEFORE_RANGE                 = 3
                           DATE_INVALID                       = 4
                           HOLIDAY_CALENDAR_NOT_FOUND        = 5.
    *read internal table and make your checks
    READ TABLE it_table BINARY SEARCH INTO  li_table
          WITH KEY /n42/employeeID = <source_fields>-/n42/employeeID.
    if record was found.
          IF sy-subrc EQ 0.
    *if region is.....
             if li_table-/n42/REGION = "Whatever" and
    *Date is a Public Holiday
             lc_holiday_found = 'X' .
    *Claculate Overtime
                 if <source_fields>-Hours > 8.
    *write overtime to Overtime Field
                  <source_fields>-overtime = <source_fields>-Hours - 8.
                 endif.
          ENDIF.
    modify Result_Package.
    endloop.
    hope this helps.
    BR,
    Younes

  • Calculation of working hours

    Hi all,
    I need a function module for the calculation of working hours. supose in the selection screen if i give 01.02.2007 to 01.10.2007 i need the calculation of working hours in that given range depending upon the personal number. Suppose if the employee is absent for 3 or 4 days within particular period of theat given range that days needs to be eliminated and should calculate for the rest of the days. Please find the below code iam finding a problem in this piece of code. Please this issue is very urgent please reply ASAP.
      gv_day = sy-datum - 7.
      CALL FUNCTION 'HRWPC_BL_DATES_WEEK_INTERVAL'
        EXPORTING
          datum    = gv_day
          week_pst = 0
          week_ftr = 0
        IMPORTING
          begda    = gv_begda
          endda    = gv_endda.
      IF sy-subrc <> 0.
      ENDIF.
    *AT SELECTION-SCREEN OUTPUT.
      pnpbegda = gv_begda.
      pnpendda = gv_endda.
    START-OF-SELECTION.
      SELECT sachn
             usrid
        FROM t526 INTO TABLE git_tmadmin
       WHERE sachn NE space
         AND usrid NE space.
      IF sy-subrc EQ 0.
        SORT git_tmadmin BY usrid.
      ENDIF.
    GET pernr.
      rp-provide-from-last p0001 space pn-begda pn-endda.
      IF pnp-sw-found <> 1.
        REJECT.
      ELSE.
        IF p0001-kostl NOT IN s_cctr.
          REJECT.
        ELSE.
          rp-provide-from-last p0007 space pn-begda  pn-endda.
          IF pnp-sw-found = 1.
            MOVE p0007-wostd TO gs_empdtls-wostd.
          ENDIF.
          MOVE :  p0001-pernr TO gs_empdtls-pernr,
                  p0001-kostl TO gs_empdtls-kostl,
                  p0001-ename TO gs_empdtls-ename,
                  p0001-sachz TO gs_empdtls-sachz.
        Employee Position from PA0001
          MOVE: p0001-plans TO gs_empdtls-plans.
          APPEND gs_empdtls TO git_empdtls.
          CLEAR gs_empdtls.
        ENDIF.
      ENDIF.
    Regards
    Mahesh

    What error are you getting?

Maybe you are looking for

  • Keychain rejects password, even though it is correct (I'm 100% sure of it).

    After trying to open my backed up os 9.2.2. keychains in the OS X Tiger iteration of Keychain access but seemingly being unable to (it asked to add the certificates to the keychain, which I did, but nothing was actually added and import doesn't work

  • 2nd generation Time Capsule bug?

    Hi I'm having trouble with my new Time Capsule (purchased July 2011).  We have two iMacs and two printers, and one Airport Extreme (used as an extender) on the Time Capsule network.  We also use Time Capsule with Time Machine for back up of both iMac

  • Mass rejection of sales orders

    Dear All, How to reject the list of sales order which is in the past date. Some sales orders are incomplete, some are past documents. We need to reject all these sales order. Difficult to reject it individually. Any report which gives the list of pas

  • Patch failed on PROD

    I was applying patch 4684377. IT went on for 2.30 hours on Assigned: file ICXDLTMP.sql on worker 2 for product icx username ICX. After that session become deactive. i checked that there were no applmgr process running at os level. i started the adpat

  • Build specifications best practice

    I am just wondering what other users do when building Installers to find what is the most efficient method. I used to include the LVRT Engine (LabVIEW Runtime) in the Installer Build PROS: 1) Only one Installer required for the Target Computer to ins