[ABAP] Zeit zwischen zwei Terminen

* Anzahl Tage
DATA(lv_days) = cl_reca_date=>get_days_between_two_dates( EXPORTING
                                                            id_datefrom = '20190101'
                                                            id_dateto   = '20190201' ).

WRITE: / lv_days.

* Anzahl Monate
DATA(lv_months) = cl_reca_date=>months_between_two_dates( EXPORTING
                                                            id_date_from = '20190101'
                                                            id_date_to   = '20190201' ).

WRITE: / lv_months.

* Anzahl Jahre, Monate, Tage
DATA: lv_years TYPE i.
DATA: lv_months TYPE i.
DATA: lv_days TYPE i.

cl_reca_date=>get_date_diff( EXPORTING
                               id_date_from     = '20190101'
                               id_date_to       = '20190201'
                             IMPORTING
                               ed_years         = lv_years
                               ed_months        = lv_months
                               ed_calendar_days = lv_days
                           ).

WRITE: / lv_years.
WRITE: / lv_months.
WRITE: / lv_days.