2007 Aug 06 6:57 PM
hi I need to find number of days between two dates. how i can do that in abap.Please let mr know about this.
suppose today date is 20.06.2007 and thr other date is 25.08.2008.
I want to know the no days between two dates.
thanks in advance...
hi I need to find number of days between two dates. how i can do that in abap.Please let mr know about this.
suppose today date is 20.06.2007 and thr other date is 25.08.2008.
I want to know the no days between two dates.
thanks in advance...
2007 Aug 06 7:00 PM
2007 Aug 06 7:13 PM
HI,
Use this.
PARAMETER:p_date1 TYPE dats,
p_date2 TYPE dats.
DATA:lv_diff TYPE i.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = p_date1
i_datum_von = p_date2
IMPORTING
e_tage = lv_diff
EXCEPTIONS
days_method_not_defined = 1
OTHERS = 2.
IF sy-subrc = 0.
WRITE:/ lv_diff.
ENDIF.
Thanks
Mahesh
2007 Aug 06 7:20 PM
Hi,
You can do it in a simple way
Data: Var type i.
Var = Date1 - date2. " This will give you the differenceAlos you can use the below function modules
DAYS_BETWEEN_TWO_DATES
FIMA_DAYS_BETWEEN_TWO_DATES_2
HR_HK_DIFF_BT_2_DATES
Regards
Sudheer
| User | Count |
|---|---|
| 8 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |