Ansicht
Dokumentation
ABAPINSERT_FG - INSERT FG
RFUMSV00 - Advance Return for Tax on Sales/Purchases BAL_S_LOG - Application Log: Log header dataThis documentation is copyright by SAP AG.
INSERT, field_group
INSERT dobj1 dobj2 ... INTO ${ header $| field_group $}.
Effect
This statement is used to build a structure of a field group of the extract dataset of the program, where the field group is defined using FIELD-GROUPS. A list of global flat data objects dobj can be specified after INSERT. Specifying local data objects raises an exception. The list defines the components of the field group header or field_group. Any name can be specified directly for field_group, whereas header is a predefined name of a special field group whose components are automatically a part and a key of all other field groups. The components of a field group are pointers to data objects whose content is appended to the extract dataset as a line when executing the statement EXTRACT.
The statement INSERT can be used in any processing block of a program and is executed at the appropriate time during the program execution. A field group can have different INSERT statements. Additional components can be added to a field group until the first corresponding line with EXTRACT is appended to the extract dataset. More specifically, components can only be added to the field group header until a field group of the program is extracted because it is a part of all field groups. An INSERT statement for an already extracted field group raises an uncatchable exception.
Field symbols can be specified for dobj, but not dereferenced data references. A field symbol is ignored if no data object is assigned to it. Specifying a data reference raises an uncatchable exception.
Notes
- A field group field_group to which no fields are explicitly added still contains the field of the special field group header.
- In global classes, no field groups can be defined or processed. In methods of local classes of programs other than class pools, the statement INSERT is possible for globally defined field groups.
- Extracts are obsolete. Internal tables should be used instead.
Example
In this example, three field groups are declared in the global declaration part of an
executable
program and its components are specified in the event block START-OF-SELECTION. The field
group flight_info contains five components: those of the field group header and its own. The field group flight_date contains only the components of the field group header.
Exceptions
Non-Catchable Exceptions
- Cause: Local data objects are to be inserted into a field group.
Runtime Error: EXTRACT_INSERT_LOCAL_DATA
- Cause: Field group contains INSERT after sets of this set type have already been extracted using EXTRACT.
Runtime Error: INSERT_INTO_LOCKED_FIELD_GROUP
BAL_S_LOG - Application Log: Log header data General Data in Customer Master
This documentation is copyright by SAP AG.
Length: 4252 Date: 20240419 Time: 232026 sap01-206 ( 69 ms )