2007 Jun 25 9:45 AM
how many function modules are there to calculate duration between two days or
is there any simple logic to calculate between two days
2007 Jun 25 9:47 AM
use the FM <b>TSTR_CALC_DURATION</b> to calculate the duration between two dates or else use FM <b>DURATION_DETERMINE</b>
2007 Jun 25 9:50 AM
Hi,
FIMA_DAYS_AND_MONTHS_AND_YEARS
FI_PSO_DAYS_MONTHS_YEARS_GET
RSSM_CONVERT_DAYSEC2TIMESTAMP
RSSM_CONVERT_TIMESTAMP2DAYSEC
Function Modules related to Date and Time Calculations
DATE_COMPUTE_DAY : Returns weekday for a date
DATE_GET_WEEK : Returns week for a date
DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
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.
MONTH_NAMES_GET : Get the names of the month
WEEK_GET_FIRST_DAY : Get the first day of the week
HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
LAST_DAY_OF_MONTHS : Returns the last day of the month
<b>Reward points</b>
Regards
2007 Jun 25 10:10 AM
hi professional, i used a simple logic to calculate diff b/n two dates its not working guide where i did mistake.
data: st-date type syucomm,
endate type sy-ucomm,
duration type i.
duration = endate - st-date .its not working even then i replaced duration to sy-ucomm run time exception date conversion error & one more thing is i must not use any fm for this so guide me with suitable codde friend anu
2007 Jun 25 7:38 PM
Hi Anu,
Use the following and try.
parameters: w_day1 like sy-datum,
w_day2 like sy-datum.
data: w_diff_days type i.
w_diff_days = w_day1 - w_day2.
write w_diff_days.
Hope this is helpful.
Please reward if useful.
Thanks,
Srinivasa
2007 Jun 26 8:51 PM
Hi Anu,
Guess this FM will resolve your issue..
DAYS_BETWEEN_TWO_DATES
Regards,
Sandeep