Create global constructors in ABAP

Once Refer-Introduction to constructors

Steps to create global constructor in ABAP.

1. Goto SE24.

2. Give class name and click on create and give short description and click on save.


3. Click on constructor it is instance constructor and click on class_constructor it is static constructor.



4. Double click on constructor and write code and save.

         METHOD constructor.

        WRITE'Instance constructor called'.
      ENDMETHOD.
5. Double click on class_constructor and write code.
         METHOD class_constructor.
        WRITE'static constructor called'.
      ENDMETHOD.
6. Check and activate and execute.


********************************Thank You***************************

Comments

Popular posts from this blog

New syntax for append- VALUE (new syntax 7.4+) in ABAP

Read statement new syntax in ABAP. (7.4+).

Concatenation new syntax( 7.4+ ).