on 10-09-2014 12:26 PM
Hi Experts..!!
I need one help.
Actually , Employee is working in night shift from 22:30 to 06:30 on , 13:04:2014 .
Previous day indicator is checked in R/3 .
This is the work schedule of an employee:
Now employee is willing to take half day leave :
So i am giving from date 13:04:2014 and to date 13:04:2014.
Time from 22:30 to 02:30 . But it is not getting the correct hours , It is taking full hours.
which is not correct.
Please help me how to resolve this issue.
Its Urgent , please help.
Thanks & Regards:
Gaurav Singh
Hi Gaurav,
The difference of Start time and end time, in case of shifts/normal hours can be calculated by this way.
First by converting the time into minutes and then into hours.
IF ( lv_start_time > lv_end_time ).
lv_min = ( lv_end_time+0(2) - lv_start_time+0(2) ) * 60 + ( lv_end_time+2(2) - lv_start_time+2(2) ) .
lv_hrs = lv_min / 60.
DATA lv_hrs1 TYPE stdaz.
lv_hrs1 = 24 + lv_hrs.
ELSEIF ( lv_start_time < lv_end_time ).
lv_min = ( lv_end_time+0(2) - lv_start_time+0(2) ) * 60 + ( lv_end_time+2(2) - lv_start_time+2(2) ) .
lv_hrs = lv_min / 60.
ELSEIF ( lv_start_time = lv_end_time AND lv_end_time = 0 ).
lv_hrs = 0.
ELSEIF ( lv_start_time = lv_end_time ).
lv_hrs = 24.
ENDIF.
If the application you have shown above is a standard one, you need to check the work schedules are maintained correct or not. Or else if it is custom one, then difference can be calculated with the above logic.
Regards,
Harsha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.