Describing the ABAP RESTful Application Model Flashcards

1
Q

How do you create a Database Table

A

File -> New -> Other
Type database table in the appearing dialog box filter
Doubleclick

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

How do you define columns in a table in the database definition? (built-in ABAP Dictionary types)

A

Use the notation field_name : data_type.

For built-in ABAP dictionary types, use the notation abap.data_type.

Provide the length in parentheses after the data type if it’s incomplete.

For example, abap.char(10) for character types.

For numeric types with fixed decimal places, use abap.dec(15,2) for example, defining 15 digits including two decimal places.

EXAMPLE:
carrier_id : /dmo/carrier_id;
Afterwards, ctrl + click on carrier_id (the right one)

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

What are data elements?

A

Data elements are ABAP Dictionary objects defining the type of a single field.

They encompass both technical type descriptions and semantic information like field labels.

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

How do you create a new data element in ABAP?

A

Navigate to File → New → Other, then select “data element.”

Provide the package name and name for the data element.

Select a transport request for version control.

Specify a data type for the data element, usually a domain.

Enter short, medium, and long field labels, along with a label for column headings.

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

How do you define table columns in ABAP, and what is the difference compared to using data elements?

A

In ABAP, table columns can be defined directly by specifying the field name and data type using the notation “field_name : data_type.”

Unlike using data elements, which provide semantic information and allow for automatic usage of field labels on generated user interfaces, directly defining table columns does not offer these benefits.

Directly defining table columns can be less structured and may require manual management of field labels and other metadata.

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

Why is a primary key necessary in a table definition, and what are the requirements for defining it?

A

A primary key is required to uniquely identify each entry in a table.

The primary key is defined as a sequence of fields at the beginning of the table description.

The first field in the key definition must be the client field with the data type abap.clnt, indicating the client-specific data partitioning.

It is recommended to use a UUID (Universally Unique Identifier) for the unique key, specified by the data element sysuuid_x16, to allow the runtime to automatically assign UUIDs when creating new records.

Example:

key client : abap.clnt not null;
key uuid : sysuuid_x16 not null;

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

What is the significance of the first field in the table definition?

A

The first field in the table definition must be the client field, with the data type abap.clnt.

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

What is recommended for generating a unique key in a table?

A

It is recommended to use a UUID (Universally Unique Identifier) for generating a unique key in a table. This can be achieved by using the data element sysuuid_x16.

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

Why is it important to store administrative information with data in a database table?

A

It is important for traceability reasons to store administrative information with data in a database table. This includes details such as the user who created or changed the data, as well as timestamps for creation and last change.

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

What purpose do timestamps serve in the ABAP RESTful application programming model?

A

timestamps are used for concurrency control. They serve as effective ETag fields, ensuring data consistency by changing their value whenever a data set is updated.

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

What is the purpose of publishing the service in the OData UI Service?

A

The service must be published before testing the app to ensure it is available for preview.

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

How can you publish the OData UI Service?

A

To publish the service, open the service binding and choose “Publish.”

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

How can you Preview the app?

A

After publishing the service, you can preview the app by selecting the entity (e.g., Connection) and choosing “Preview.”

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

What is the significance of the Preview option in the OData UI Service?

A

Choosing “Preview” allows you to test the SAP Fiori app generated from the OData UI Service in a browser window.

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

What is the object generator and its role in creating a Fiori app in the ABAP context?

A

The object generator is a tool used in ABAP development to automatically create repository objects needed for building a Fiori app. It generates CDS views, behavior definitions, implementation classes, and other artifacts based on input provided by the developer, streamlining the development process and ensuring adherence to naming conventions and best practices.

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

How do you start the object generator for creating ABAP repository objects?

A

Right-click the table name in the Project Explorer and choose “Generate ABAP Repository Objects.”

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

In the ABAP RESTful Programming Model, how do you access database tables?

A

Instead of accessing database tables directly, you use a CDS data definition, which is similar to an SQL view but contains important semantic information.

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

What is a behavior definition in the context of the ABAP RESTful Programming Model?

A

A behavior definition specifies which actions (create, update, delete) are allowed for a particular entity, along with other definitions like draft enabling, automatic numbering, validations, and determinations.

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

What is the purpose of a service projection in the ABAP RESTful Programming Model?

A

A service projection contains a view with the required fields for a specific app, a behavior definition specifying available behaviors, and metadata extensions defining the app’s UI.

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

What is the semantic key in the context of database tables?

A

a combination of fields in a database table that must be unique according to business logic, in addition to the technical key.

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

Where are validations declared in the ABAP RESTful Application Programming Model?

A

Validations are declared in the behavior definition of the CDS view entity, specifying conditions and checks to ensure data consistency and integrity.

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

What is the purpose of message classes in ABAP development?

A

Message classes are used to define and manage messages that can be displayed to users in ABAP applications, providing informative, warning, error, or success messages.

23
Q

How do you prevent duplicate records in database tables using validations?

A

Validations can enforce unique constraints on specific fields, such as semantic keys, by checking for duplicates and issuing appropriate error messages if duplicate records are found.

24
Q

What is the significance of the behavior definition in the ABAP RESTful Application Programming Model?

A

The behavior definition specifies the behavior of a business object, including allowed actions like create, update, delete, and draft enabling, ensuring consistency and integrity of data operations.

25
Q

What are some common examples of validations in ABAP applications?

A

Examples include checking semantic key uniqueness, validating input data, ensuring data consistency, and enforcing business-specific rules and constraints

26
Q

How do you report a message using the reported structure?

A

To report a message in ABAP, you must follow these steps:

Add the key of the affected record to the internal table using the field group %tky.

Attach the message object to the table by assigning the object reference of the message to the %msg component.

Bind the message to the affected field using the %element component of the internal table.

27
Q

What is a determination in the context of the ABAP RESTful application programming model?

A

A determination in ABAP is a method defined in the behavior definition of a business object. It is triggered when the business object is saved and certain fields have changed. Determinations are used to manipulate data based on specific conditions.

28
Q

How do you define a determination in ABAP?

A

o define a determination, you declare it in the behavior definition of a business object. You specify a method name and conditions for when the determination should be triggered, such as when specific fields have changed.

29
Q

What is the process of a determination in ABAP?

A

The process of a determination involves reading data based on specified conditions, manipulating the data as needed, and updating the transactional buffer with the modified data using the EML statement UPDATE.

30
Q

How do you make fields read-only in the ABAP RESTful application programming model?

A

Fields can be made read-only either in the behavior definition or the behavior projection. This choice depends on whether the fields should be read-only in general or only for a particular service.

31
Q

When should you make fields read-only in the behavior definition or behavior projection?

A

Fields should be made read-only in the behavior definition if they should be read-only in general, across all services. If the read-only status should apply only to a particular service, then it should be defined in the behavior projection.

32
Q

What is the benefit of making fields read-only in the ABAP RESTful application programming model?

A

Making fields read-only ensures data consistency and accuracy, especially when certain fields’ values are provided by determinations. It also simplifies the implementation by reducing the need for additional validations.

33
Q

How do you rearrange fields in a projection viewl?

A

Fields can be rearranged by annotating the corresponding fields of the projection view, typically done in a metadata extension.

34
Q

What is Value Help in SAP’s user interface solutions?

A

Value Help allows users to display a list of possible values for a field, typically achieved by reading data from the database.

35
Q

How can you provide Value Help in Fiori Elements?

A

By defining a CDS view that displays possible values and attaching it to a field in the app.

36
Q

What does the CDS view for Value Help typically select data from?

A

It selects data from a database table, such as /dmo/carrier, containing a list of airlines.

37
Q

What annotation is used to attach Value Help to a field?

A

@Consumption.valueHelpDefinition

Example:

@Consumption.valueHelpDefinition: [{
entity.name: ‘I_CurrencyStdVH’,
entity.element: ‘Currency’
}]

38
Q

How can you configure fields as selection fields on the report list page in SAP Fiori Elements?

A

To configure fields as selection fields on the report list page in SAP Fiori Elements, you annotate view elements with suitable values for the @UI.selectionField annotation.

Example:

@UI.selectionField: [{ position: 10}]
carrierid;

39
Q

What are the steps to adjust the behavior in SAP Fiori Elements?

A

To adjust the behavior in SAP Fiori Elements:

  1. Disable standard operations like create and delete.
  2. Set specific fields to be read-only in their behaviour projection.

Example:

// Disable standard operations create and delete
// use create;
use update;
// use delete;

// Set field PlaneTypeID to read-only
field (readonly) PlaneTypeID;

40
Q

How does the system display the field with Value Help?

A

By attaching the CDS view defining the hit list to a field of your projection using an annotation.

40
Q

What forms the hit list in Value Help?

A

Two columns returned by the CDS view, such as the airline code and its name.

41
Q

What happens when a user chooses an entry from the Value Help hit list?

A

The system must return a single value to the field.

42
Q

What is a draft in the context of SAP Fiori Elements?

A

In the context of SAP Fiori Elements, a draft represents an intermediate state of a business object that is being edited but not yet saved. It allows users to make changes to data without immediately affecting the original record.

43
Q

What are the key components of draft handling in SAP Fiori Elements?

A

Draft-enabled entities: Business objects that support the creation and management of drafts.

Draft administration: Tools and functionalities for managing drafts, such as creation, deletion, and activation.

User interface integration: User interfaces that display draft-related information and allow users to interact with drafts seamlessly.

Backend services: Services responsible for persisting and managing draft data on the server side.

44
Q

How does the draft handling process work in SAP Fiori Elements?

A

The draft handling process in SAP Fiori Elements typically involves the following steps:

Creation: Users initiate the creation of a draft by starting to edit a business object.

Editing: Users make changes to the data within the draft, which remains in a transient state until saved or discarded.

Saving: Users can save the changes made in the draft, persisting them to the database as a new version of the original record.

Activation: Once users are satisfied with the changes in the draft, they can activate it to update the original record with the draft’s data.

Discarding: Users have the option to discard the draft, reverting the data back to its original state without affecting the original record.

45
Q

How do you enable draft handling for a business object in SAP Fiori Elements?

A

To enable draft handling for a business object in SAP Fiori Elements, you need to:

Define the business object as draft-enabled in the data model.

Implement the necessary backend logic to support draft creation, editing, and activation.

Configure the user interface to display draft-related functionalities and handle draft operations.

46
Q

When you create a validation, what does the system generate automatically?

A
An empty method in the local class of the behavior implementation.

B
A fully-implemented method in the global class of the behavior implementation.

C
An empty method in the global class of the behavior implementation.

D
A fully-implemented method in the local class of the behavior implementation.

A

A
An empty method in the local class of the behavior implementation.

47
Q

Where do you declare fields as read-only?

A
In the metadata extension

B
In the behavior definition

C
In the behavior implementation

A

B
In the behavior definition

48
Q

Which of the following can you use to specify the data type of a column in a database table?

A
Local type

B
Data element

C
Domain

A

B
Data element

49
Q

You want to generate the development objects for a simple ABAP RESTful application. When you define the database table you must create a client field. Which data type must it have?

A
The data element MANDT.

B
The built-in ABAP Dictionary type abap.char(3)

C
The built-in ABAP Dictionary type abap.clnt.

A

C
The built-in ABAP Dictionary type abap.clnt.

50
Q

In the validation, you use the READ ENTITIES statement to read the data entered by the user. Which parameter of the validation method do you use to ensure that the correct data is retrieved?

A
REPORTED

B
FAILED

C
KEYS

A

C
KEYS

51
Q

You need to display an error text. Where do you create it?

A
In a message class.

B
In a text pool.

C
In a global class.

A

A
In a message class.

52
Q

What does the annotation @Consumption.ValueHelpDefiniton specify?

A
A list of fields in the hit list

B
A list of possible entries

C
A CDS view that provides the hit list

D
The field that provides the selected value

A

C
A CDS view that provides the hit list

D
The field that provides the selected value