on 05-16-2014 12:05 PM
Hello ,
I would like to calulate the time between two timestamp by considering factory calender in SLA percentage calculation .
Currently I am using below method,
CALL METHOD cl_foev_time_func_brf=>difference_timestamp
EXPORTING
iv_timestamp_1 = lv_upd_ts
iv_timestamp_2 = lv_now_ts
iv_timezone_1 = 'CET'
iv_timezone_2 = 'CET'
iv_timeunit = 'MINUTE'
iv_fac_cal = 'CH'
IMPORTING
ev_difference = lv_diff.
It gives time difference without considering factory calender.
My factory calender configuration is right as i used it in other methods.
But in calculating difference, it gives actual difference between two time.
Please suggest to calculate the time between different timestamps using factory calender
Thanks in advance.
Thanks,
Vikas.
Hi Vikas,
Use FM HOLIDAY_GET to get holidays between two dates based on calendar.Then find difference between two date as follows:
Correct diff = actual - holiday.
Also make use of the FM DATE_COMPUTE_DAY and have a look at this discussion to get the logic for excluding weekends.
https://scn.sap.com/thread/350710
Hope it helps you. Plz let us know if you face any issues.
Don't forget to mark helpful/correct if ma answer is useful.
Thanks,
Karthik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.