mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 20:03:20 +08:00
Fix extended check issues - Part 2
##NO_HANDLER, ##EXISTS, ##FM_SUBRC_OK, ##CALLED Ref #5210
This commit is contained in:
parent
93935b3dfb
commit
75d8cbb0ae
|
@ -383,7 +383,7 @@ CLASS zcl_abapgit_object_aifc IMPLEMENTATION.
|
|||
packages = '' ).
|
||||
CATCH cx_abap_not_a_table INTO lx_abap_not_a_table.
|
||||
zcx_abapgit_exception=>raise_with_text( lx_abap_not_a_table ).
|
||||
CATCH cx_abap_not_in_package.
|
||||
CATCH cx_abap_not_in_package ##NO_HANDLER.
|
||||
"that's fine
|
||||
ENDTRY.
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ CLASS zcl_abapgit_object_auth IMPLEMENTATION.
|
|||
CALL FUNCTION 'SU20_MAINTAIN_SNGL'
|
||||
EXPORTING
|
||||
id_field = mv_fieldname
|
||||
id_wbo_mode = abap_false.
|
||||
id_wbo_mode = abap_false ##EXISTS.
|
||||
rv_exit = abap_true.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
|
|
@ -38,6 +38,7 @@ CLASS zcl_abapgit_object_cmpt IMPLEMENTATION.
|
|||
r_ref_db_access = mo_cmp_db.
|
||||
|
||||
CATCH cx_root.
|
||||
zcx_abapgit_exception=>raise( 'CMPT not supported' ).
|
||||
ENDTRY.
|
||||
|
||||
mv_name = ms_item-obj_name.
|
||||
|
|
|
@ -786,7 +786,8 @@ CLASS zcl_abapgit_object_fugr IMPLEMENTATION.
|
|||
CHANGING
|
||||
include = lv_include
|
||||
EXCEPTIONS
|
||||
OTHERS = 1.
|
||||
OTHERS = 1 ##FM_SUBRC_OK.
|
||||
|
||||
IF lv_function_group(1) = 'X'. " "EXIT"-function-module
|
||||
ls_tadir-object = 'FUGS'.
|
||||
ENDIF.
|
||||
|
|
|
@ -53,8 +53,9 @@ CLASS zcl_abapgit_object_iext IMPLEMENTATION.
|
|||
pe_attributes = ls_attributes
|
||||
EXCEPTIONS
|
||||
OTHERS = 1.
|
||||
|
||||
rv_user = ls_attributes-plast.
|
||||
IF sy-subrc = 0.
|
||||
rv_user = ls_attributes-plast.
|
||||
ENDIF.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ CLASS zcl_abapgit_object_iobj IMPLEMENTATION.
|
|||
iobj_not_found = 1
|
||||
illegal_input = 2
|
||||
bct_comp_invalid = 3
|
||||
not_authorized = 4
|
||||
* not_authorized = 4 " not in lower releases
|
||||
OTHERS = 5.
|
||||
IF sy-subrc = 0.
|
||||
ASSIGN COMPONENT 'TSTPNM' OF STRUCTURE <lg_viobj> TO <lg_tstpnm>.
|
||||
|
@ -200,36 +200,67 @@ CLASS zcl_abapgit_object_iobj IMPLEMENTATION.
|
|||
ASSERT sy-subrc = 0.
|
||||
|
||||
IF zif_abapgit_object~exists( ) = abap_false.
|
||||
CALL FUNCTION 'BAPI_IOBJ_CREATE'
|
||||
EXPORTING
|
||||
details = <lg_details>
|
||||
IMPORTING
|
||||
return = ls_return
|
||||
TABLES
|
||||
compounds = <lt_compounds>
|
||||
attributes = <lt_attributes>
|
||||
navigationattributes = <lt_navigationattributes>
|
||||
atrnavinfoprovider = <lt_atrnavinfoprovider>
|
||||
hierarchycharacteristics = <lt_hierarchycharacteristics>
|
||||
elimination = <lt_elimination>
|
||||
hanafieldsmapping = <lt_hanafieldsmapping>
|
||||
xxlattributes = <lt_xxlattributes>.
|
||||
TRY.
|
||||
CALL FUNCTION 'BAPI_IOBJ_CREATE'
|
||||
EXPORTING
|
||||
details = <lg_details>
|
||||
IMPORTING
|
||||
return = ls_return
|
||||
TABLES
|
||||
compounds = <lt_compounds>
|
||||
attributes = <lt_attributes>
|
||||
navigationattributes = <lt_navigationattributes>
|
||||
atrnavinfoprovider = <lt_atrnavinfoprovider>
|
||||
hierarchycharacteristics = <lt_hierarchycharacteristics>
|
||||
elimination = <lt_elimination>
|
||||
hanafieldsmapping = <lt_hanafieldsmapping>
|
||||
xxlattributes = <lt_xxlattributes> ##ARG_OK.
|
||||
CATCH cx_sy_dyn_call_param_not_found.
|
||||
CALL FUNCTION 'BAPI_IOBJ_CREATE'
|
||||
EXPORTING
|
||||
details = <lg_details>
|
||||
IMPORTING
|
||||
return = ls_return
|
||||
TABLES
|
||||
compounds = <lt_compounds>
|
||||
attributes = <lt_attributes>
|
||||
navigationattributes = <lt_navigationattributes>
|
||||
atrnavinfoprovider = <lt_atrnavinfoprovider>
|
||||
hierarchycharacteristics = <lt_hierarchycharacteristics>
|
||||
elimination = <lt_elimination>.
|
||||
ENDTRY.
|
||||
ELSE.
|
||||
CALL FUNCTION 'BAPI_IOBJ_CHANGE'
|
||||
EXPORTING
|
||||
infoobject = <lg_infoobject>
|
||||
details = <lg_details>
|
||||
IMPORTING
|
||||
return = ls_return
|
||||
TABLES
|
||||
compounds = <lt_compounds>
|
||||
attributes = <lt_attributes>
|
||||
navigationattributes = <lt_navigationattributes>
|
||||
atrnavinfoprovider = <lt_atrnavinfoprovider>
|
||||
hierarchycharacteristics = <lt_hierarchycharacteristics>
|
||||
elimination = <lt_elimination>
|
||||
hanafieldsmapping = <lt_hanafieldsmapping>
|
||||
xxlattributes = <lt_xxlattributes>.
|
||||
TRY.
|
||||
CALL FUNCTION 'BAPI_IOBJ_CHANGE'
|
||||
EXPORTING
|
||||
infoobject = <lg_infoobject>
|
||||
details = <lg_details>
|
||||
IMPORTING
|
||||
return = ls_return
|
||||
TABLES
|
||||
compounds = <lt_compounds>
|
||||
attributes = <lt_attributes>
|
||||
navigationattributes = <lt_navigationattributes>
|
||||
atrnavinfoprovider = <lt_atrnavinfoprovider>
|
||||
hierarchycharacteristics = <lt_hierarchycharacteristics>
|
||||
elimination = <lt_elimination>
|
||||
hanafieldsmapping = <lt_hanafieldsmapping>
|
||||
xxlattributes = <lt_xxlattributes> ##ARG_OK.
|
||||
CATCH cx_sy_dyn_call_param_not_found.
|
||||
CALL FUNCTION 'BAPI_IOBJ_CHANGE'
|
||||
EXPORTING
|
||||
infoobject = <lg_infoobject>
|
||||
details = <lg_details>
|
||||
IMPORTING
|
||||
return = ls_return
|
||||
TABLES
|
||||
compounds = <lt_compounds>
|
||||
attributes = <lt_attributes>
|
||||
navigationattributes = <lt_navigationattributes>
|
||||
atrnavinfoprovider = <lt_atrnavinfoprovider>
|
||||
hierarchycharacteristics = <lt_hierarchycharacteristics>
|
||||
elimination = <lt_elimination>.
|
||||
ENDTRY.
|
||||
ENDIF.
|
||||
|
||||
IF ls_return-type = 'E'.
|
||||
|
@ -409,21 +440,37 @@ CLASS zcl_abapgit_object_iobj IMPLEMENTATION.
|
|||
|
||||
lv_iobjnam = ms_item-obj_name.
|
||||
|
||||
CALL FUNCTION 'BAPI_IOBJ_GETDETAIL'
|
||||
EXPORTING
|
||||
infoobject = lv_iobjnam
|
||||
IMPORTING
|
||||
details = <lg_details>
|
||||
return = ls_return
|
||||
TABLES
|
||||
compounds = <lt_compounds>
|
||||
attributes = <lt_attributes>
|
||||
navigationattributes = <lt_navigationattributes>
|
||||
atrnavinfoprovider = <lt_atrnavinfoprovider>
|
||||
hierarchycharacteristics = <lt_hierarchycharacteristics>
|
||||
elimination = <lt_elimination>
|
||||
hanafieldsmapping = <lt_hanafieldsmapping>
|
||||
xxlattributes = <lt_xxlattributes>.
|
||||
TRY.
|
||||
CALL FUNCTION 'BAPI_IOBJ_GETDETAIL'
|
||||
EXPORTING
|
||||
infoobject = lv_iobjnam
|
||||
IMPORTING
|
||||
details = <lg_details>
|
||||
return = ls_return
|
||||
TABLES
|
||||
compounds = <lt_compounds>
|
||||
attributes = <lt_attributes>
|
||||
navigationattributes = <lt_navigationattributes>
|
||||
atrnavinfoprovider = <lt_atrnavinfoprovider>
|
||||
hierarchycharacteristics = <lt_hierarchycharacteristics>
|
||||
elimination = <lt_elimination>
|
||||
hanafieldsmapping = <lt_hanafieldsmapping>
|
||||
xxlattributes = <lt_xxlattributes> ##ARG_OK.
|
||||
CATCH cx_sy_dyn_call_param_not_found.
|
||||
CALL FUNCTION 'BAPI_IOBJ_GETDETAIL'
|
||||
EXPORTING
|
||||
infoobject = lv_iobjnam
|
||||
IMPORTING
|
||||
details = <lg_details>
|
||||
return = ls_return
|
||||
TABLES
|
||||
compounds = <lt_compounds>
|
||||
attributes = <lt_attributes>
|
||||
navigationattributes = <lt_navigationattributes>
|
||||
atrnavinfoprovider = <lt_atrnavinfoprovider>
|
||||
hierarchycharacteristics = <lt_hierarchycharacteristics>
|
||||
elimination = <lt_elimination>.
|
||||
ENDTRY.
|
||||
|
||||
IF ls_return-type = 'E'.
|
||||
zcx_abapgit_exception=>raise( |Error getting details of InfoObject: { ls_return-message }| ).
|
||||
|
|
|
@ -124,7 +124,11 @@ CLASS zcl_abapgit_object_iwpr IMPLEMENTATION.
|
|||
|
||||
METHOD zif_abapgit_object~jump.
|
||||
|
||||
SUBMIT /iwbep/r_sbui_service_builder
|
||||
DATA lv_prog TYPE progname.
|
||||
|
||||
lv_prog = '/IWBEP/R_SBUI_SERVICE_BUILDER'.
|
||||
|
||||
SUBMIT (lv_prog)
|
||||
WITH i_prname = ms_item-obj_name
|
||||
AND RETURN.
|
||||
|
||||
|
|
|
@ -131,7 +131,11 @@ CLASS zcl_abapgit_object_iwvb IMPLEMENTATION.
|
|||
|
||||
METHOD zif_abapgit_object~jump.
|
||||
|
||||
SUBMIT /iwbep/r_dst_vocan_register
|
||||
DATA lv_prog TYPE progname.
|
||||
|
||||
lv_prog = '/IWBEP/R_DST_VOCAN_REGISTER'.
|
||||
|
||||
SUBMIT (lv_prog)
|
||||
WITH ip_aname = ms_item-obj_name
|
||||
WITH ip_avers = ms_item-obj_name+32(4)
|
||||
AND RETURN.
|
||||
|
|
|
@ -37,13 +37,17 @@ CLASS zcl_abapgit_object_msag DEFINITION PUBLIC INHERITING FROM zcl_abapgit_obje
|
|||
zcx_abapgit_exception .
|
||||
METHODS delete_msgid
|
||||
IMPORTING
|
||||
!iv_message_id TYPE arbgb .
|
||||
!iv_message_id TYPE arbgb
|
||||
RAISING
|
||||
zcx_abapgit_exception.
|
||||
METHODS free_access_permission
|
||||
IMPORTING
|
||||
!iv_message_id TYPE arbgb .
|
||||
METHODS delete_documentation
|
||||
IMPORTING
|
||||
!iv_message_id TYPE arbgb .
|
||||
!iv_message_id TYPE arbgb
|
||||
RAISING
|
||||
zcx_abapgit_exception.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
|
@ -61,9 +65,7 @@ CLASS zcl_abapgit_object_msag IMPLEMENTATION.
|
|||
element = iv_message_id
|
||||
addition = ' '
|
||||
IMPORTING
|
||||
object = lv_key_s
|
||||
EXCEPTIONS
|
||||
OTHERS = 0.
|
||||
object = lv_key_s.
|
||||
|
||||
CALL FUNCTION 'DOKU_DELETE_ALL'
|
||||
EXPORTING
|
||||
|
@ -80,7 +82,11 @@ CLASS zcl_abapgit_object_msag IMPLEMENTATION.
|
|||
no_docu_found = 4
|
||||
object_is_already_enqueued = 5
|
||||
object_is_enqueued_by_corr = 6
|
||||
user_break = 7.
|
||||
user_break = 7
|
||||
OTHERS = 8.
|
||||
IF sy-subrc <> 0.
|
||||
zcx_abapgit_exception=>raise( 'Error deleting messages' ).
|
||||
ENDIF.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ CLASS zcl_abapgit_object_oa2p IMPLEMENTATION.
|
|||
|
||||
"authority check
|
||||
AUTHORITY-CHECK OBJECT 'S_OA2C_ADM'
|
||||
ID 'ACTVT' FIELD lc_actvt.
|
||||
ID 'ACTVT' FIELD lc_actvt ##AUTH_OBJ_OK.
|
||||
IF sy-subrc <> 0.
|
||||
MESSAGE e463(01) WITH mv_profile INTO zcx_abapgit_exception=>null.
|
||||
zcx_abapgit_exception=>raise_t100( ).
|
||||
|
@ -104,7 +104,7 @@ CLASS zcl_abapgit_object_oa2p IMPLEMENTATION.
|
|||
CALL METHOD lo_persist->('IF_WB_OBJECT_PERSIST~DELETE')
|
||||
EXPORTING
|
||||
p_object_key = lv_profile_key. " Object Key
|
||||
CATCH cx_swb_object_does_not_exist.
|
||||
CATCH cx_swb_object_does_not_exist ##NO_HANDLER.
|
||||
CATCH cx_swb_exception.
|
||||
zcx_abapgit_exception=>raise( |Error when deleting OAuth2 Profile { lv_profile_key }.| ).
|
||||
ENDTRY.
|
||||
|
|
|
@ -137,7 +137,7 @@ CLASS zcl_abapgit_object_otgr IMPLEMENTATION.
|
|||
TRY.
|
||||
CREATE DATA lo_parents TYPE TABLE OF ('CLS_TYGR_PARENT').
|
||||
ASSIGN lo_parents->* TO <lt_parents>.
|
||||
CATCH cx_sy_create_data_error.
|
||||
CATCH cx_sy_create_data_error ##NO_HANDLER.
|
||||
ENDTRY.
|
||||
|
||||
IF <lt_parents> IS ASSIGNED.
|
||||
|
@ -288,7 +288,7 @@ CLASS zcl_abapgit_object_otgr IMPLEMENTATION.
|
|||
TRY.
|
||||
CREATE DATA lo_parents TYPE TABLE OF ('CLS_TYGR_PARENT').
|
||||
ASSIGN lo_parents->* TO <lt_parents>.
|
||||
CATCH cx_sy_create_data_error.
|
||||
CATCH cx_sy_create_data_error ##NO_HANDLER.
|
||||
ENDTRY.
|
||||
|
||||
TRY.
|
||||
|
|
|
@ -172,7 +172,7 @@ CLASS lcl_task_definition IMPLEMENTATION.
|
|||
IF sy-subrc <> 0.
|
||||
TRY.
|
||||
li_container->element_remove( name = lv_element ).
|
||||
CATCH cx_swf_cnt_container.
|
||||
CATCH cx_swf_cnt_container ##NO_HANDLER.
|
||||
"Shouldn't happen, doesn't matter if it does
|
||||
ENDTRY.
|
||||
ENDIF.
|
||||
|
|
|
@ -77,7 +77,7 @@ CLASS zcl_abapgit_object_pdxx_super IMPLEMENTATION.
|
|||
enqueue_failed = 1
|
||||
object_not_deleted = 2
|
||||
object_not_found = 3
|
||||
OTHERS = 4. "#EC SUBRC_OK
|
||||
OTHERS = 4 ##FM_SUBRC_OK.
|
||||
|
||||
check_subrc_for( `RH_HRSOBJECT_DELETE` ).
|
||||
|
||||
|
|
|
@ -486,7 +486,8 @@ CLASS zcl_abapgit_object_scp1 IMPLEMENTATION.
|
|||
TABLES
|
||||
texts = ls_scp1-scprtext
|
||||
EXCEPTIONS
|
||||
no_text_found = 1.
|
||||
no_text_found = 1
|
||||
OTHERS = 2 ##FM_SUBRC_OK.
|
||||
|
||||
IF ls_scp1-scprattr-type = 'TMP'.
|
||||
load_hier( CHANGING cs_scp1 = ls_scp1 ).
|
||||
|
|
|
@ -134,7 +134,7 @@ CLASS zcl_abapgit_object_sfpf IMPLEMENTATION.
|
|||
|
||||
TRY.
|
||||
rv_xstr = cl_fp_helper=>convert_form_to_xstring( li_fp_form ).
|
||||
CATCH cx_fp_api INTO lx_fp_conv_err.
|
||||
CATCH cx_fp_api INTO lx_fp_conv_err ##NO_HANDLER.
|
||||
" Pass - the exception is handled below!
|
||||
ENDTRY.
|
||||
|
||||
|
|
|
@ -569,7 +569,7 @@ CLASS zcl_abapgit_object_ueno IMPLEMENTATION.
|
|||
header = ls_docu-header
|
||||
content = ls_docu-content
|
||||
itf = ls_docu-itf
|
||||
pstatus = lv_error_status.
|
||||
pstatus = lv_error_status ##ARG_OK.
|
||||
|
||||
CHECK lv_error_status = 'S'. "Success
|
||||
|
||||
|
|
|
@ -303,7 +303,7 @@ CLASS zcl_abapgit_object_wdca IMPLEMENTATION.
|
|||
WHERE config_id = ls_outline-config_id
|
||||
AND config_type = ls_outline-config_type
|
||||
AND config_var = ls_outline-config_var.
|
||||
CATCH zcx_abapgit_exception.
|
||||
CATCH zcx_abapgit_exception ##NO_HANDLER.
|
||||
" File not found
|
||||
ENDTRY.
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ CLASS zcl_abapgit_object_xinx IMPLEMENTATION.
|
|||
suppress_transport = 'X'
|
||||
EXCEPTIONS
|
||||
no_docu_found = 1
|
||||
OTHERS = 2.
|
||||
OTHERS = 2 ##FM_SUBRC_OK.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
@ -317,6 +317,9 @@ CLASS zcl_abapgit_object_xinx IMPLEMENTATION.
|
|||
EXCEPTIONS
|
||||
illegal_input = 1
|
||||
OTHERS = 2.
|
||||
IF sy-subrc <> 0.
|
||||
zcx_abapgit_exception=>raise( 'Error reading index' ).
|
||||
ENDIF.
|
||||
|
||||
rv_bool = boolc( ls_dd12v IS NOT INITIAL ).
|
||||
|
||||
|
|
|
@ -650,7 +650,7 @@ CLASS zcl_abapgit_objects_program IMPLEMENTATION.
|
|||
cancelled = 2
|
||||
name_not_allowed = 3
|
||||
permission_error = 4
|
||||
OTHERS = 5.
|
||||
OTHERS = 5 ##FM_SUBRC_OK.
|
||||
CATCH cx_sy_dyn_call_param_not_found.
|
||||
CALL FUNCTION 'RPY_PROGRAM_INSERT'
|
||||
EXPORTING
|
||||
|
@ -667,7 +667,7 @@ CLASS zcl_abapgit_objects_program IMPLEMENTATION.
|
|||
cancelled = 2
|
||||
name_not_allowed = 3
|
||||
permission_error = 4
|
||||
OTHERS = 5.
|
||||
OTHERS = 5 ##FM_SUBRC_OK.
|
||||
ENDTRY.
|
||||
IF sy-subrc = 3.
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ CLASS zcl_abapgit_objects_super IMPLEMENTATION.
|
|||
object_not_specified = 3
|
||||
permission_failure = 4
|
||||
dialog_needed = 5
|
||||
OTHERS = 6.
|
||||
OTHERS = 6 ##FM_SUBRC_OK.
|
||||
CATCH cx_sy_dyn_call_param_not_found.
|
||||
TRY.
|
||||
" try to force deletion for APPENDs
|
||||
|
@ -207,7 +207,7 @@ CLASS zcl_abapgit_objects_super IMPLEMENTATION.
|
|||
object_not_specified = 3
|
||||
permission_failure = 4
|
||||
dialog_needed = 5
|
||||
OTHERS = 6.
|
||||
OTHERS = 6 ##FM_SUBRC_OK.
|
||||
CATCH cx_sy_dyn_call_param_not_found.
|
||||
" no_ask_delete_append and aie_force_deletion not available in lower releases
|
||||
CALL FUNCTION 'RS_DD_DELETE_OBJ'
|
||||
|
@ -221,7 +221,7 @@ CLASS zcl_abapgit_objects_super IMPLEMENTATION.
|
|||
object_not_specified = 3
|
||||
permission_failure = 4
|
||||
dialog_needed = 5
|
||||
OTHERS = 6.
|
||||
OTHERS = 6 ##FM_SUBRC_OK.
|
||||
ENDTRY.
|
||||
ENDTRY.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user