sapdev logo background
sapdev logo sapdev logo
Comments

ABAP GET- Statement syntax, information and example SAP source code



Return to Statement index



GET node

Short Reference

ABAP Syntax(Obsolete) GET node [LATE] [FIELDS f1 f2 ...].

ABAP_ALTERNATIVES:
1 GET node [FIELDS f1 f2 ...].
2 GET node LATE [FIELDS f1 f2 ...].

ABAP_ADDITION:
... FIELDS f1 f2 ...

What does it do? The statement GET is only intended for use in executable programs that are associated with a logical database .
GET can be used to handle two types of events after these types of executable programs are submitted :
Read events of the logical database
Closing a hierarchy level in the logical database
If a list is written during a GET event, an automatic line feed is created first.

Latest notes: The event blocks after GET are implemented internally as procedures . Declarative statements in GET event blocks create local data.
If logical databases are no longer used, the statement REJECT is no longer needed either.

ABAP_ALTERNATIVE_1 GET node [FIELDS f1 f2 ...].

What does it do? This statement defines an event block whose result is triggered by the ABAP runtime environment after submitting an executable program, if the logical database with which the program is associated provides data in the work area node . The node work area must be declared with the NODES statement (or TABLES ). The data can be processed in the event block.
GET node also controls the behavior of the logical database.
The logical database reads all data from all nodes that are not defined for field selection using
SELECTION-SCREEN FIELD SELECTION in the logical database and are located on the access path of the logical database superior to
node . This is independent of whether GET event blocks have been defined for these nodes or not. However, only the data of those nodes can be accessed for which a work area was declared using the
NODES (or TABLES ) statement.
If a field selection is defined in the logical database for those nodes on the access path of the logical database superior to node
(and for which no GET event blocks are defined), then all data is read only for the nodes for which a NODES (or TABLES ) statement exists. For nodes without a NODES (or TABLES ) statement, only the key fields are read, because the logical database needs the key fields to build the access path.
After the event block GET is
ended regularly , the nodes that are inferior in the hierarchical structure of the logical database are processed (see PUT ).
At the end of a hierarchy level of the logical database, all fields of the work area node are set to hexadecimal null.

ABAP_ALTERNATIVE_2 GET node LATE [FIELDS f1 f2 ...].

What does it do? This statement defines an event block whose result is triggered by the ABAP runtime environment after submitting an executable program, when the logical database has read all records of node node . For node
and FIELDS , the same applies as for the previous variant. This event block can be used for final processing actions on the hierarchy level of the node.

ABAP_ADDITION ... FIELDS f1 f2 ...

What does it do? The addition FIELDS specifies that the logical database reads only the specified fields f1 f2 ... and the key fields for node node . As a prerequisite, the node must be defined for field selection in the logical database using SELECTION-SCREEN FIELD SELECTION
. The content of the other fields of the work area is set to hexadecimal null.

Example ABAP Coding
See Example for Reporting Events
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




GET
GET_BADI




comments powered by Disqus