create simple ABAP class into abap program



Αξιολόγηση Χρήστη:  / 5
ΧειρότεροΚαλύτερο 
Λεπτομέρειες

The simple ABAP program writes to screen from simple ABAP class method:

View source
program ztest_class.
 
*--------------------------------------------------------------------
*  www.developerpages.gr
*--------------------------------------------------------------------
 
class myfirstclass DEFINITION FINAL.
  PUBLIC SECTION.
    methods hello_world.
ENDCLASS.
 
CLASS myfirstclass implementation.
  METHOD hello_world.
    write :/ 'Hello world from simple ABAP class !'.
  ENDMETHOD.
 
ENDCLASS.
 
data : my_hello TYPE REF TO myfirstclass.
 
START-OF-SELECTION.
 
* create object
CREATE OBJECT my_hello.
 
* Call method hello_world 
CALL METHOD my_hello->hello_world.


You have no rights to post comments

   

     

© Developerpages