Task
Create a method that generates a greeting for a person from table ZBC_USERS,
including a note about their next birthday.
Method Signature
METHODS get_salutation IMPORTING user_id TYPE char12
RETURNING VALUE(result) TYPE string.
Invocation from the MAIN method
METHOD if_oo_adt_classrun~main.
out->write( get_salutation( user_id = 'PMUELLER' ) ).
ENDMETHOD.
Example data from table ZBC_USERS (excerpt)
| USER_ID |
FIRSTNAME |
LASTNAME |
DATE_OF_BIRTH |
GENDER |
... |
| 0000000001 |
Peter |
Müller |
20010101 |
M |
|
| 0000000002 |
Siegfried |
Mustermann |
19790203 |
M |
|
| 0000000003 |
Petra |
Maier |
19820304 |
F |
|
Example Output
Hello Mr. Peter Müller, you will celebrate your 22nd birthday in 43 days!