‎2008 Jul 17 10:25 AM
Hi,
is there any FM which calculates no. of days between today and last 6 months..???? or any other IDEA...???
Thanks in advance....
‎2008 Jul 17 10:27 AM
Hi,
Just check this function module to calculate no of days between two dates..
DAYS_BETWEEN_TWO_DATES
Thanks,
‎2008 Jul 17 10:27 AM
Hi,
Just check this function module to calculate no of days between two dates..
DAYS_BETWEEN_TWO_DATES
Thanks,
‎2008 Jul 17 10:28 AM
Hi!
DATA: gv_today LIKE sy-datum,
gv_6_months_pre LIKE sy-datum,
gv_difference TYPE i.
MOVE sy-datom TO gv_today.
MOVE '20080201' TO gv_6_months_pre.
gv_difference = gv_today - gv_6_months_pre.
gv_difference will contain the desired number.
Regards
Tamá
‎2008 Jul 17 10:28 AM
‎2008 Jul 17 10:29 AM
Hi,
try this FM HR_SGPBS_YRS_MTHS_DAYS
LAGF_DAYS_BETWEEN_2_DATES_GET
‎2008 Jul 17 10:30 AM
if both the dates are stored in DATUM type varible then you can simply subtract them to get days.
DATA : v_today type syst-datum ,
v_smnth type syst-datum ,
v_no type i .
v_no = v_today - v_smnth .
‎2008 Jul 17 10:34 AM
Hi Sandeep,
Try the foloowing function modules:
DAYS_BETWEEN_TWO_DATES
ISB_DAYS_BETWEEN_TWO_DATES
HR_HK_DIFF_BT_2_DATES
Hope this helps you
Regards,
Chandra Sekhar
‎2008 Jul 17 10:39 AM
Hi Sandeep.
I would like to suggest,
FIMA_DAYS_AND_MONTHS_AND_YEARS.
Export parameters - From date & End date.
Importing - Days, Months, Years.
Writing only-------> write:/ W_DAYS.
Will surely give you the days.
I also would like to suggest you a reference, as it is the same case as yours,
[SDN - Reference for Calculating number of days between two dates - function module|;
Hope that's usefull.
Good Luck & Regards.
Harsh Dave
‎2008 Jul 17 10:48 AM
Use : 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 year months and days.
‎2008 Jul 18 1:26 PM