Skip to content

Instantly share code, notes, and snippets.

@larshp
Created May 18, 2025 06:08
Show Gist options
  • Save larshp/8ba845d6377204a7fe75c5f87b05f795 to your computer and use it in GitHub Desktop.
Save larshp/8ba845d6377204a7fe75c5f87b05f795 to your computer and use it in GitHub Desktop.
METHOD zif_abapgit_exit~change_committer_info.
DATA lv_username TYPE string.
IF sy-uname = 'FOO'.
cl_gui_frontend_services=>get_user_name(
CHANGING
user_name = lv_username
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4 ).
IF sy-subrc = 0.
cl_gui_cfw=>flush( ).
IF lv_username = 'JohnDoe'.
cv_name = 'John'.
cv_email = '[email protected]'.
ENDIF.
ENDIF.
ENDIF.
ENDMETHOD.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment