Last active
July 31, 2017 10:57
-
-
Save larshp/608308cb9ad25d46de33cba4ab8ebb46 to your computer and use it in GitHub Desktop.
Anonymous code inspector run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REPORT ztest. | |
START-OF-SELECTION. | |
PERFORM run. | |
FORM run. | |
DATA(lt_objects) = VALUE scit_objs( ( | |
objtype = 'CLAS' | |
objname = 'ZCL_CI_ABAP_NAMING' ) ). | |
cl_ci_objectset=>save_from_list( | |
EXPORTING | |
p_user = sy-uname | |
p_objects = lt_objects | |
p_name = '' | |
p_skip_svim = abap_true | |
RECEIVING | |
p_ref = DATA(lr_objectset) | |
EXCEPTIONS | |
objs_already_exists = 1 | |
locked = 2 | |
error_in_enqueue = 3 | |
not_authorized = 4 | |
OTHERS = 5 ). | |
IF sy-subrc <> 0. | |
BREAK-POINT. | |
ENDIF. | |
* cl_ci_checkvariant=>get_ref( | |
* EXPORTING | |
* p_user = sy-uname | |
* p_name = 'DEFAULT' | |
* RECEIVING | |
* p_ref = DATA(lr_variant) | |
* EXCEPTIONS | |
* chkv_not_exists = 1 | |
* missing_parameter = 2 | |
* OTHERS = 3 ). | |
* IF sy-subrc <> 0. | |
* BREAK-POINT. | |
* ENDIF. | |
cl_ci_checkvariant=>create( | |
EXPORTING | |
p_user = sy-uname | |
RECEIVING | |
p_ref = DATA(lr_variant) | |
EXCEPTIONS | |
chkv_already_exists = 1 | |
locked = 2 | |
error_in_enqueue = 3 | |
not_authorized = 4 | |
OTHERS = 5 | |
). | |
IF sy-subrc <> 0. | |
BREAK-POINT. | |
ENDIF. | |
DATA(lt_variant) = VALUE sci_tstvar( ( | |
testname = 'ZCL_CI_ABAP_NAMING' | |
attributes = '' | |
version = '' ) ). | |
lr_variant->set_variant( | |
EXPORTING | |
p_variant = lt_variant | |
EXCEPTIONS | |
not_enqueued = 1 | |
OTHERS = 2 ). "#EC CI_SUBRC | |
IF sy-subrc <> 0. | |
BREAK-POINT. | |
ENDIF. | |
cl_ci_inspection=>create( | |
EXPORTING | |
p_user = sy-uname | |
p_name = '' | |
RECEIVING | |
p_ref = DATA(lr_inspection) | |
EXCEPTIONS | |
locked = 1 | |
error_in_enqueue = 2 | |
not_authorized = 3 | |
OTHERS = 4 ). "#EC CI_SUBRC | |
IF sy-subrc <> 0. | |
BREAK-POINT. | |
ENDIF. | |
lr_inspection->set( | |
p_chkv = lr_variant | |
p_objs = lr_objectset | |
p_deldate = CONV sci_deldat( sy-datum + 1 ) ). | |
lr_inspection->run( | |
EXCEPTIONS | |
invalid_check_version = 1 | |
OTHERS = 2 ). | |
IF sy-subrc <> 0. | |
BREAK-POINT. | |
ENDIF. | |
lr_inspection->plain_list( | |
IMPORTING | |
p_list = DATA(lt_list) ). | |
BREAK-POINT. | |
ENDFORM. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment