Monday, May 25, 2026

20 Analytical Questions on Code Pushdown Techniques (mettl pattern)

 

1.

An ABAP Core Data Services (CDS) view uses an ASSOCIATION to link a header table with a line-item table. If a query selects fields strictly from the header table without referencing any fields from the associated line-item table, how does SAP HANA execute this at the database level?

  A.

It executes a LEFT OUTER JOIN on all keys regardless of the selected field list.

  B.

It executes an INNER JOIN by default to ensure transactional consistency across both tables.

  C.

It completely avoids executing a JOIN to the line-item table, optimizing database performance.

Right answer:

CDS Associations feature lazy-loading properties, meaning the database JOIN is only evaluated or instantiated when fields from the target view are explicitly requested.

  D.

It triggers a runtime short dump because unreferenced associations require explicit default values.

 

2.

Review the following AMDP method declaration definition:

METHOD get_data BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT.

What critical syntax or addition is missing from this statement if the method intends to perform read-only selections from database tables?

  A.

The addition OPTIONS READ-ONLY is missing.

Right answer

AMDP methods performing read-only queries must explicitly state OPTIONS READ-ONLY to enable database-side optimizations and safety compliance.

  B.

The addition USING specifying database tables is missing.

  C.

The method declaration cannot utilize inline declarations in the signature.

  D.

The addition FOR HANOVER database engine declaration.

 

3.

When implementing an ABAP Managed Database Procedure (AMDP) that reads from the custom transparent table ZINVOICE_HEADER, which statement is true regarding the lifecycle and declaration of this dependency?

  A.

HANA automatically detects the table dependency at runtime, making manual declaration optional.

  B.

The table must be temporarily locked using an explicit ABAP ENQUEUE function before the AMDP call.

  C.

The table ZINVOICE_HEADER must be explicitly declared in the USING clause of the AMDP method implementation.

That's right!

The AMDP framework requires all database artifacts accessed within the SQLScript body to be visible to the compiler via the USING addition.

  D.

The table must be passed into the AMDP method signature as an importing parameter of type REF TO data.

 

4.

A senior developer creates a CDS view containing a calculated field using a CASE expression. A junior developer reports that the code works but is slow. As a Team Lead, how would you explain where this calculation takes place?

  A.

The calculation is entirely pushed down and executed in the database layer at database runtime.

That's right!

CDS view expressions and calculations are compiled directly into native database views, ensuring execution happens entirely on the HANA engine.

  B.

The calculation occurs in the application server layer when the internal table is populated.

  C.

The evaluation alternates between layers based on current CPU utilization profiles.

  D.

The view extracts all raw rows into the presentation layer cache before parsing the CASE statement logic.

 

5.

Which of the following scenarios absolutely requires the usage of an AMDP (SQLScript) instead of an ABAP CDS View?

  A.

Exposing a reusable, data-agnostic structure definition to act as a system-wide data domain.

  B.

Performing an inner join between three transactional tables and exposing it directly to a SAP Fiori App.

  C.

Filtering data records based on static input criteria passed via parameter variables.

  D.

Implementing a complex loop or script-based algorithmic logic that requires intermediate temporary script variables and procedural execution paths.

Right answer

CDS views are declarative and do not support procedural structures like loops or mutable intermediate variables, which require SQLScript inside AMDP.

 

6.

In a modern Open SQL statement running on NetWeaver 7.50+, you observe host variables prefixed with the @ symbol. What happens if you omit the @ character before a host variable in a modernized SELECT statement that utilizes comma-separated fields?

  A.

The ABAP compiler generates a syntax error, as strict syntax mode is triggered by the presence of modern features.

That's right!

Using new features like comma-separated lists triggers strict syntax checks where all host variables must be properly escaped using the @ symbol.

  B.

The application server automatically adds escape tags during the Open SQL translation phase.

  C.

The database interprets the unescaped host variable as a native database column name instead.

  D.

The system compiles successfully but falls back to slow row-by-row processing at runtime.

 

7.

An AMDP method returns an internal table containing calculated tax data. How are the data types of the output parameters defined in an AMDP?

  A.

They must be declared using native database catalog procedure types explicitly generated via HANA Studio.

  B.

They must be typed using standard global ABAP Dictionary types or types defined within the public section of an ABAP class/interface.

Right answer

Because AMDP declarations reside inside standard ABAP OO classes, their signatures must be defined using standard ABAP types visible to the class.

  C.

They do not require typing, as AMDP output parameters are implicitly typed at runtime based on the underlying SQL selection.

  D.

They are declared dynamically inside the SQLScript body using native HANA datatypes like NVARCHAR or DECIMAL.

 

8.

When migrating legacy ABAP code to SAP HANA, a developer encounters an explicit database hint in a SELECT query designed for a non-HANA database. What is the recommended practice for handling this hint as part of a Code Pushdown strategy?

  A.

Keep the database hint unchanged, as HANA translates legacy database hints into SQLScript equivalents automatically.

  B.

Remove the database hint entirely and leverage Open SQL or CDS views to let the HANA query optimizer determine the best execution plan.

That's right!

Legacy database hints can conflict with the SAP HANA query optimizer, which manages memory and column indexes differently than traditional databases.

  C.

Wrap the hint inside an AMDP wrapper to force the application to prioritize row-index routing.

  D.

Duplicate the query block using alternative Native SQL statements via ADBC connections.

 

9.

What is the primary difference between a Client-Dependent ABAP CDS View and a Client-Independent view when called within a Code Pushdown environment?

  A.

Client-dependent views completely prevent any pushdown optimization from occurring.

  B.

Client-dependent views can only be called from within AMDP procedures.

  C.

Client-independent views are cached inside application layer memory buffers automatically.

  D.

Client-dependent views handle client filtering implicitly via the ABAP runtime environment adding a mandatory restriction, whereas client-independent views require explicit filtering logic.

That's right!

By default, CDS views handle multi-tenancy automatically by filtering based on the current session client unless annotated with @ClientHandling.type: #INDEPENDENT.

 

10.

You need to evaluate the performance of a newly implemented CDS view sequence that leverages multiple layers of nested associations. Which tool should you use to check the actual execution plan and identify processing bottlenecks on the database?

  A.

Code Inspector (SCCI).

  B.

ABAP Runtime Analysis (SE30 / SAT).

  C.

The Class Builder Exception Monitor.

  D.

SQL Trace (ST05) or the Plan Visualizer in HANA.

That's right!

ST05 captures the underlying SQL statements sent to the database, and the Plan Visualizer illustrates the exact graphical execution strategy used by HANA.

 

1.

A developer wants to intercept and filter data at the database level for an ABAP CDS view based on specific user authorization objects. What is the standard, optimized architectural approach to implement this restriction within the Code Pushdown paradigm?

  A.

Annotate the CDS view with @Security.runAsUser: #CURRENT_USER to implicitly apply user profile buffers.

  B.

Apply a manual WHERE clause to filter by user parameters within the classic Open SQL call.

  C.

Create an Access Control (DCL) artifact using the DEFINE ROLE statement associated with the CDS view.

Right answer

Data Control Language (DCL) allows implicit authorization checks to be pushed down and embedded directly into the database selection path whenever the CDS view is queried.

  D.

Filter the returning rows inside an AMDP wrapper method using the AUTHORITY-CHECK statement.

 

2.

When defining an ABAP CDS view that accepts input parameters, how must these parameters be referenced inside the SELECT statement list or WHERE clause of that view definition?

  A.

They must be prefixed with a colon or accessed via the $parameters projection syntax (e.g., :param_name or $parameters.param_name).

That's right!

CDS view syntax requires a colon prefix or the explicit system projection prefix to distinguish parameters from standard database table column identifiers.

  B.

They must be escaped using the '@' symbol to maintain symmetry with Open SQL structures.

  C.

They must be wrapped in a dynamic SQLScript casting block like CAST_AS_PARAMETER(param_name).

  D.

They are globally bound and can be written directly by name without any prefix characters.

 

3.

An AMDP procedure contains a complex SQLScript block that uses an intermediate tabular variable named 'lt_temp_summary'. Which statement accurately describes how SAP HANA handles this variable during execution?

  A.

It triggers an immediate thread block because SQLScript forbids storing multi-row arrays into localized variables.

  B.

It creates an implicit internal ABAP application server cluster table to mirror data updates.

  C.

It is processed as a highly optimized, compiler-driven in-memory reference that avoids generating physical database temporary tables.

Right answer

HANA's calculation engine treats SQLScript intermediate variables as logical references, often lazy-evaluating or folding them into a single compiled execution plan.

  D.

It forces HANA to write raw row records out to disk storage under the standard global temporary directory path.

 

4.

A team lead notices a CDS view that uses the annotation '@ClientHandling.algorithm: #SESSION_VARIABLE'. What is the functional impact of this setting when the view is translated down to the HANA database layer?

  A.

The database uses the native HANA session variable 'CDS_CLIENT' to perform automatic client filtering at runtime.

That's right!

This setting instructs the engine to leverage global database session variables, removing the need to append hardcoded client joins or literal clauses to every nested view layer.

  B.

The view forces the calling ABAP program to supply a mandatory MANDT parameter value explicitly in the FROM clause.

  C.

The view disables multi-tenancy checking completely, making all returning datasets client-agnostic.

  D.

The calculation engine runs a background batch process to replicate client data partitions into isolated temporary structures.

 

5.

You are reviewing an AMDP method written in SQLScript. A statement reads: lt_data = SELECT * FROM MSEG;. Assuming MSEG is a large transactional table, why might this statement trigger an optimization alert in the ABAP Test Cockpit (ATC)?

  A.

Selecting all columns (SELECT *) from a column-store table bypasses the performance benefits of columnar projection and wastes memory overhead.

That's right!

HANA is a column-oriented database. Selecting every column forces the engine to read and reconstruct every individual column array, negating the efficiency of reading only required fields.

  B.

The statement fails to use a mandatory ABAP internal table cursor bind structure.

  C.

MSEG cannot be accessed inside AMDP containers because it is a legacy cluster table entity.

  D.

SQLScript does not support the wildcard star (*) character under any circumstances.

 

6.

Which of the following describes the behavior of a 'Casted' field transformation expression (e.g., CAST( price AS abap.curr( 15, 2 ) )) inside an ABAP CDS View definition?

  A.

The type casting is deferred and performed line-by-line by the ABAP application server's virtual machine during loop processing.

  B.

It creates a secondary physical duplicate column in the database index to store the newly formatted values.

  C.

The data type translation is compiled down to native database type conversions and executed during database execution.

Right answer

CDS view CAST expressions map directly to corresponding native SQL conversion commands, ensuring the data type shift occurs before the result set is returned to the application server.

  D.

It converts data types purely at the UI layer inside the SAP Fiori theme controller layout.

 

7.

When debugging or tracing an AMDP method execution path, what critical limitation must an L8 architect consider regarding the use of standard traditional ABAP breakpoints set via SE80 or ADT?

  A.

AMDP code configurations can only be debugged by inserting hardcoded system-exit commands into the production source text.

  B.

Standard ABAP breakpoints will only halt execution before or after the AMDP database call; debugging the internal SQLScript logic requires setting specific 'HANA Debugger' breakpoints.

That's right!

Because AMDP code executes directly on the HANA database engine rather than the ABAP App Server VM, you must use database-level breakpoints within specialized tooling (like Eclipse ADT HANA Debuggerperspective) to step through SQLScript lines.

  C.

AMDP execution code blocks completely block all active user debug sessions, causing system-wide freezes.

  D.

Breakpoints set in Eclipse ADT automatically translate down to SQLScript pipelines without requiring extra database authorizations.

 

8.

What happens if an AMDP method attempts to execute a database modification operation (such as an INSERT or UPDATE on a database table) when it was declared with the OPTIONS READ-ONLY addition?

  A.

The modification executes successfully, but the database logs an audit warning entry in the system log.

  B.

A database-level execution exception is thrown, and the subsequent activation or runtime execution fails.

That's right!

The OPTIONS READ-ONLY parameter acts as a strict compiler contract. If the underlying SQLScript attempts an unauthorized write operation, the HANA engine aborts execution.

  C.

The write operation is cached and only committed when a standard ABAP COMMIT WORK statement is reached.

  D.

The application server silently discards the write instruction and continues processing normally.

 

9.

An architect needs to expose data from a hierarchical parent-child relationship table structure via a CDS view. Which advanced CDS feature should be utilized to build a high-performance recursive resolution paths within the database engine?

  A.

The annotation @DataAging.noOptimizationConstraint: true applied to a classic join view configuration.

  B.

Nesting multiple standard CDS views with explicit hardcoded loop counters inside the application layer.

  C.

An AMDP method that extracts all database records into an internal table to run standard ABAP loop recursions.

  D.

CDS Hierarchies (using the DEFINE HIERARCHY statement syntax).

That's right!

Modern ABAP CDS supports native hierarchy semantics, allowing developers to define parent-child relationships that the HANA engine can traverse efficiently using optimized navigation paths.

 

10.

You are reviewing code where a developer has written a standard Open SQL statement using inline data declarations. Inside the query, they call a CDS View: SELECT from zcds_invoice_summary FIELDS invoice_guid, net_amount INTO TABLE @DATA(lt_invoices). What is the underlying data type of the inline-declared variable lt_invoices?

  A.

A loose string array that requires explicit parsing via JSON serialization classes.

  B.

A generic hashed table structure typed using the full semantic definition of the underlying database components.

  C.

A standard internal table whose line type structure matches the specific fields selected in the query (invoice_guid and net_amount).

That's right!

Inline table declarations automatically infer their line types and column schemas based on the projection list specified in the SELECT statement.

  D.

A pointer reference object pointing directly to the global database view catalog buffer.

 

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...