CALL FUNCTION 'ADS_GET_PRINTER_DEFAULTS'
EXPORTING
bname = sy-uname
IMPORTING
sname = p_imp
* LNAME =
* PRINT_IMMEDIATELY =
* DELETE_AFTER_PRINT =
EXCEPTIONS
wrong_user = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.