SAP NEW ON THE LEFT ABEXA



Get Example source ABAP code based on a different SAP table
  



Instance Operator NEW on the Left
Constructor expression with NEW on the left side of an expression.

ABAP_SOURCE_CODE
DEMO CL_DEMO_NEW_ON_THE_LEFT

ABAP_DESCRIPTION
Although the reference variable only exists during the statement, the reference to the object is assigned to the reference variable user=>oref in the constructor of the class class, thus preserving the object. The example also shows dynamic specifications and the exception that is raised in case of an invalid attribute.