SAP Tutorials Blog

 


CLASS lcl_abstract DEFINITION ABSTRACT.

    PUBLIC SECTION.

        METHODS: abstract_method ABSTRACT,

                 final_method FINAL

                 normal_method.

                

ENDCLASS.


CLASS lcl_abstract IMPLEMENTATION.

    METHOD final_method.

        "This method can't be redefined in child class!

    ENDMETHOD.


    METHOD normal_method.

        "Some logic

    ENDMETHOD.


        "We can't implement abstract_method here!


ENDCLASS.


CLASS lcl_abap_class DEFINITION INHERITING FROM lcl_abstract.

    PUBLIC SECTION.

        METHODS: abstract_method REDEFINITION,

                 abap_class_method.

ENDCLASS.


CLASS lcl_abap_class IMPLEMENTATION.

    METHOD abstract_method.

        "Abstract method implementation

    ENDMETHOD.


    METHOD abap_class_method.

        "Logic

    ENDMETHOD.

ENDCLASS.


Serkan AKKAVAK

Computer Engineer BSc

SAP Department Deputy Manager

Contact : serkurumsal@yandex.com