on 01-16-2012 6:47 PM
BW experts,
I need your suggestions in how to calculate number of hours between 2 dates and time according to factory calendars. Calc results should not include holiday hours and include only business days hours.
input1 - order creation date and time
input2 - shipping date and time
difference should include hours on business days..and exclude 48 hrs of weekend as well as any holidays.
Thanks,
Rita
hi,
you can use FM HOLIDAY_GET to get holidays between two provided dates and provided calender
and the you easily cal difference between two date minus holidays
also the below wiki might help you in writing coding better for holidays on weekends
http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-ToGetnoofHolidaysfallinginweekendsforaparticularfiscalperiod
to calculate the difference b/w the dates you can use FM SALP_SM_CALC_TIME_DIFFERENCE to get the difference in seconds.
then divide the result by 3600 to get output in hours
hope it helps
regards
laksh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.