05-05-2010 12:30 PM
Hi experts......
Could u please tell how to find out number of days between of two dates...the two dates should be of type sydatum...what are exact FM..i couldn't find the correct FM..so please help me to resolve this problem..
Thanks in advance..
Saleem
05-05-2010 12:35 PM
05-05-2010 12:35 PM
05-05-2010 12:36 PM
05-05-2010 12:35 PM
05-05-2010 12:36 PM
Hi Saleem ,
Please use the following FM to get the diffence between two dates. let me know for any clarifications.
CALL FUNCTION 'C14B_DIFF_BT_2_DATES'
EXPORTING
i_date_from = p_date
i_date_to = lv_final_date
IMPORTING
e_days = lv_days
EXCEPTIONS
plausibility_check_failed = 1
OTHERS = 2.
Regards
-
cb
05-05-2010 12:41 PM
Hi,
You can use following FMs:
HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours.
HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
Chk for the date format which you need and use the suitable FM.
Try searching the SDN b4 posting.
Hope this helps.
Regards,
Vaibhav
05-05-2010 12:43 PM
Hi,
Use /SDF/CMO_DATETIME_DIFFERENCE function module.
check link :-
http://wiki.sdn.sap.com/wiki/display/ABAP/FunctionModulerelatedonDate+calculations
Salil...
05-05-2010 12:43 PM
Hi Saleem
How about Function module 'HR_SEN_CALE_DAYS_DURATION'.
Regards,
Gaito
05-05-2010 12:44 PM