SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
No Definition of Field Groups in Methods
Error message in methods if the following syntax is used:
METHOD ...
...
FIELD-GROUPS fg.
...
ENDMETHOD.
Reason:
An extract dataset currently exists only as a global object of the
main program. Therefore
the field groups can only be defined globally in the main program. However, the definition of the field
group structure, which is generated at runtime by the statement INSERT ... INTO fg, can also be executed in methods.