Description:
A constructor expression using the NEW operator creates either an anonymous data object or an instance of a class.
- The result is a reference variable that refers to the newly created object.
- The following options can be specified for the type:
- A non-generic data type.
- The NEW operator functions similarly to the statement CREATE DATA dref TYPE dtype.
- A Class
- The NEW operator behaves the same way as the statement CREATE OBJECT oref TYPE class.
- The # character.
- A non-generic data type.
Syntax:
NEW type( ... ) ...
Example:
DATA(lo_cls) = NEW class_name( ).
Thanks for visiting!
Sangeeta Singh

Leave a Reply