Get Example source ABAP code based on a different SAP table
• NEW ABAP_CONSTRUCTOR • # NEW
NEW>, Instance Operator
ABAP_SYNTAX ... NEW type( ... ) ...>
What does it do? A constructor expression> with the instance operator NEW> creates an anonymous data object> or an instance> of a class and assigns values to the new object. The result is a reference variable that points to the created object. The following can be specified for type>:
A non-generic data type dtype>. The operator NEW> creates an anonymous data object of data type dtype>. The result of NEW> is a data reference variable of static type> dref> that points to the anonymous data object. The operator NEW> works in the same way as the statement CREATE DATA dref TYPE dtype>> where dref> corresponds to the result of the expression. A constructor expression of this type cannot be extended using a component selector>.