DATA lv_years TYPE i.
PARAMETERS pa_ilktr LIKE sy-datum.
CALL FUNCTION ‘COMPUTE_YEARS_BETWEEN_DATES’
EXPORTING
first_date                        = pa_ilktr
modify_interval                   = ‘ ‘
second_date                       = sy-datum
IMPORTING
years_between_dates               = lv_years
EXCEPTIONS
sequence_of_dates_not_valid       = 1
OTHERS                            = 2.
WRITE: / ‘Ä°ÅŸlem sonucu:’, sy-subrc.
WRITE: / ‘Yıl farkı:’, lv_years.


Serkan AKKAVAK
Bilgisayar Mühendisi
serkurumsal@yandex.com