Working with Structured Data Objects Flashcards

1
Q

What is a structured variable in ABAP?

A

A structured variable, or structure, is an ABAP data object with a name and a structured type. It consists of multiple components, each with its own name and type, and can hold related pieces of information together.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can you analyze the structure and content of a structured variable in the debugger perspective?

A

You can analyze structured variables in the debugger perspective using two methods:

Variable Preview (Mouse Over): Set the focus on the Source Code Editor and place the pointer on a variable name to view details on the structure and content of the data object.

Display in the Variables View (Double-Click): Enter the variable name under <enter> in the Variables view or double-click the variable name in the source code editor to see the list of components.</enter>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a global structure type in ABAP, and how is it defined?

A

A global structure type is a repository object that can be used as a data type anywhere in the system. It is defined using a DEFINE STRUCTURE statement followed by the list of structure components enclosed in curly brackets. Additional properties of the structure type, such as a label, can be specified before the DEFINE STRUCTURE statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you access components of a structure in ABAP?

A

Use a minus-sign (-) between the structure name and component name. No blanks are allowed. Accessed components can be used like standalone variables.

Example:

TYPES: BEGIN OF st_connection,
airport_from_id TYPE /dmo/airport_from_id
END OF st_connection.

DATA connection TYPE st_connection.
connection-airport_from_id = ‘ABC’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the VALUE #( ) expression used for in ABAP?

A

to fill a structured data object with values. It constructs a structure, fills it with values, and assigns the filled structure to a variable. The expression allows you to specify which components of the structure you want to fill and assign values to them, either literals or the contents of variables.

Example:
TYPES: BEGIN OF st_connection,
airport_from_id TYPE /dmo/airport_from_id
END OF st_connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of the INTO clause in an ABAP SELECT statement?

A

It specifies where selected data should be stored. Defines target structure or variables for data retrieved from the database. Corresponds target’s components to columns in the FIELDS clause to avoid errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the main components of an SQL join in ABAP?

A

The main components of an SQL join in ABAP include:

Data Sources: These are the database tables or views to be joined together.

Join Condition: This specifies the relationship between records of the left-hand and right-hand data sources.

Join Type: This determines the behavior of the join when there are unmatched records. ABAP SQL supports INNER JOIN, LEFT OUTER JOIN, and RIGHT OUTER JOIN.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

You declare a variable using the statement DATA struct TYPE <type>. Which of the following can you use to declare a structure?</type>

A database table

A data element

A predefined ABAP type

A CDS view

A

A database table

A CDS View

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A structure struct contains a component comp. How do you address the component?

A
struct-comp

B
struct->comp

C
struct.comp

D
struct=>comp

A

A
struct-comp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly