SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
Cannot Use NON-LOCAL Addition
In ABAP Objects, the following statements cause a syntax error:
METHOD|FUNCTION|FORM ...
DATA f TYPE ... NON-LOCAL.
...
ENDMETHOD|ENDFUNCTION|ENDFORM.
Correct syntax:
DATA f TYPE ...
METHOD|FUNCTION|FORM ...
...
ENDMETHOD|ENDFUNCTION|ENDFORM.
Cause:
The undocumented addition NON-LOCAL changes the attributes of a class or the local data objects of a
procedure into global data objects of the
main program. However, global data objects can only be defined in the main program, by their very nature. In particular,
class pools cannot contain global data objects; NON-LOCAL allows developers to get round this rule.