Get Example source ABAP code based on a different SAP table

Standard SAP Help for FIELD-GROUPS


Short Reference

ABAP Syntax(Obsolete)FIELD-GROUPS { header | field_group }.

What does it do? Declares a field group for the extract dataset of the program. Each field group represents the name of a row structure of the extract dataset. You can create as many field groups as you want in a program. You define the actual components of a field group by using the statement INSERT.

The name of a field group is either the predefined name header or any name field_group. If you declare a field group header , it automatically becomes the initial part of all remaining field groups of the program and its components constitute the standard sort key of the extract dataset for the statement SORT.

The statement FIELD-GROUPS is possible in the global declaration part of an executable program, of a function group, of a module pool, or of a subroutine pool, as well as in the subprograms and function modules. Field groups that are declared in procedures are visible only there.

Latest notes:Since you can only define global data objects as components of field groups using the statement INSERT, we recommend that you also declare field groups only in the global declaration part of a program. The FIELD-GROUPS statement is forbidden in class pools or interface pools and in the methods of local classes of other programs.

Example ABAP Coding

Return to menu