Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming conventions #2059

Merged
merged 2 commits into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/objects/ecatt/zcl_abapgit_ecatt_sp_download.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENDCLASS.



CLASS zcl_abapgit_ecatt_sp_download IMPLEMENTATION.
CLASS ZCL_ABAPGIT_ECATT_SP_DOWNLOAD IMPLEMENTATION.


METHOD download.
Expand Down Expand Up @@ -96,6 +96,7 @@ CLASS zcl_abapgit_ecatt_sp_download IMPLEMENTATION.

ENDMETHOD.


METHOD set_sp_data_to_template.

" downport
Expand All @@ -106,16 +107,16 @@ CLASS zcl_abapgit_ecatt_sp_download IMPLEMENTATION.
lv_sp_xml TYPE etxml_line_str,
lo_ecatt_sp TYPE REF TO object.

FIELD-SYMBOLS: <ecatt_object> TYPE data.
FIELD-SYMBOLS: <lg_ecatt_object> TYPE data.

li_start_profile_data_node = template_over_all->create_simple_element(
name = 'START_PROFILE'
parent = root_node ).

ASSIGN ('ECATT_OBJECT') TO <ecatt_object>.
ASSIGN ('ECATT_OBJECT') TO <lg_ecatt_object>.
ASSERT sy-subrc = 0.

lo_ecatt_sp = <ecatt_object>.
lo_ecatt_sp = <lg_ecatt_object>.

TRY.
CALL METHOD lo_ecatt_sp->('GET_SP_ATTRIBUTES')
Expand All @@ -134,5 +135,4 @@ CLASS zcl_abapgit_ecatt_sp_download IMPLEMENTATION.
li_start_profile_data_node->append_child( new_child = li_element ).

ENDMETHOD.

ENDCLASS.
16 changes: 8 additions & 8 deletions src/objects/ecatt/zcl_abapgit_ecatt_sp_upload.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ CLASS ZCL_ABAPGIT_ECATT_SP_UPLOAD IMPLEMENTATION.
lv_exception_occurred TYPE etonoff,
lo_ecatt_sp TYPE REF TO object.

FIELD-SYMBOLS: <ecatt_object> TYPE any.
FIELD-SYMBOLS: <lg_ecatt_object> TYPE any.

TRY.
li_section = template_over_all->find_from_name_ns( 'START_PROFILE' ).
Expand All @@ -59,10 +59,10 @@ CLASS ZCL_ABAPGIT_ECATT_SP_UPLOAD IMPLEMENTATION.
IMPORTING
xml_as_string = lv_start_profile.

ASSIGN ('ECATT_OBJECT') TO <ecatt_object>.
ASSIGN ('ECATT_OBJECT') TO <lg_ecatt_object>.
ASSERT sy-subrc = 0.

lo_ecatt_sp = <ecatt_object>.
lo_ecatt_sp = <lg_ecatt_object>.

CALL METHOD lo_ecatt_sp->('SET_SP_ATTRIBUTES')
EXPORTING
Expand Down Expand Up @@ -95,9 +95,9 @@ CLASS ZCL_ABAPGIT_ECATT_SP_UPLOAD IMPLEMENTATION.
lv_exception_occurred TYPE etonoff,
lo_ecatt_sp TYPE REF TO object.

FIELD-SYMBOLS: <ecatt_sp> TYPE any,
<lv_d_akh> TYPE data,
<lv_i_akh> TYPE data.
FIELD-SYMBOLS: <lg_ecatt_sp> TYPE any,
<lv_d_akh> TYPE data,
<lv_i_akh> TYPE data.

TRY.
ch_object-i_devclass = ch_object-d_devclass.
Expand Down Expand Up @@ -132,10 +132,10 @@ CLASS ZCL_ABAPGIT_ECATT_SP_UPLOAD IMPLEMENTATION.
lv_exc_occ = 'X'.
ENDTRY.

ASSIGN me->ecatt_object TO <ecatt_sp>.
ASSIGN me->ecatt_object TO <lg_ecatt_sp>.
ASSERT sy-subrc = 0.

lo_ecatt_sp = <ecatt_sp>.
lo_ecatt_sp = <lg_ecatt_sp>.

TRY.
get_ecatt_sp( ).
Expand Down
37 changes: 19 additions & 18 deletions src/objects/zcl_abapgit_object_scp1.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -81,33 +81,33 @@ CLASS ZCL_ABAPGIT_OBJECT_SCP1 IMPLEMENTATION.

METHOD call_delete_fms.

CONSTANTS version_new TYPE c VALUE 'N' ##NO_TEXT. "Include SCPRINTCONST version_new
CONSTANTS operation_delete TYPE c VALUE 'D' ##NO_TEXT.
DATA profile_type TYPE scprattr-type.
DATA fatherprofiles TYPE standard table of scproprof WITH DEFAULT KEY.
DATA fatherprofile TYPE scproprof.
CONSTANTS lc_version_new TYPE c VALUE 'N' ##NO_TEXT. "Include SCPRINTCONST version_new
CONSTANTS lc_operation_delete TYPE c VALUE 'D' ##NO_TEXT.
DATA lv_profile_type TYPE scprattr-type.
DATA lt_fatherprofiles TYPE STANDARD TABLE OF scproprof WITH DEFAULT KEY.
DATA ls_fatherprofile TYPE scproprof.

CALL FUNCTION 'SCPR_DB_ATTR_GET_DETAIL'
EXPORTING
profid = iv_profile_id
version = version_new
version = lc_version_new
IMPORTING
proftype = profile_type
proftype = lv_profile_type
EXCEPTIONS
OTHERS = 0.

CALL FUNCTION 'SCPR_PRSET_DB_USED_IN'
EXPORTING
profid = iv_profile_id
version = version_new
version = lc_version_new
TABLES
profiles = fatherprofiles.
profiles = lt_fatherprofiles.

fatherprofile-id = iv_profile_id.
APPEND fatherprofile TO fatherprofiles.
ls_fatherprofile-id = iv_profile_id.
APPEND ls_fatherprofile TO lt_fatherprofiles.
CALL FUNCTION 'SCPR_CT_TRANSPORT_ENTRIES'
TABLES
profids = fatherprofiles
profids = lt_fatherprofiles
EXCEPTIONS
error_in_transport_layer = 1
user_abort = 2.
Expand All @@ -118,9 +118,9 @@ CLASS ZCL_ABAPGIT_OBJECT_SCP1 IMPLEMENTATION.
CALL FUNCTION 'SCPR_PRSET_DB_DELETE_ALL'
EXPORTING
profid = iv_profile_id
proftype = profile_type
proftype = lv_profile_type
TABLES
fatherprofs = fatherprofiles
fatherprofs = lt_fatherprofiles
EXCEPTIONS
user_abort = 1.
IF sy-subrc <> 0.
Expand All @@ -130,7 +130,7 @@ CLASS ZCL_ABAPGIT_OBJECT_SCP1 IMPLEMENTATION.
CALL FUNCTION 'SCPR_MEM_SCPR_ACTIONS_ADD'
EXPORTING
bcset_id = iv_profile_id
operation = operation_delete.
operation = lc_operation_delete.

ENDMETHOD.

Expand Down Expand Up @@ -270,11 +270,12 @@ CLASS ZCL_ABAPGIT_OBJECT_SCP1 IMPLEMENTATION.

METHOD zif_abapgit_object~delete.

DATA: profile_id TYPE scpr_id.
profile_id = ms_item-obj_name.
DATA: lv_profile_id TYPE scpr_id.

lv_profile_id = ms_item-obj_name.

enqueue( ).
call_delete_fms( profile_id ).
call_delete_fms( lv_profile_id ).
dequeue( ).

ENDMETHOD.
Expand Down
31 changes: 15 additions & 16 deletions src/objects/zcl_abapgit_object_udmo.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ ENDCLASS.



CLASS zcl_abapgit_object_udmo IMPLEMENTATION.
CLASS ZCL_ABAPGIT_OBJECT_UDMO IMPLEMENTATION.


METHOD access_free.
Expand Down Expand Up @@ -412,29 +412,28 @@ CLASS zcl_abapgit_object_udmo IMPLEMENTATION.
METHOD serialize_entities.

DATA lt_udmo_entities TYPE STANDARD TABLE OF dm41s WITH DEFAULT KEY.
FIELD-SYMBOLS <udmo_entity> TYPE dm41s.
FIELD-SYMBOLS <ls_udmo_entity> TYPE dm41s.

SELECT * FROM dm41s
INTO TABLE lt_udmo_entities
WHERE dmoid EQ me->mv_data_model
AND as4local EQ me->mv_activation_state.


LOOP AT lt_udmo_entities ASSIGNING <udmo_entity>.
LOOP AT lt_udmo_entities ASSIGNING <ls_udmo_entity>.

" You are reminded that administrative information, such as last changed by user, date, time is not serialised.
CLEAR <udmo_entity>-lstuser.
CLEAR <udmo_entity>-lstdate.
CLEAR <udmo_entity>-lsttime.
CLEAR <udmo_entity>-fstuser.
CLEAR <udmo_entity>-fstdate.
CLEAR <udmo_entity>-fsttime.

CLEAR <ls_udmo_entity>-lstuser.
CLEAR <ls_udmo_entity>-lstdate.
CLEAR <ls_udmo_entity>-lsttime.
CLEAR <ls_udmo_entity>-fstuser.
CLEAR <ls_udmo_entity>-fstdate.
CLEAR <ls_udmo_entity>-fsttime.

ENDLOOP.

" You are reminded that descriptions in other languages do not have to be in existence, although they may.
IF lines( lt_udmo_entities ) GT 0.
IF lines( lt_udmo_entities ) > 0.
io_xml->add( iv_name = 'UDMO_ENTITIES'
ig_data = lt_udmo_entities ).
ENDIF.
Expand Down Expand Up @@ -713,6 +712,11 @@ CLASS zcl_abapgit_object_udmo IMPLEMENTATION.
ENDMETHOD.


METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.


METHOD zif_abapgit_object~is_locked.

rv_is_locked = exists_a_lock_entry_for(
Expand Down Expand Up @@ -778,9 +782,4 @@ CLASS zcl_abapgit_object_udmo IMPLEMENTATION.
me->serialize_long_texts( io_xml ).

ENDMETHOD.


METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
ENDCLASS.
27 changes: 14 additions & 13 deletions src/objects/zcl_abapgit_object_xinx.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ENDCLASS.



CLASS zcl_abapgit_object_xinx IMPLEMENTATION.
CLASS ZCL_ABAPGIT_OBJECT_XINX IMPLEMENTATION.


METHOD constructor.
Expand Down Expand Up @@ -84,7 +84,7 @@ CLASS zcl_abapgit_object_xinx IMPLEMENTATION.
METHOD zif_abapgit_object~deserialize.

DATA: ls_extension_index TYPE ty_extension_index,
rc TYPE sy-subrc.
lv_rc TYPE sy-subrc.

io_xml->read(
EXPORTING
Expand Down Expand Up @@ -118,7 +118,7 @@ CLASS zcl_abapgit_object_xinx IMPLEMENTATION.
name = mv_name
id = mv_id
IMPORTING
rc = rc
rc = lv_rc
EXCEPTIONS
not_found = 1
put_failure = 2
Expand All @@ -128,7 +128,7 @@ CLASS zcl_abapgit_object_xinx IMPLEMENTATION.
zcx_abapgit_exception=>raise( |Error from DDIF_INDX_ACTIVATE { sy-subrc }| ).
ENDIF.

IF rc <> 0.
IF lv_rc <> 0.
zcx_abapgit_exception=>raise( |Cannot activate extension index { mv_id } of table { mv_name }| ).
ENDIF.

Expand Down Expand Up @@ -164,6 +164,16 @@ CLASS zcl_abapgit_object_xinx IMPLEMENTATION.
ENDMETHOD.


METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.


METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.


METHOD zif_abapgit_object~jump.

CALL FUNCTION 'RS_TOOL_ACCESS'
Expand Down Expand Up @@ -213,13 +223,4 @@ CLASS zcl_abapgit_object_xinx IMPLEMENTATION.
ig_data = ls_extension_index ).

ENDMETHOD.

METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.


METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
ENDCLASS.