Sample code to show how instance and static method access :
*&---------------------------------------------------------------------*
*& Report ZOOABAP_CL6
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZOOABAP_CL6.
CLASS LCL_EMP DEFINITION.
PUBLIC SECTION.
METHODS M1. "INSTANCE METHOD
CLASS-METHODS : M2. " STATTIC METHOD
PROTECTED SECTION.
DATA : A TYPE I. "INSTANCE ATTRIBUTE
CLASS-DATA : B TYPE I. "STATIC ATTRIBUTE
CONSTANTS : C TYPE I VALUE 10."CONSTANT ATTRIBUTE
TYPES :D1 TYPE I.
ENDCLASS.
CLASS LCL_EMP IMPLEMENTATION.
METHOD M1.
FORMAT COLOR 3.
write :/ 'inside instance method m1...'.
data v_d type d1.
write :/ a,b,c,v_d.
format color off.
endmethod.
METHOD m2.
FORMAT COLOR 6.
write : /'Inside Static Method M2.....'.
DATA : V_D1 TYPE D1.
WRITE : / B, C, V_D1. "IN STATIC METHOD WE ONLY ACCESS STATIC , CONSTANTS BUT NOT INSTANCE
FORMAT COLOR OFF.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
LCL_EMP=>M2( ).
DATA : OB TYPE REF TO LCL_EMP.
WRITE :/'Acessing both static method and instance method via object'.
CREATE OBJECT OB .
cALL METHOD :OB->M1( )
, ob->m2( ).