14 Working with CDS View

0.0(0)
studied byStudied by 0 people
0.0(0)
linked notesView linked note
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/71

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

72 Terms

1
New cards

What is ABAP CDS?

ABAP Core Data Services (CDS) is an infrastructure for defining and consuming semantically rich data models in ABAP.

2
New cards

What do CDS Views implement?

CDS Views implement a semantic data model.

3
New cards

What does a CDS View definition contain?

A CDS View definition can contain re-usable SQL logic with calculations, aggregations, joins, and unions.

4
New cards

What are associations in CDS Views?

Associations reflect the relations of the data model and allow consumers of the view to retrieve related data.

5
New cards

What role do annotations play in CDS Views?

Annotations enrich the view definition semantically and are evaluated by frameworks that build on top of CDS View definitions.

6
New cards

What is the syntax to define a CDS View entity?

The syntax starts with the DEFINE VIEW ENTITY statement, followed by the name of the entity and the data source.

7
New cards

What is the purpose of the FIELDS clause in a CDS View?

The FIELDS clause specifies which view elements to select and retrieve.

8
New cards

What is the significance of the Key keyword in a CDS View entity?

The Key keyword defines specific fields as key fields of the CDS View entity.

9
New cards

How do you open the Data Preview tool for a CDS View?

Right-click the data definition and choose Open With > Data Preview, or press Ctrl + F8.

10
New cards

What is a path expression in the context of CDS Views?

Path expressions read element names from associated CDS view entities, prefixed with a backslash.

11
New cards

How can you filter the Where-used List in ADT?

You can apply filters based on specific packages or object types to find all CDS Views that use a certain database table.

12
New cards

What must be included in the INTO clause of a SELECT statement?

The INTO clause must include the attributes where the selected data will be stored.

13
New cards

What type of operations can CDS Views simplify?

CDS Views simplify operations like joining multiple data sources and performing real-time aggregations.

14
New cards

What does the optional addition AS do in a CDS View?

The optional addition AS defines an alias name for the data source inside the View definition.

15
New cards

How can you expose associations in a CDS View?

Associations can be exposed by adding them to the element list of the CDS View.

16
New cards

What is a potential source for a CDS View entity?

The source of a CDS View entity can also be another CDS View.

17
New cards

What type of metadata do entity annotations provide?

Entity annotations provide metadata for the view entity as a whole.

18
New cards

What type of metadata do element annotations provide?

Element annotations provide metadata for the different elements of the view.

19
New cards

What benefit does using a CDS View as a data source in ABAP SQL provide?

It allows for the reuse of complex SQL logic defined in the CDS View.

20
New cards

What happens when you use Follow Association in the Data Preview?

It allows displaying related data based on the selected association.

21
New cards

How do you declare a new attribute in a local class in ABAP?

Add the attribute in the PRIVATE SECTION of the class definition.

22
New cards

What should you do to extend a CDS View in a class?

You can modify the SELECT statement to read from the CDS View instead of the database table.

23
New cards

What is a common use case for CDS Views?

Constructing complex business scenarios by joining multiple data sources.

24
New cards

How can you activate a class in ABAP Editor?

Press Ctrl + F3 to activate the class.

25
New cards

What do curly brackets in a CDS View definition denote?

Curly brackets contain the list of view elements and their definitions.

26
New cards

How do you incorporate user-defined naming conventions in CDS Views?

By using the optional addition AS to define alias names for elements.

27
New cards

What does a SELECT SINGLE statement do in the context of CDS Views?

It retrieves a single record from the specified CDS View.

28
New cards

How can you ensure data consistency when using CDS Views?

By exposing well-defined, semantically rich data models to UI frameworks.

29
New cards

What is the purpose of the Data Preview tool?

To display and analyze the content of CDS View entities.

30
New cards

What does filtering data based on specific conditions achieve in a CDS View?

It provides a focused data set to consuming applications.

31
New cards

How to add a new output for an additional attribute in a class?

Modify the implementation of a method to include the new attribute in the output.

32
New cards

What can annotations within a CDS View guide?

They can guide UI generation or define data validation rules.

33
New cards

What is the advantage of using business-oriented names in CDS Views?

They can be clearer and more readable than technical database table fields.

34
New cards

What should be done after copying a template class in ABAP?

Adjust the class name and description before confirming the transport request.

35
New cards

How do you declare a key field in a CDS View entity definition?

By using the keyword Key in front of the field definitions.

36
New cards

What can associations between CDS Views help accomplish?

They help link related data together, enabling broader queries and data retrieval.

37
New cards

What is the importance of activating a class after making changes?

It ensures that the latest updates are reflected in the program execution.

38
New cards

What is the significance of the alias name in a CDS View?

It makes referencing the data source easier within the View definition.

39
New cards

What should you do in a SELECT statement to read multiple fields?

List the fields separated by commas in the FIELDS clause.

40
New cards

What happens when you analyze a CDS View entity?

You review its definition, elements, associations, and annotations.

41
New cards

Why is it recommended to utilize auto-completion in CDS Views?

Auto-completion helps avoid typing errors and speeds up code writing.

42
New cards

What type of application frameworks utilize CDS Views?

Modern UI frameworks such as the ABAP RESTful application programming model.

43
New cards

How does a SELECT statement get executed in a CDS View context?

By specifying the data source as the CDS View entity.

44
New cards

What can you achieve by extending a local class in ABAP?

You can add new functionality or attributes relevant to your application context.

45
New cards

What is the syntax to retrieve data from a CDS View entity?

SELECT SINGLE FROM FIELDS , WHERE .

46
New cards

What do you need to ensure when reading from a CDS View?

Use the correct prefix '@' while referencing parameters and attributes.

47
New cards

How can you enhance a CDS View for UI usage?

By adding semantic annotations and ensuring relevant field exposure.

48
New cards

What is the role of the tooltip description in a CDS View?

It provides additional context and metadata for associations.

49
New cards

What keyword is used to comment functionality in ABAP code?

The '*' character is used to comment out lines of code.

50
New cards

How to access the repository object of a CDS View?

Through the Open ABAP Development Object option in the Eclipse toolbar.

51
New cards

What type of queries can be simplified through the use of a CDS View?

Complex business queries involving multiple tables and conditions.

52
New cards

Why is it convenient to use CDS Views for READ operations in ABAP?

They encapsulate complex SQL logic, making queries concise and manageable.

53
New cards

What could be a potential source of issues when implementing a SELECT statement?

Using incorrect field names or forgetting to escape parameter names.

54
New cards

What allows for layering in CDS View definition?

The ability to use another CDS View as a source within a CDS View.

55
New cards

What type of development tools may assist when working with CDS Views?

ABAP Development Tools (ADT) in Eclipse.

56
New cards

What can modifying a CDS View's definition achieve?

Changes to the underlying data model that affect all consuming applications.

57
New cards

How do you expose an association in the element list of a CDS View?

By adding the association name to the list of elements in the CDS View definition.

58
New cards

What is the benefit of filtering in the Where-used List tool?

It allows developers to focus on specific types of objects related to a database table.

59
New cards

In what format should view elements be listed in a CDS View definition?

As a comma-separated list enclosed within curly brackets.

60
New cards

What does an exposed association in a CDS View allow users to do?

It allows accessing related data through the defined association.

61
New cards

What are some common annotations used in CDS Views?

Annotations for UI generation, data validation, or just-in-time calculations.

62
New cards

How are the key fields defined in a CDS View entity?

By preceding the field names with the Key keyword.

63
New cards

What is a typical next step after modifying the implementation of a method for a CDS View?

Activating the class to apply the changes in subsequent executions.

64
New cards

How is a Data Definition object identified in CDS Views?

By its object type and instance name in the ABAP repository.

65
New cards

What does the expression "using associations to display related data" mean?

It means utilizing defined relationships to fetch additional data easily.

66
New cards

When working with CDS Views, how can you ensure that the output shows all relevant attributes?

By appropriately selecting and exposing all necessary fields and associations.

67
New cards

What should you check after executing a class with temperature changes?

Validate the console output to ensure that the expected results are produced.

68
New cards

What does the keyword FROM indicate in a CDS View definition?

It indicates the source from which the CDS view entities are derived.

69
New cards

How do annotations impact the usability of CDS Views?

They provide additional context that enhances data accessibility and application development.

70
New cards

What is the significance of the WHERE condition in a CDS View SELECT statement?

It filters the data being retrieved based on specific criteria.

71
New cards

How does the key definition in a CDS View help in data integrity?

Key definitions help maintain unique entries in the data model.

72
New cards

Why would you choose a CDS View over a direct database table read in an application?

A CDS View generally encapsulates more logic and relationships than a simple table read.