
Up until now, you have been using simple variables, each of which can store a single piece of information. Here, for example, there are two variables, one for the departure airport, the other for the arrival airport.
When you read a record from the database you need to hold all of this information together. The two variables in the example are completely independent of one another, and are therefore not suitable for storing different pieces of information that belong together.
In ABAP, the solution is to use a structured variable, or a structure, for short.

A structure is a variable ABAP data object with a name and a structured type.
In the example, data object connection_full is such a structure. It is subdivided into eight components, each of which also has a name and a type. You can address both the structure as a whole and the individual components. Importantly, you can use each component in exactly the same way that you would use a standalone simple variable.
There are various possibilities to declare a structure. You can define structured types with keyword TYPES or use a repository object of type Structure. The definitions of views and database tables can also serve as structured types. The example uses CDS View /DMO/I_Connection as a structured type.

In the debugger perspective, there are two ways to analyze the structure and content of a structured variable:
- Variable Preview (Mouse Over)
Set the focus on the Source Code Editor and place the pointer on a variable name. After a moment a dialog window opens with details on the structure and content of the data object.
- Display in the Variables View (Double-Click)
To display the variable in the Variables view, either enter the variable name under <enter variable> or double-click the variable name somewhere in the source code editor. Expand the node with the structure name to see the list of components