All files / src/objects/tabl zcl_abapgit_object_tabl_ddl.clas.locals_imp.abap

100% Statements 53/53
100% Branches 1/1
100% Functions 1/1
100% Lines 53/53

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 541x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
CLASS lcl_replacement_mapping DEFINITION FINAL.
 
  PUBLIC SECTION.
    INTERFACES lif_replacement_mapping.
 
ENDCLASS.
 
 
CLASS lcl_replacement_mapping IMPLEMENTATION.
 
  METHOD lif_replacement_mapping~to_entity.
 
    DATA lv_entityname TYPE ddobjname.
 
    TRY.
        CALL METHOD ('CL_SBD_DDLS_UTILITY')=>('MAP_TO_REPLACEMENT_DDLS')
          EXPORTING
            i_view_name  = iv_view_name
          IMPORTING
            e_entityname = lv_entityname.
        rv_entityname = lv_entityname.
      CATCH cx_root.
        " The utility is not available on older releases and is also absent
        " from the open-abap test runtime. In that case no annotation is
        " emitted rather than serializing DD02V-VIEWREF with the wrong
        " meaning.
        CLEAR rv_entityname.
    ENDTRY.
 
  ENDMETHOD.
 
 
  METHOD lif_replacement_mapping~to_view.
 
    DATA lv_view_name TYPE ddobjname.
 
    TRY.
        CALL METHOD ('CL_SBD_DDLS_UTILITY')=>('MAP_TO_REPLACEMENT_VIEW')
          EXPORTING
            i_entityname = iv_entityname
          IMPORTING
            e_view_name  = lv_view_name.
        rv_view_name = lv_view_name.
      CATCH cx_root.
        " Keep source-only parsing usable on releases without the SAP
        " utility. A SAP system with the utility returns the resolved view
        " name, or initial for an entity that cannot be resolved.
        rv_view_name = iv_entityname.
    ENDTRY.
 
  ENDMETHOD.
 
ENDCLASS.