07-08-2008 7:39 AM
Hi Experts
I need function module for between two dates.
Example : If i gave from date 010420008
and To date 31052008
then i need to convert days only
Result = 61 days
if any body knows based on above functionalty then send immediatly that function module name.Its urgent requirement.
Regards,
Hari
07-08-2008 7:41 AM
07-08-2008 7:42 AM
07-08-2008 7:42 AM
07-08-2008 7:42 AM
07-08-2008 7:43 AM
Hi Prasad,
Try this code :
select-options:
s_date for sy-datum.
data :
w_days type i.
w_days = s_date-high - s_date-low.
write 😕 w_days.
Regards,
Swapna.
07-08-2008 7:43 AM
hi,
Use the FM 'HR_SGPBS_YRS_MTHS_DAYS'.
Hope this will Help.
Regards
Sumit Agarwal
07-08-2008 7:43 AM
Hiii!
Use this function module
HR_HK_DIFF_BT_2_DATES
Regards
Abhijeet
07-08-2008 7:44 AM
hi prasad,
use this FM
HR_HK_DIFF_BT_2_DATES
C14B_DIFF_BT_2_DATES
Regards,
sandeep
07-08-2008 7:44 AM
Hi,
refer to following
Type in two date and find the difference between the two dates in
days, months and years.
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
Reward pts. if usefull.
Regards,
Dhan
07-08-2008 7:46 AM
07-08-2008 7:46 AM