SAP Tutorials Blog


 

 


Report ZStatic1. 

CLASS class1 Definition.   

   PUBLIC Section.

      CLASS-DATA: name1 Type char45,

                  data1 Type I.

   Methods: meth1. 

ENDCLASS. 


CLASS class1 Implementation.   

   Method meth1.

      Do 4 Times.

         data1 = 1 + data1.

         Write: / data1, name1.

      EndDo.

      Skip.

   EndMethod. 

ENDCLASS. 


Start-Of-Selection. 

   class1⇒name1 = 'ABAP Object Oriented Programming'.

   class1⇒data1 = 0.

   Data: Object1 Type Ref To class1,

         Object2 Type Ref To class1.

   Create Object: Object1, Object2.

   CALL Method: Object1→meth1, 

                Object2→meth1.


Serkan AKKAVAK

Computer Engineer BSc

Head of SAP & Software Department

Contact : serkurumsal@yandex.com