Cannot Use NON-LOCAL Addition

You cannot use the NON-LOCAL addition to the DATA, STATICS, or CONSTANTS statements in ABAP Objects.

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.