‎2006 Dec 12 11:25 AM
Hi all,
I have to calculate the difference between two date. It's simply:
data A - date B = days
(20061212 - 20061205 = 7)
but what i have to do if I want the difference without saturday, sanday and all holiday's day (Christmas, etc..)?
In a few words, I need only the working days. Is it possible?
example: if 20061206 is saturday and 20061207 is sunday, then 20061212 - 20061205 = 5
Thanks
‎2006 Dec 12 11:33 AM
Hi ,
I am not sure how u can find the diff in such a way.
One simple solution is to get the list of all days between these days and use the FM <b>DATE_CONVERT_TO_FACTORYDATE</b> , this check whether the entered date is a working date or not based in the calarande set . If it is a working day then workingday indicator paramtered will be blank , else it will have some value.
Regards
Arun
‎2006 Dec 12 11:29 AM
Use Fm SD_DATETIME_DIFFERENCE.
It is not giving the difference exctly in minutes but it returns the diiference as days and hours. so u can use that for ur requirement. Just check it...
‎2006 Dec 12 11:31 AM
data : wa_date type sy-datum.
call function 'RP_CALC_DATE_IN_INTERVAL'
exporting
date = sy-datum
days = 04 -
> give ur required date
months = 0
years = 0
signum = '-'
importing
calc_date = wa_date.
write 😕 wa_date. -> new minised date
Note
signum = '+' "
signum = '-' "
‎2006 Dec 12 11:31 AM
Hello,
Use this FM
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
I_DATUM_BIS = G_T_PURO-AEDAT
I_DATUM_VON = G_T_EBAN-BADAT
IMPORTING
E_TAGE = G_F_DIFF
EXCEPTIONS
DAYS_METHOD_NOT_DEFINED = 1
OTHERS = 2.
If useful reward.
Vasanth
‎2006 Dec 12 11:31 AM
‎2006 Dec 12 11:32 AM
‎2006 Dec 12 11:33 AM
Hi ,
I am not sure how u can find the diff in such a way.
One simple solution is to get the list of all days between these days and use the FM <b>DATE_CONVERT_TO_FACTORYDATE</b> , this check whether the entered date is a working date or not based in the calarande set . If it is a working day then workingday indicator paramtered will be blank , else it will have some value.
Regards
Arun
‎2006 Dec 12 12:00 PM
Ok, good idea..now it works!
Thanks
Message was edited by:
Gilbert Ceppo
‎2006 Dec 12 12:08 PM
great that it works now
Message was edited by:
Arun Ramachandran