When you try to add a new online repository using SAP GUI for Java, you will get weird error messages. That’s because the GUI can’t transport your Git parameters to the back end correctly.
To solve this problem, you need to modify ZABAPGIT_STANDALONE and use your Debug / Change skills.
Implement the following change; with your own username instead of mine:
WHEN c_event-add_online_repo.
" SAP GUI for Java fix {
* mo_validation_log = validate_form( mo_form_data ).
*
* IF mo_validation_log->is_empty( ) = abap_true.
* mo_form_data->to_abap( CHANGING cs_container = ls_repo_params ).
* lo_new_online_repo = zcl_abapgit_services_repo=>new_online( ls_repo_params ).
* CREATE OBJECT rs_handled-page TYPE zcl_abapgit_gui_page_repo_view
* EXPORTING
* iv_key = lo_new_online_repo->get_key( ).
* rs_handled-state = zcl_abapgit_gui=>c_event_state-new_page_replacing.
* ELSE.
* rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render. " Display errors
* ENDIF.
if sy-uname = 'X-KEREMKOS'.
break-point. " Fill ls_repo_params here
mo_form_data->to_abap( CHANGING cs_container = ls_repo_params ).
lo_new_online_repo = zcl_abapgit_services_repo=>new_online( ls_repo_params ).
CREATE OBJECT rs_handled-page TYPE zcl_abapgit_gui_page_repo_view
EXPORTING
iv_key = lo_new_online_repo->get_key( ).
rs_handled-state = zcl_abapgit_gui=>c_event_state-new_page_replacing.
else.
mo_validation_log = validate_form( mo_form_data ).
IF mo_validation_log->is_empty( ) = abap_true.
mo_form_data->to_abap( CHANGING cs_container = ls_repo_params ).
lo_new_online_repo = zcl_abapgit_services_repo=>new_online( ls_repo_params ).
CREATE OBJECT rs_handled-page TYPE zcl_abapgit_gui_page_repo_view
EXPORTING
iv_key = lo_new_online_repo->get_key( ).
rs_handled-state = zcl_abapgit_gui=>c_event_state-new_page_replacing.
ELSE.
rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render. " Display errors
ENDIF.
endif.
"}
Activate, then execute ZABAPGIT_STANDALONE as usual; importing your online repository.

When you get to the break point, you will see that ls_repo_params is empty. That’s the bug we are trying to avoid. So; fill ls_repo_params with the same values.

And voila! The repository loads correctly!

Leave a Reply