data : lv_uname type sy-uname,
       lv_email_address type adsmtp-smtp_addr.

 call function 'EFG_GEN_GET_USER_EMAIL'
   exporting
     i_uname           = lv_uname
   importing
     e_email_address   = lv_email_address
   exceptions
     not_qualified     = 1
     user_not_found    = 2
     address_not_found = 3
     others            = 4.
 if sy-subrc <> 0.
 * Error Message
 endif.



Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP MM SD Consultant
Contact : serkurumsal@yandex.com