Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

find time that employee work during the month

Former Member
0 Kudos

hallow,

i have problem that i have to find how much time employee work during the month but i have to consider month with holidays and so on what is the best way to do that?

example

if the standard hour for month is 180 hours and employee work just half month i wont to find the relative part of employee working in this month with consider the calendar of this moth (4 or 5 Sunday or more holidays).

Regards

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this.


Data: it_ptpsp like ptpsp occurs 0 with header line.

CALL FUNCTION 'HR_PERSONAL_WORK_SCHEDULE'
  EXPORTING
     pernr = p_pernr                        "enter pernr
     begda = v_nextdt                       "enter date
     endda = v_nextdt                       "enter date
  TABLES
     perws = it_ptpsp.

if it_ptpsp-tprog = 'WOFF'.
* it is a week off.
endif.

Also it_ptpsp-ftkla is known for public holiday class.

Regards,

Ferry Lianto

6 REPLIES 6

Former Member
0 Kudos

There are various factors which decide working hours of an EE.

1. Workschdule rules as per infotype 7.

2. Calendar holidays

3. Non-working Days like Weekends etc

4. Absences in infotype 2001.

ETC...

I am sure what all you use in your system.

Amandeep

Former Member
0 Kudos

Hi Tal,

Time management and Payroll are integrated in ways are time data is collected from the <b>info type 0007 </b>and these hours are taken in basic as Number of hours worked or utilized, and even with time evaluation and last with schemas integration.

X000 schema carries xt00 and these data can be transfered between other modules.

TIME evaluation shows the exact details maintained over to the employee through<b> 2006 and 2001 info types</b>. If they are all allowed to take leave it shows leave as paid or unpaid depending on the configuration done by the consultant for these situation. In

processing time data in payroll or even Time evaluation ( Valuation of absences ) also.

Thanks,

Vinay

Former Member
0 Kudos

hi

i need Fm for holidays and weekends maybe someone can help with that?

Regards

0 Kudos

Try these.

HOLIDAY_CALENDAR_GET

RH_REQUEST_ON_WEEKENDS

A

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this.


Data: it_ptpsp like ptpsp occurs 0 with header line.

CALL FUNCTION 'HR_PERSONAL_WORK_SCHEDULE'
  EXPORTING
     pernr = p_pernr                        "enter pernr
     begda = v_nextdt                       "enter date
     endda = v_nextdt                       "enter date
  TABLES
     perws = it_ptpsp.

if it_ptpsp-tprog = 'WOFF'.
* it is a week off.
endif.

Also it_ptpsp-ftkla is known for public holiday class.

Regards,

Ferry Lianto

0 Kudos

Hi Ferry

thanks i try and its helping

Regards