Sunday, May 24, 2026

20 MCQ Practice Questions on CDS Views

 

Question 1

Which of the following is the primary purpose of defining a SQL View Name using the @AbapCatalog.sqlViewName annotation in a classic CDS Data Definition?

  • A. It defines the name of the SAP Fiori tile interface.
  • B. It automatically creates a corresponding global internal table inside the ABAP memory pool.
  • C. It generates a database view artifact directly in the underlying database catalog.
  • D. It acts as an encryption key for secure user authentication profiles.

Question 2

When comparing CDS Views with classic database views created via the ABAP Dictionary (SE11), which feature is unique to CDS Views?

  • A. They support nested outer joins, functions, expressions, and built-in aggregations natively.
  • B. They can only read data from a single database table at a time.
  • C. They bypass database buffering rules completely to enforce client isolation.
  • D. They require an active background job template to update raw system indexes.

Question 3

Look at this code block:

cds

define view ZI_FlightInfo

  as select from sflight

  association [1..*] to spfli as _Schedule on $projection.carrid = _Schedule.carrid

{

  key carrid,

  key connid,

  _Schedule // What happens here?

}

Use code with caution.

What is the effect of exposing the relationship element _Schedule in the select list?

  • A. It instantly creates a mandatory Inner Join that halts database processing.
  • B. It acts as an ad-hoc path expression, allowing target field access down the line without executing instant joins.
  • C. It converts the entire data record into an editable application cache file.
  • D. It deletes duplicate table values from the system buffer natively.

Question 4

In a CDS View definition, what is the exact operational purpose of using the $projection syntax?

  • A. It imports structured fields from a different SAP application client.
  • B. It references an element that is already defined and formatted inside the current view's element selection list.
  • C. It forces the cloud execution processor to map records strictly as floating-point decimals.
  • D. It converts a database-driven procedure block into an active JavaScript function.

Question 5

Which CDS annotation is used to enforce Access Control Lists (ACL) or data-level security restrictions based on DCL (Data Control Language) definitions?

  • A. @ClientHandling.type: #INHERITED
  • B. @EndUserText.label: 'Security'
  • C. @AccessControl.authorizationCheck: #NOT_REQUIRED
  • D. @AccessControl.authorizationCheck: #CHECK

Question 6

What type of CDS View is built directly on top of database tables to serve as a reusable, stable, and single source of truth for a business entity in the Virtual Data Model (VDM)?

  • A. Consumption View
  • B. Analytical Cube View
  • C. Interface (Basic) View
  • D. Extension View

Question 7

What happens if you execute a CDS View that contains an input parameter using an Open SQL statement in ABAP?

  • A. The parameters must be passed using a special colon-separated list inside the WHERE clause.
  • B. Parameters must be supplied directly after the view name inside parentheses, like view_name( param = value ).
  • C. Parameters are automatically filled using the current system date and time (sy-datum).
  • D. The view fails to compile on the application server because parameters are exclusively for Fiori UI apps.

Question 8

Which of the following describes the difference between a CDS View Entity (define view entity) and a classic CDS DDIC-Based View (define view)?

  • A. View Entities do not generate an extra database artifact view (@AbapCatalog.sqlViewName) in the DDIC, optimizing activation speed.
  • B. View Entities cannot use associations or joins under any circumstances.
  • C. DDIC-Based Views can only execute on non-HANA systems.
  • D. View Entities are executed on the frontend client browser layer rather than the database.

Question 9

What is the function of the annotation @VDM.viewType: #CONSUMPTION in an SAP S/4HANA environment?

  • A. It indicates the view is designed to be directly used by front-end applications like SAP Fiori or BI tools.
  • B. It instructs the database engine to completely clear the server cache after data processing.
  • C. It defines the maximum billing cost per query processing stream.
  • D. It marks a database table field as a system currency parameter.

Question 10

If you want to enhance an existing standard SAP CDS view with custom fields without modifying the original SAP source code, which object type should you create?

  • A. A brand new AMDP Class wrapper
  • B. A CDS View Extension (extend view entity)
  • C. A secondary database index file via transaction SE11
  • D. A classic table append structure block

 

Question 11

What is the consequence of setting the metadata activation annotation @Metadata.allowExtensions: true at the top of a CDS View definition?

  • A. It allows external frontend developers to change the view's database table joins via web browsers.
  • B. It enables the separation of UI-specific layout annotations from the main business logic view by storing them in a dedicated Metadata Extension (MTE) artifact.
  • C. It permits the runtime engine to automatically add extra custom fields from the database to the query output.
  • D. It enables classic ABAP code to dynamically alter the database selection string at runtime.

Question 12

Which of the following functions can be used inside a CDS View to safely handle and replace NULL values fetched from an Outer Join?

  • A. ABS()
  • B. CONCAT()
  • C. COALESCE()
  • D. SUBSTRING()

Question 13

Consider the following snippet inside a CDS view selection list:

cds

case status

  when 'A' then 'Approved'

  when 'R' then 'Rejected'

  else 'Pending'

end as StatusText

Use code with caution.

Where does the conditional logic of this CASE statement execute?

  • A. Within the application server buffer layer.
  • B. In the presentation layer using JavaScript.
  • C. Directly inside the database engine during query execution.
  • D. Only during the activation phase in the ABAP Repository.

Question 14

When designing an analytical application in SAP S/4HANA, which specific value must be assigned to the data category annotation @Analytics.dataCategory to declare that a CDS view represents a transactional facts table (containing measurable key figures like revenue)? [1, 2]

  • A. #DIMENSION
  • B. #TEXT
  • C. #CUBE
  • D. #HIERARCHY

Question 15

What is the functional difference between using a Filter inside a path expression (e.g., _Schedule[carrid = 'LH'].connid) and a standard WHERE clause in a CDS view?

  • A. The filter applies criteria strictly to the specific associated target association data on demand, while the WHERE clause globally restricts rows for the entire query outcome.
  • B. The filter is executed on the frontend application, whereas the WHERE clause executes on the database.
  • C. Filters can only be used with numbers, while the WHERE clause works only with text fields.
  • D. Filters force an instant eager Outer Join, whereas the WHERE clause completely prevents any joins from forming.

Question 16

What occurs if a developer adds the annotation @ClientHandling.algorithm: #SESSION_VARIABLE to a classic DDIC-based CDS view? [1]

  • A. It completely disables client dependency, exposing all rows from all clients to any user.
  • B. It instructs the database to optimize automatic client filtering by implicitly leveraging the HANA database session variable $session.client.
  • C. It forces the system to lock user sessions whenever a heavy data write operation is called.
  • D. It encrypts the corporate client ID using the system master key. [1, 2]

Question 17

Which of the following describes a structural constraint of a CDS View Entity (define view entity) that distinguishes it from an older classic CDS DDIC-Based View (define view)?

  • A. View Entities can never execute basic mathematical calculations like addition or subtraction.
  • B. View Entities cannot include an explicit, distinct WHERE clause.
  • C. View Entities completely forbid the use of explicit type castings (CAST).
  • D. View Entities do not support the prefix annotation structure @AbapCatalog.sqlViewName. [1, 2, 3]

Question 18

How can you pass a system session value, such as the current logged-in user language, as a parameter input to an underlying CDS view inside an Open SQL statement? [1]

  • A. By hardcoding the string variable sy-langu inside a text field.
  • B. By using the system session variable host mapping syntax, such as with parameters p_lang = $session.system_language.
  • C. System variables cannot be passed to parameterized CDS views.
  • D. By writing a manual entry inside the database catalog table configuration file. [1]

Question 19

What does the annotation @OData.publish: true do when placed at the header level of a valid Consumption CDS View?

  • A. It automatically writes the backend data tables into a publicly accessible HTML web link.
  • B. It signals the SAP Gateway framework to automatically generate an OData service model based on the structure of the CDS view.
  • C. It forces the cloud system to bill the department whenever data is viewed.
  • D. It turns off all backend security controls for the specific view object. [1, 2]

Question 20

In a CDS View selection list, why would a developer use a prefix mapping block such as $parameters.P_TargetDate?

  • A. To change the password configuration of the database user.
  • B. To dynamically call an external AMDP class calculation loop.
  • C. To read and evaluate the value supplied to an input parameter defined in the view's header declaration block.
  • D. To assign a unique database security role directly to a field row.

 

No comments:

Post a Comment

Search SAPMV45A includes for Constants and Statics

 This report can find CONSTANTS and STATICS in SAPMV45A Z-includes. We know that Constants and Statics consume global variables so identifyi...