Code: Alles auswählen.
[/*Berechnen des Alters
CALL FUNCTION 'COMPUTE_YEARS_BETWEEN_DATES'
EXPORTING
FIRST_DATE = p0002-gbdat
"MODIFY_INTERVAL = ' '
SECOND_DATE = sy-datum
IMPORTING
YEARS_BETWEEN_DATES = alter
EXCEPTIONS
SEQUENCE_OF_DATES_NOT_VALID = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.