C_ABAPD_2309-Dumps-nuavpu
C_ABAPD_2309-Dumps-nuavpu
CERT EMPIRE
SAP C_ABAPD_2309 Exam Question & Answers
SAP Certified Associate - Back-End Developer - ABAP
Cloud Exam
CERTEMPIRE.COM
Questions and Answers PDF 2/73
Product Questions: 81
Version: 4.2
Question: 1
Answer: D
Explanation:
The function find_any_not_of returns the position of the first character in the string val that is not
contained in the string sub. If no such character is found, the function returns 0. In this case, the
string val contains only the characters A, B, and a, which are all contained in the string sub, so the
function returns 0. The other functions return positive values, as follows:
Count_any_of returns the number of occurrences of any character in the string sub within the string
val. In this case, it returns 8, since there are 8 A’s and B’s in val.
Count returns the number of occurrences of the string sub within the string val. In this case, it returns
2, since there are 2 AB’s in val.
find_any_of returns the position of the first character in the string val that is contained in the string
sub. In this case, it returns 1, since the first character A is in sub. Reference: String Functions - ABAP
Keyword Documentation, Examples of String Functions - ABAP Keyword Documentation
Question: 2
In which products must you use the ABAP Cloud Development Model? Note: There are 2 correct
answers to this question.
Answer: AB
Explanation:
CERTEMPIRE.COM
Questions and Answers PDF 3/73
The ABAP Cloud Development Model is the ABAP development model to build cloud-ready business
apps, services, and extensions. It comes with SAP BTP and SAP S/4HANA. It works with public or
private cloud, and even on-premise1. However, the complete ABAP Cloud Development Model,
including the cloud-optimized ABAP language and public local SAP APIs and extension points, is
available only in SAP BTP ABAP Environment and in the 2208/2022 versions of the SAP S/4HANA
editions1. Therefore, you must use the ABAP Cloud Development Model in SAP BTP, ABAP
environment and SAP S/4HANA Cloud, private edition. You can also use it in SAP S/4HANA on
premise, but it is not mandatory. You cannot use it in SAP S/4HANA Cloud, public edition, because it
does not allow custom ABAP code2. Reference: 1: ABAP Cloud | SAP Blogs 2: SAP S/4HANA Cloud
Extensibility – Overview and Comparison | SAP Blogs
Question: 3
Which RESTful Application Programming object can be used to organize the display of fields in an
app?
Answer: B
Explanation:
A metadata extension is a RESTful Application Programming object that can be used to organize the
display of fields in an app. A metadata extension is a CDS view that annotates another CDS view with
UI annotations, such as labels, icons, or facets. These annotations define how the data should be
presented in the app, such as which fields should be shown on the object page, which fields should
be editable, or which fields should be used for filtering or sorting. A metadata extension can also be
used to add custom actions or validations to the app12. Reference: 1: Refine the Object Page with
Annotations | SAP Tutorials 2: ABAP RAP : Enabling custom actions with a dialog for additional input
fields | SAP Blogs
Question: 4
CERTEMPIRE.COM
Questions and Answers PDF 4/73
When accessing the subclass instance through go_super, what can you do? Note: There are 2 correct
answers to this question.
Answer: AB
Explanation:
When accessing the subclass instance through go_super, you can do both of the following:
Access the inherited private components: A subclass inherits all the private attributes and methods
of its superclass, unless they are explicitly overridden by the subclass. Therefore, you can access the
inherited private components of the superclass through go_super, as long as they are not hidden by
other attributes or methods in the subclass12.
Access the inherited public components: A subclass inherits all the public attributes and methods of
its superclass, unless they are explicitly overridden by the subclass. Therefore, you can access the
inherited public components of the superclass through go_super, as long as they are not hidden by
other attributes or methods in the subclass12.
You cannot do any of the following:
Call a subclass specific public method: A subclass does not have any public methods that are not
inherited from its superclass. Therefore, you cannot call a subclass specific public method through
go_super12.
Call inherited public redefined methods: A subclass does not have any public methods that are
redefined from its superclass. Therefore, you cannot call inherited public redefined methods through
go_super12.
Reference: 1: Object Oriented - ABAP Development - Support Wiki 2: Inheritance and Instantiation -
ABAP Keyword Documentation
Question: 5
Given the following code in an SAP S/4HANA Cloud private edition tenant:
The class zcl_demo_class is in a software component with the language version set to "ABAP Cloud".
The function module ZF1' is in a different software component with the language version set to
CERTEMPIRE.COM
Questions and Answers PDF 5/73
"Standard ABAP". Both the class and function module are customer created.
Regarding line #6, which of the following are valid statements? Note: There are 2 correct answers to
this question.
Answer: AB
Explanation:
The ABAP Cloud Development Model requires that only public SAP APIs and extension points are
used to access SAP functionality and data. These APIs and extension points are released by SAP and
documented in the SAP API Business Hub1. Customer-created function modules are not part of the
public SAP APIs and are not released for cloud development. Therefore, calling a function module
directly from an ABAP Cloud class is not allowed and will result in a syntax error. However, there are
two possible ways to call a function module indirectly from an ABAP Cloud class:
Create a wrapper class or interface for the function module and release it for cloud development. A
wrapper is a class or interface that encapsulates the function module and exposes its functionality
through public methods or attributes. The wrapper must be created in a software component with
the language version set to “Standard ABAP” and must be marked as released for cloud development
using the annotation @EndUserText.label. The wrapper can then be called from an ABAP Cloud class
using the public methods or attributes2.
Use the ABAP Cloud Connector to call the function module as a remote function call (RFC) from an
ABAP Cloud class. The ABAP Cloud Connector is a service that enables the secure and reliable
communication between SAP BTP, ABAP environment and on-premise systems. The function module
must be exposed as an RFC-enabled function module in the on-premise system and must be
registered in the ABAP Cloud Connector. The ABAP Cloud class can then use the class
cl_rfc_destination_service to get the destination name and the class cl_abap_system to create a
proxy object for the function module. The proxy object can then be used to call the function
module3.
Reference: 1: SAP API Business Hub 2: Creating an ABAP Cloud Project | SAP Help Portal 3: Calling
Remote Function Modules | SAP Help Portal
Question: 6
Which restrictions exist for ABAP SQL arithmetic expressions? Note: There are 2 correct answers to
this question.
A. Floating point types and integer types can NOT be used in the same expression.
B. The operator/is allowed only in floating point expressions.
C. Decimal types and integer types can NOT be used in the same expression.
D. The operator is allowed only in floating point expressions.
CERTEMPIRE.COM
Questions and Answers PDF 6/73
Answer: BD
Explanation:
ABAP SQL arithmetic expressions have different restrictions depending on the data type of the
operands. The following are some of the restrictions:
Floating point types and integer types can be used in the same expression, as long as the integer
types are cast to floating point types using the cast function. For example, CAST ( num1 AS FLTP ) /
CAST ( num2 AS FLTP ) is a valid expression, where num1 and num2 are integer types.
The operator / is allowed only in floating point expressions, where both operands have the type FLTP
or f. For example, num1 / num2 is a valid expression, where num1 and num2 are floating point types.
If the operator / is used in an integer expression or a decimal expression, a syntax error occurs.
Decimal types and integer types can be used in the same expression, as long as the expression is a
decimal expression. A decimal expression has at least one operand with the type DEC, CURR, or
QUAN or p with decimal places. For example, num1 + num2 is a valid expression, where num1 is a
decimal type and num2 is an integer type.
The operator ** is allowed only in floating point expressions, where both operands have the type
FLTP or f. For example, num1 ** num2 is a valid expression, where num1 and num2 are floating point
types. If the operator ** is used in an integer expression or a decimal expression, a syntax error
occurs.
Reference: sql_exp - sql_arith - ABAP Keyword Documentation, SQL Expressions, Arithmetic
Calculations - ABAP Keyword Documentation
Question: 7
What are valid statements? Note: There are 2 correct answers to this question.
Answer: AB
Explanation:
Both statements are valid in ABAP, but they have different effects on the program.
##NEEDED is a pragma that can be used to hide warnings from the ABAP compiler syntax check. It
tells the check tools that a variable or a parameter is needed for further processing, even if it is not
used in the current statement. For example, if you declare a variable without assigning any value to
it, you can use ##NEEDED to suppress the warning about unused variables12.
The pragma is not checked by the syntax checker means that you can use any pragma to hide any
warning from the ABAP compiler syntax check, regardless of its effect on the program logic or
performance. For example, if you use ##SHADOW to hide a warning about an obscured function, you
can also use it to hide a warning about an invalid character in a string12.
You cannot do any of the following:
#EC_NEEDED is not checked by the syntax checker: This is not a valid statement in ABAP. There is no
CERTEMPIRE.COM
Questions and Answers PDF 7/73
Question: 8
A. Sorted
B. Hashed
C. Standard
Answer: C
Explanation:
The internal table type that allows both unique and non-unique keys is the standard table. A standard
table has an internal linear index that can be used to access the table entries. The key of a standard
table is always non-unique, which means that the table can contain duplicate entries. However, the
system does not check the uniqueness of the key when inserting new entries, so the programmer
can ensure that the key is unique by using appropriate logic. A standard table can be accessed either
by using the table index or the key, but the response time for key access is proportional to the table
size.
The other two internal table types, sorted and hashed, do not allow non-unique keys. A sorted table
is filled in sorted order according to the defined table key, which must be unique. A sorted table can
be accessed either by using the table index or the key, but the response time for key access is
logarithmically proportional to the table size. A hashed table can only be accessed by using a unique
key, which must be specified when declaring the table. A hashed table has no index, and the
response time for key access is constant, regardless of the table size.
Reference: Internal Tables - ABAP Keyword Documentation, SAP ABAP: Types Of Internal Table
Declaration - dan852.com
Question: 9
CERTEMPIRE.COM
Questions and Answers PDF 8/73
Answer: C
Explanation:
The nested join is evaluated from the top to the bottom in the order of the ON conditions. This
means that the join expression is formed by assigning each ON condition to the directly preceding
JOIN from left to right. The join expression can be parenthesized implicitly or explicitly to show the
order of evaluation. In this case, the implicit parentheses are as follows:
SELECT * FROM (a INNER JOIN (b INNER JOIN c ON b~c = c~c) ON a~b = b~b)
This means that the first join expression is b INNER JOIN c ON b~c = c~c, which joins the columns of
tables b and c based on the condition that b~c equals c~c. The second join expression is a INNER JOIN
(b INNER JOIN c ON b~c = c~c) ON a~b = b~b, which joins the columns of table a and the result of the
first join expression based on the condition that a~b equals b~b. The final result set contains all
combinations of rows from tables a, b, and c that satisfy both join conditions.
Reference: 1: SELECT, FROM JOIN - ABAP Keyword Documentation - SAP Online Help
Question: 10
Which extensibility type does SAP recommend you use to enhance the existing UI for an SAP Fiori
app?
A. Key user
B. Classic
C. Side-by-side
D. Developer
CERTEMPIRE.COM
Questions and Answers PDF 9/73
Answer: D
Explanation:
According to the SAP clean core extensibility and ABAP cloud topic, SAP recommends using
developer extensibility to enhance the existing UI for an SAP Fiori app. Developer extensibility allows
you to use the UI adaptation editor in SAP Web IDE to modify the UI layout, add or remove fields,
and bind them to the data model. You can also use the SAPUI5 framework to create custom controls,
views, and controllers. Developer extensibility is based on the in-app extensibility concept, which
means that the extensions are part of the same application and are deployed together with the app.
Developer extensibility requires developer skills and access to the source code of the app. Reference:
SAP Learning Hub, SAP S/4HANA Cloud Extensibility - In-App Extensibility, SAP Fiori: Extensibility
Question: 11
Image:
In the following ABAP SQL code, what are valid case distinctions? Note: There are 2 correct answers
to this question.
A)
B)
CERTEMPIRE.COM
Questions and Answers PDF 10/73
C)
D)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: AB
Explanation:
Question: 12
What are some features of a unique secondary key? Note: There are 2 correct answers to this
question.
CERTEMPIRE.COM
Questions and Answers PDF 11/73
Answer: CD
Explanation:
A unique secondary key is a type of secondary key that ensures that the key combination of all the
rows in a table is unique. A unique secondary key has two purposes: firstly, to speed up access to the
table, and secondly, to enforce data integrity1.
It is created with the first read access of a table: This is true. A unique secondary key is created when
an internal table is filled for the first time using the statement READ TABLE or a similar
statement. The system assigns a name and an index to each row of the table based on the key
fields23.
It is updated when the modified table is read again: This is false. A unique secondary key does not
need to be updated when the internal table content changes, because it already ensures data
uniqueness. The system uses a lazy update strategy for non-unique secondary keys, which means
that it delays updating them until they are actually accessed23.
You cannot do any of the following:
It is created when a table is filled: This is false. As explained above, a unique secondary key is created
only with the first read access of a table23.
It is updated when the modified table is read again: This is false. As explained above, a unique
secondary key does not need to be updated when the internal table content changes23.
Reference: 1: Improving Internal Table Performance Using Secondary Keys - SAP Learning 2:
[Secondary Key - ABAP Keyword Documentation - SAP Online Help] 3: [Secondary Table Key - ABAP
Keyword Documentation - SAP Online Help]
Question: 13
Which of the following types are permitted to be used for <source> on line #4? Note: There are 2
correct answers to this question.
CERTEMPIRE.COM
Questions and Answers PDF 12/73
Answer: AB
Explanation:
The <source> clause in the CDS View Entity Data Definition can be used to specify the data source for
the view entity. The <source> clause can accept different types of data sources, depending on the
type of the view entity1.
A database table from the ABAP Dictionary: This is a valid type of data source for a CDS View Entity
Data Definition. A database table from the ABAP Dictionary is a table that is defined in the ABAP
Dictionary using the keyword TABLE or TABLE OF. The name of the database table must be unique
within its namespace and must not contain any special characters2.
A CDS DDIC-based view: This is also a valid type of data source for a CDS View Entity Data Definition.
A CDS DDIC-based view is a view that is defined in the Core Data Services using the keyword DEFINE
VIEW ENTITY. The name of the CDS DDIC-based view must be unique within its namespace and must
not contain any special characters3.
You cannot do any of the following:
An external view from the ABAP Dictionary: This is not a valid type of data source for a CDS View
Entity Data Definition. An external view from the ABAP Dictionary is a view that is defined in an
external application using any language supported by SAP, such as SQL, PL/SQL, or Java. The name of
the external view must be unique within its namespace and must not contain any special
characters4.
A database view from the ABAP Dictionary: This is not a valid type of data source for a CDS View
Entity Data Definition. A database view from the ABAP Dictionary is a view that is defined in an
external application using any language supported by SAP, such as SQL, PL/SQL, or Java. The name of
the database view must be unique within its namespace and must not contain any special
characters4.
Reference: 1: CDS DDL - DEFINE VIEW ENTITY - ABAP Keyword Documentation - SAP Online Help 2:
ABAP Dictionary Tables - SAP Online Help 3: CDS DDL - DEFINE VIEW ENTITY - ABAP Keyword
Documentation - SAP Online Help 4: ABAP Dictionary Views - SAP Online Help
Question: 14
When processing a loop with the statement DO... ENDDO, what system variable contains the implicit
loop counter?
A. sy-linno
B. sy-labix
C. sy-subrc
D. sy-index
Answer: D
Explanation:
When processing a loop with the statement DO… ENDDO, the system variable that contains the
implicit loop counter is sy-index. The loop counter is a numeric value that indicates how many times
CERTEMPIRE.COM
Questions and Answers PDF 13/73
the loop has been executed. The loop counter is initialized to 1 before the first execution of the loop
and is incremented by 1 after each execution. The loop counter can be used to control the number of
loop iterations or to access the loop elements by index. The loop counter can also be accessed or
modified within the loop body, but this is not recommended as it may cause unexpected results or
errors1.
For example, the following code snippet uses the loop counter sy-index to display the numbers from
1 to 10:
DO 10 TIMES. WRITE: / sy-index. ENDDO.
The output of this code is:
1 2 3 4 5 6 7 8 9 10
Reference: 1: DO - ABAP Keyword Documentation
Question: 15
Which patterns raise an exception? Note: There are 3 correct answers to this question.
A. DATA: gv_target TYPE p DECIMALS 2. CONSTANTS: go intl TYPE i VALUE 3. gv_target -U EXACT (2
gcojntl).
B. DATA: gv_target TYPE string. □ CONSTANTS: gco_string TYPE LENGTH 16 VALUE
0123456789ABCDEF*. gv_target = EXACT # gco_string+5 (5) ).
C. DATA: gv_target TYPE c LENGTH 5. V □ CONSTANTS: ECO string TYPE string VALUE
0123456789ABCDEF". gv_target - EXACT (gco_string + 5 (6) ).
D. DATA: Ev target TYPE p DECIMALS 3. CONSTANTS: gcojntl TYPE i VALUE 2. Ev_target -U EXACT #2 /
gcojntl ).
E. DATA: gv_target TYPE d. s/ □ CONSTANTS: gco_date TYPE d VALUE '20331233*. gv_target EXACT (
geo_date).
Answer: A, C, E
Explanation:
The patterns that raise an exception are those that use the constructor operator EXACT to perform a
lossless assignment or calculation, but the result cannot be converted to the target data type without
data loss. The following are the explanations for each pattern:
A: This pattern raises the exception CX_SY_CONVERSION_LOST because the result of the calculation
2 * 3 is 6, which cannot be assigned to a packed number with two decimal places without losing the
integer part. The operator -U is used to perform a lossless calculation with the calculation type
decfloat34.
B: This pattern does not raise an exception because the result of the substring expression
gco_string+5(5) is ‘6789A’, which can be assigned to a string without data loss. The operator EXACT #
is used to perform a lossless assignment with the data type of the argument.
C: This pattern raises the exception CX_SY_CONVERSION_LOST because the result of the substring
expression gco_string+5(6) is ‘6789AB’, which cannot be assigned to a character field with length 5
without losing the last character. The operator EXACT is used to perform a lossless assignment with
the data type of the target field.
D: This pattern does not raise an exception because the result of the calculation 2 / 2 is 1, which can
be assigned to a packed number with three decimal places without data loss. The operator -U is used
to perform a lossless calculation with the calculation type decfloat34.
E: This pattern raises the exception CX_SY_CONVERSION_ERROR because the constant gco_date
CERTEMPIRE.COM
Questions and Answers PDF 14/73
contains an invalid value ‘20331233’ for a date data type, which cannot be converted to a valid date.
The operator EXACT is used to perform a lossless assignment with the data type of the target field.
Reference: EXACT - Lossless Operator - ABAP Keyword Documentation, Lossless Assignments - ABAP
Keyword Documentation
Question: 16
A. field1
B. field3
C. field4
D. field2
Answer: C
Explanation:
The field4 is defined incorrectly in the ABAP code snippet. The reason is that the data type c
(character) cannot have a decimal places specification. The decimal places specification is only valid
for the data types p (packed number) and f (floating point number)1. Therefore, the field4 definition
should either omit the decimal places specification or change the data type to p or f.
Reference: 1: Data Types and Data Objects - ABAP Keyword Documentation - SAP Online Help
Question: 17
CERTEMPIRE.COM
Questions and Answers PDF 15/73
The class zcl_demo_class is in a software component with the language version set to "Standard
ABAP". The function module "ZF11 is in a software component with the language version set to
"ABAP Cloud". Both the class and function module are customer created. Regarding line #6, which of
the following is a valid statement?
A. 'ZF1' can be called whether it has been released or not for cloud development.
B. 'ZF1' can be called via a wrapper that itself has been released for cloud development.
C. 'ZF1' can be called via a wrapper that itself has not been released for cloud development.
D. 'ZF1' must be released for cloud development to be called.
Answer: B
Explanation:
The function module ZF1 is in a software component with the language version set to “ABAP Cloud”.
This means that it follows the ABAP Cloud Development Model, which requires the usage of public
SAP APIs and extension points to access SAP functionality and data. These APIs and extension points
are released by SAP and documented in the SAP API Business Hub1. Customer-created function
modules are not part of the public SAP APIs and are not released for cloud development. Therefore,
calling a function module directly from a class with the language version set to “Standard ABAP” is
not allowed and will result in a syntax error. However, there is a possible way to call a function
module indirectly from a class with the language version set to “Standard ABAP”:
Create a wrapper class or interface for the function module and release it for cloud development. A
wrapper is a class or interface that encapsulates the function module and exposes its functionality
through public methods or attributes. The wrapper must be created in a software component with
the language version set to “ABAP Cloud” and must be marked as released for cloud development
using the annotation @EndUserText.label. The wrapper can then be called from a class with the
language version set to “Standard ABAP” using the public methods or attributes2.
For example, the following code snippet shows how to create a wrapper class for the function
module ZF1 and call it from the class zcl_demo_class:
@EndUserText.label: ‘Wrapper for ZF1’ CLASS zcl_wrapper_zf1 DEFINITION PUBLIC FINAL CREATE
PUBLIC. PUBLIC SECTION. CLASS-METHODS: call_zf1 IMPORTING iv_a TYPE i iv_b TYPE i EXPORTING
ev_result TYPE i. ENDCLASS.
CLASS zcl_wrapper_zf1 IMPLEMENTATION. METHOD call_zf1. CALL FUNCTION ‘ZF1’ EXPORTING a =
iv_a b = iv_b IMPORTING result = ev_result. ENDMETHOD. ENDCLASS.
CLASS zcl_demo_class DEFINITION. METHODS: m1. ENDCLASS.
CLASS zcl_demo_class IMPLEMENTATION. METHOD m1. DATA(lv_result) =
CERTEMPIRE.COM
Questions and Answers PDF 16/73
Question: 18
Which of the following are features of Core Data Services? Note: There are 3 correct answers to this
question.
A. Inheritance
B. Associations
C. Annotations
D. Delegation
E. Structured Query Language (SQL)
Answer: BCE
Explanation:
Core Data Services (CDS) is a framework for defining and consuming semantically rich data models in
SAP HANA. CDS supports various features that enhance the capabilities of SQL and enable
developers to create data models that are optimized for performance, readability, and
extensibility12. Some of the features of CDS are:
Associations: Associations are a way of defining relationships between CDS entities, such as tables or
views. Associations enable navigation and path expressions in CDS queries, which allow accessing
data from related entities without explicit joins. Associations also support cardinality, referential
constraints, and cascading options34.
Annotations: Annotations are a way of adding metadata to CDS entities or their elements, such as
fields or parameters. Annotations provide additional information or instructions for the CDS
compiler, the database, or the consumers of the CDS views. Annotations can be used for various
purposes, such as defining access control, UI rendering, OData exposure, or search capabilities5 .
Structured Query Language (SQL): SQL is the standard language for querying and manipulating data
in relational databases. CDS is based on SQL and extends it with additional features and syntax. CDS
supports SQL features such as joins, aggregations, filters, expressions, functions, and subqueries. CDS
also supports SQL Script, which is a scripting language for stored procedures and functions in SAP
HANA .
You cannot do any of the following:
Inheritance: Inheritance is not a feature of CDS. Inheritance is a concept in object-oriented
programming that allows a class to inherit the properties and methods of another class. CDS does
not support object-oriented programming or classes.
Delegation: Delegation is not a feature of CDS. Delegation is a concept in object-oriented
programming that allows an object to delegate some of its responsibilities to another object. CDS
does not support object-oriented programming or objects.
Reference: 1: Core Data Services (CDS) | CAPire 2: Core Data Services [CDS] in SAP S/4 HANA | SAP
Blogs 3: Associations in Core Data Services (CDS) | SAP Help Portal 4: [CDS DDL - Association - ABAP
Keyword Documentation - SAP Online Help] 5: [Annotations in Core Data Services (CDS) | SAP Help
Portal] : [CDS DDL - Annotation - ABAP Keyword Documentation - SAP Online Help] : [Structured
Query Language (SQL) | SAP Help Portal] : [CDS DDL - SQL Features - ABAP Keyword Documentation -
CERTEMPIRE.COM
Questions and Answers PDF 17/73
Question: 19
What is the purpose of a foreign key relationship between two tables in the ABAP Dictionary?
Answer: B
Explanation:
The purpose of a foreign key relationship between two tables in the ABAP Dictionary is to ensure the
integrity of data in the corresponding database tables. A foreign key relationship defines a logical link
between a foreign key table and a check table, where the foreign key fields of the former are
assigned to the primary key fields of the latter. This means that the values entered in the foreign key
fields must exist in the check table, otherwise the system will reject the entry. This way, the foreign
key relationship prevents the insertion of invalid or inconsistent data in the database tables.
A foreign key relationship also serves to document the relationship between the two tables in the
ABAP Dictionary, but this is not its primary purpose. A foreign key relationship does not necessarily
create a corresponding foreign key relationship in the database, as this depends on the database
system and the settings of the ABAP Dictionary. Some database systems do not support foreign keys
at all, while others require additional steps to activate them. Therefore, the foreign key relationship
in the ABAP Dictionary is mainly a logical concept that is enforced by the ABAP runtime environment.
Reference: Foreign Keys (SAP Library - ABAP Dictionary), Foreign Keys (SAP Library - BC - ABAP
Dictionary)
https://help.sap.com/doc/saphelp_snc70/7.0/en-
US/cf/21ea77446011d189700000e8322d00/content.htm
Question: 20
When does SAP recommend to use a sorted or a hashed table respectively? Note: There are 2 correct
answers to this question.
A. A hashed table, when you read a single record and specify the complete key.
B. A hashed table, when you read a subset in a loop and specify a part of the key from the left
without gaps.
C. A sorted table, when you read a subset in a loop and specify a part of the key from the left ^
without gaps.
D. A sorted table, when you read a single record and specify non key fields.
Answer: A, B
Explanation:
Question: 21
CERTEMPIRE.COM
Questions and Answers PDF 18/73
Class super has subclass sub. Which rules are valid for the sub constructor? Note: There are 2 correct
answers to this question.
Answer: AC
Explanation:
The sub constructor is the instance constructor of the subclass sub that inherits from the superclass
super. The sub constructor has some rules that it must follow when it is defined and implemented12.
Some of the valid rules are:
The method signature can be changed: This is true. The sub constructor can have a different method
signature than the super constructor, which means that it can have different input parameters,
output parameters, or exceptions. However, the sub constructor must still call the super constructor
with appropriate actual parameters that match its interface12.
The constructor of super must be called before using any components of your own instance: This is
true. The sub constructor must ensure that the super constructor is called explicitly using super-
>constructor before accessing any instance components of its own class, such as attributes or
methods. This is because the super constructor initializes the inherited components of the subclass
and sets the self-reference me-> to the current instance12.
You cannot do any of the following:
Import parameters can only be evaluated after calling the constructor of super: This is false. The sub
constructor can evaluate its own import parameters before calling the constructor of super, as long
as it does not access any instance components of its own class. For example, the sub constructor can
use its import parameters to calculate some values or check some conditions that are needed for
calling the super constructor12.
Events of your own instance cannot be raised before the registration of a handler in super: This is
false. The sub constructor can raise events of its own instance before calling the constructor of super,
as long as it does not access any instance components of its own class. For example, the sub
constructor can raise an event to notify the consumers of the subclass about some status or error
that occurred during the initialization of the subclass12.
Reference: 1: Inheritance and Constructors - ABAP Keyword Documentation - SAP Online
Help 2: Using Static and Instance constructor methods | SAP Blogs
Question: 22
In an Access Control Object, which clauses are used? Note: There are 3 correct answers to this
question.
CERTEMPIRE.COM
Questions and Answers PDF 19/73
Answer: A, D, E
Explanation:
An Access Control Object (ACO) is a CDS annotation that defines the access control rules for a CDS
view entity. An ACO consists of one or more clauses that specify the role name, the data source, the
access conditions, and the return code of the authority check12. Some of the clauses that are used in
an ACO are:
Where (to specify the access conditions): This clause is used to define the logical expression that
determines whether a user has access to the data source or not. The expression can use the fields of
the data source, the parameters of the CDS view entity, or the predefined variables $user and
$session. The expression can also use the functions check_authorization and check_role to perform
additional authority checks12.
Define role (to specify the role name): This clause is used to assign a name to the role that is defined
by the ACO. The role name must be unique within the namespace of the CDS view entity and must
not contain any special characters. The role name can be used to reference the ACO in other
annotations, such as @AccessControl.authorizationCheck or @AccessControl.grant12.
Revoke (to remove access to the data source): This clause is used to explicitly deny access to the data
source for a user who meets the conditions of the where clause. The revoke clause overrides any
grant clause that might grant access to the same user. The revoke clause can be used to implement
the principle of least privilege or to enforce data segregation12.
You cannot do any of the following:
Grant (to identify the data source): This is not a valid clause in an ACO. The grant clause is a separate
annotation that is used to grant access to a CDS view entity or a data source for a user who has a
specific role. The grant clause can reference an ACO by its role name to apply the access conditions
defined by the ACO12.
Return code (to assign the return code of the authority check): This is not a valid clause in an ACO.
The return code of the authority check is a predefined variable that is set by the system after
performing the access control check. The return code can be used in the where clause of the ACO to
specify different access conditions based on the outcome of the check12.
Reference: 1: Access Control Objects - ABAP Keyword Documentation - SAP Online Help 2: Access
Control in Core Data Services (CDS) | SAP Help Portal
Question: 23
What are some of the reasons that Core Data Services are preferable to the classical approach to data
modeling? Note: There are 2 correct answers to this question.
Answer: A, C
Explanation:
Core Data Services (CDS) are preferable to the classical approach to data modeling for several
reasons, but two of them are:
CERTEMPIRE.COM
Questions and Answers PDF 20/73
They implement code pushdown. Code pushdown is the principle of moving data-intensive logic
from the application server to the database server, where the data resides. This reduces the data
transfer between the application server and the database server, which improves the performance
and scalability of the application. CDS enable code pushdown by allowing the definition of semantic
data models and business logic in the database layer, using SQL and SQL-based expressions1.
They transfer computational results to the application server. CDS allow the application server to
access the data and the logic defined in the database layer by using Open SQL statements. Open SQL
is a standardized and simplified subset of SQL that can be used across different database platforms.
Open SQL statements are translated into native SQL statements by the ABAP runtime environment
and executed on the database server. The results of the computation are then transferred to the
application server, where they can be further processed or displayed2.
Reference: 1: ABAP - Core Data Services (ABAP CDS) - ABAP Keyword Documentation 2: Open SQL -
ABAP Keyword Documentation
Question: 24
Exhibit:
Which of the following statements are correct? Note: There are 2 correct answers to this question.
Answer: A, D
Explanation:
The code snippet in the image is an example of using the FOR statement to create an internal table
with a constructor expression. The FOR statement introduces an iteration expression that runs over
the content of source_itab and assigns each row to the variable row. The variable row is then used to
populate the fields of target_itab12. Some of the correct statements about the code snippet are:
FOR defines a loop that runs over the content of source_itab: This is true. The FOR statement iterates
over the rows of source_itab and assigns each row to the variable row. The iteration expression can
CERTEMPIRE.COM
Questions and Answers PDF 21/73
Question: 25
Which of the following ABAP SQL statements are valid? Note: There are 2 correct answers to this
question.
Answer: AB
Explanation:
The following are the explanations for each ABAP SQL statement:
A: This statement is valid. It selects the fields carrid, airpfrom, and the aggregate functions
MAX(distance) and MIN(distance) from the table /dmo/connection, and groups the results by carrid
and airpfrom. The aggregate functions are aliased as dist_max and dist_min. The results are stored in
an internal table named It_hits, which is created using the inline declaration operator @DATA.
B: This statement is valid. It is similar to statement A, except that it does not specify the GROUP BY
clause. This means that the aggregate functions are applied to the entire table, and the results are
stored in an internal table named It_hits, which is created using the inline declaration operator
@DATA.
C: This statement is invalid. It selects the aggregate functions MAX(distance) and MIN(distance) from
the table /dmo/connection, but it does not specify any grouping or non-aggregate fields. This is not
allowed in ABAP SQL, as the SELECT list must contain at least one non-aggregate field or a GROUP BY
clause. The statement will cause a syntax error.
D: This statement is invalid. It selects the fields carrid and airpfrom from the table /dmo/connection,
and groups the results by carrid and connid. However, the field connid is not included in the SELECT
list, which is not allowed in ABAP SQL, as the GROUP BY clause must contain only fields that are also
in the SELECT list. The statement will cause a syntax error.
CERTEMPIRE.COM
Questions and Answers PDF 22/73
Question: 26
In ABAP SQL, which of the following retrieves the association field_Airline-Name of a CDS view?
A. \_Airline-Name
B. /_Airline Name
C. @_Airline-Name
D. "_Airline Name
Answer: C
Explanation:
In ABAP SQL, the syntax to retrieve the association field of a CDS view is to use the @ sign followed
by the association name and the field name, separated by a period sign (.). For example, to retrieve
the association field _Airline-Name of a CDS view, the syntax is @_Airline.Name. This syntax allows
the access to the fields of the target data source of the association without explicitly joining the data
sources1. The other options are incorrect because they use the wrong symbols or formats to access
the association field.
Reference: 1: Path Expressions - ABAP Keyword Documentation
Question: 27
What are valid statements? Note: There are 2 correct answers to this question.
A. "zcxl" is a dictionary structure, and "paraml" and "param2" are this structure.
B. "paraml11 and "param2" are predefined names.
C. The code creates an exception object and raises an exception.
D. "previous" expects the reference to a previous exception
CERTEMPIRE.COM
Questions and Answers PDF 23/73
Answer: CD
Explanation:
The code snippet in the image is an example of using the RAISE EXCEPTION statement to raise a
class-based exception and create a corresponding exception object. The code snippet also uses the
EXPORTING addition to pass parameters to the instance constructor of the exception class12. Some
of the valid statements about the code snippet are:
The code creates an exception object and raises an exception: This is true. The RAISE EXCEPTION
statement raises the exception linked to the exception class zcxl and generates a corresponding
exception object. The exception object contains the information about the exception, such as the
message, the source position, and the previous exception12.
“previous” expects the reference to a previous exception: This is true. The previous parameter is a
predefined parameter of the instance constructor of the exception class cx_root, which is the root
class of all class-based exceptions. The previous parameter expects the reference to a previous
exception object that was caught during exception handling. The previous parameter can be used to
chain multiple exceptions and preserve the original cause of the exception12.
You cannot do any of the following:
“zcxl” is a dictionary structure, and “paraml” and “param2” are this structure: This is false. zcxl is not
a dictionary structure, but a user-defined exception class that inherits from the predefined exception
class cx_static_check. param1 and param2 are not components of this structure, but input
parameters of the instance constructor of the exception class zcxl. The input parameters can be used
to pass additional information to the exception object, such as the values that caused the
exception12.
“paraml” and “param2” are predefined names: This is false. param1 and param2 are not predefined
names, but user-defined names that can be chosen arbitrarily. However, they must match the names
of the input parameters of the instance constructor of the exception class zcxl. The names of the
input parameters can be declared in the interface of the exception class using the RAISING
addition12.
Reference: 1: RAISE EXCEPTION - ABAP Keyword Documentation - SAP Online Help 2: Class-Based
Exceptions - ABAP Keyword Documentation - SAP Online Help
Question: 28
What RESTful Application Programming object contains only the fields required for a particular app?
A. Database view
B. Metadata extension
C. Projection View
D. Data model view
Answer: C
Explanation:
A projection view is a RESTful Application Programming object that contains only the fields required
for a particular app. A projection view is a CDS view entity that defines a projection on an existing
CDS view entity or CDS DDIC-based view. A projection view exposes a subset of the elements of the
CERTEMPIRE.COM
Questions and Answers PDF 24/73
projected entity, which are relevant for a specific business service. A projection view can also define
aliases, virtual elements, and annotations for the projected elements. A projection view is the top-
most layer of a CDS data model and prepares data for a particular use case. A projection view can
have different provider contracts depending on the type of service it supports, such as transactional
query, analytical query, or transactional interface.
A database view is a CDS DDIC-based view that defines a join or union of database tables. A database
view has an SQL view attached and can be accessed by Open SQL or native SQL. A database view can
be used as a projected entity for a projection view, but it does not contain only the fields required for
a particular app.
A metadata extension is a RESTful Application Programming object that defines additional
annotations for a CDS view entity or a projection view. A metadata extension can be used to enhance
the metadata of a CDS data model without changing the original definition. A metadata extension
does not contain any fields, but only annotations.
A data model view is a CDS view entity that defines a data model based on database tables or other
CDS view entities. A data model view can have associations, aggregations, filters, parameters, and
annotations. A data model view can be used as a projected entity for a projection view, but it does
not contain only the fields required for a particular app.
Reference: CDS Projection Views - ABAP Keyword Documentation, CDS Projection Views in ABAP
CDS: What’s Your Flavor, Business Object Projection - ABAP Keyword Documentation
Question: 29
In a RESTful Application Programming application, in which objects do you bind a CDS view to create
a value help? Note: There are 3 correct answers to this question.
Answer: A, C, E
Explanation:
In a RESTful Application Programming (RAP) application, you can bind a CDS view to create a value
help in the following objects:
Data model view: A data model view is a CDS view that defines the data structure and the
associations of an entity in the RAP application. You can use the annotation
@Consumption.valueHelpDefinition to bind a value help provider CDS view to an element of the
data model view. The value help provider CDS view must contain the key fields of the value help
entity and the fields that are displayed in the value help dialog. The value help annotation specifies
the entity name, the element name, and optionally the additional binding conditions for the value
help provider1.
Metadata Extension: A metadata extension is a CDS view that extends the metadata of another CDS
view without changing its data structure. You can use the annotation
@MetadataExtension.extendView to specify the target CDS view that you want to extend. You can
then use the same annotation @Consumption.valueHelpDefinition to bind a value help provider CDS
view to an element of the target CDS view. The metadata extension allows you to add value help
CERTEMPIRE.COM
Questions and Answers PDF 25/73
Question: 30
What are advantages of using a field symbol for internal table row access? Note: There are answers
to this question.
Answer: B, D
Explanation:
A field symbol is a pointer that allows direct access to a row of an internal table without copying it to
a work area. Using a field symbol for internal table row access has some advantages over using a
work area, such as12:
A MODIFY statement to write changed contents back to the table is not required: This is true. When
you use a work area, you have to copy the row content from the internal table to the work area,
modify it, and then copy it back to the internal table using the MODIFY statement. This can be costly
in terms of performance and memory consumption. When you use a field symbol, you can modify
the row content directly in the internal table without any copying. Therefore, you do not need the
MODIFY statement12.
Using a field symbol is faster than using a work area: This is true. As explained above, using a field
symbol avoids the overhead of copying data between the internal table and the work area. This can
improve the performance of the loop considerably, especially for large internal tables. According to
some benchmarks, using a field symbol can save 25–40% of the runtime compared to using a work
area12.
You cannot do any of the following:
The field symbol can be reused for other programs: This is false. A field symbol is a local variable that
is only visible within the scope of its declaration. It cannot be reused for other programs unless it is
declared globally or passed as a parameter. Moreover, a field symbol must have the same type as the
line type of the internal table that it accesses. Therefore, it cannot be used for any internal table with
CERTEMPIRE.COM
Questions and Answers PDF 26/73
Question: 31
In what order are objects created to generate a RESTful Application Programming application?
A.
Database table 1
B.
Service binding Projection view 4
C.
Service definition 3
D.
Data model view 2
A. D A B C
B. B D C A
C. A D C B
D. C B A B
Answer: C
Explanation:
The order in which objects are created to generate a RESTful Application Programming application is
A, D, C, B. This means that the following steps are followed:
First, a database table is created to store the data for the application. A database table is a CDS DDIC-
based view that defines a join or union of database tables. A database table has an SQL view
attached and can be accessed by Open SQL or native SQL.
Second, a data model view is created to define a data model based on the database table or other
CDS view entities. A data model view is a CDS view entity that can have associations, aggregations,
filters, parameters, and annotations. A data model view can also define the behavior definition and
implementation for the business object.
Third, a service definition is created to define the service interface for the application. A service
definition is a CDS view entity that defines a projection on a data model view or another service
definition. A service definition can also define service metadata, such as service name, version,
description, and annotations.
Fourth, a service binding is created to define the service binding for the application. A service binding
is a CDS view entity that defines a projection on a service definition. A service binding can also define
the service protocol, such as OData V2, OData V4, or REST, and the service URL.
Reference: CDS Data Model Views - ABAP Keyword Documentation, CDS Service Definitions - ABAP
Keyword Documentation, CDS Service Bindings - ABAP Keyword Documentation, CDS Projection
Views - ABAP Keyword Documentation
CERTEMPIRE.COM
Questions and Answers PDF 27/73
Question: 32
A. If the user is authorized for 'CNTRY = 'DE' then the return code is always 0.
B. If the user is NOT authorized for 'CNTRY' = 'DE' OR for 'ACTVT' = '03 then the program will
terminate.
C. If the user is authorized for 'CNTRY = 'DE' AND for 'ACTVT = '03 then the return code is 0.
D. AUTHORITY CHECK verifies whether a user is authorized for/DMO/TRVL" with the listed field
values.
Answer: CD
Explanation:
Question: 33
1.
The data source "spfli" on line #2 is an SAP HANA
database table
2.
"spfli" will be a large table with over one million rows.
3.
This program is the only one in the system that accesses
the table.
4.
This program will run rarely.
Based on this information, which of the following general
settings should you set for the spfli database table? Note:
There are 2 correct answers to this question.
Answer: C, D
CERTEMPIRE.COM
Questions and Answers PDF 28/73
Explanation:
Based on the given information, the spfli database table should have the following general settings:
“Storage Type” to “Row Store”: This setting determines how the data is stored in the SAP HANA
database. Row store is suitable for tables that are accessed by primary key or by a small number of
columns. Column store is suitable for tables that are accessed by a large number of columns or by
complex analytical queries. Since the spfli table is a large table with over one million rows, and this
program is the only one in the system that accesses the table, it is likely that the program will use
primary key access or simple queries to access the table. Therefore, row store is a better choice than
column store for this table12.
“Load Unit” to “Page Loadable”: This setting determines how the data is loaded into the memory
when the table is accessed. Page loadable means that the data is loaded in pages of 16 KB each, and
only the pages that are needed are loaded. Column loadable means that the data is loaded in
columns, and only the columns that are needed are loaded. Since the spfli table is a row store table,
and this program will run rarely, it is more efficient to use page loadable than column loadable for
this table. Page loadable will reduce the memory consumption and the loading time of the table13.
Reference: 1: Table Types in SAP HANA | SAP Help Portal 2: [Row Store vs Column Store in SAP HANA
| SAP Blogs] 3: [Load Unit | SAP Help Portal]
Question: 34
Which of the following actions cause an indirect change to a database table requiring a table
conversion? Note: There are 2 correct answers to this question.
Answer: A, C
Explanation:
CERTEMPIRE.COM
Questions and Answers PDF 29/73
compatibility with the new field length, and any data that exceeds the new length must be truncated
or rejected.
Reference: Converting Database Tables - ABAP Keyword Documentation, Adjustment of Database
Structures - ABAP Keyword Documentation
Question: 35
A. Partitioning attributes
B. Extension
C. Field list
D. Semantic table attributes
Answer: BC
Explanation:
A CDS view is a data definition that defines a data structure and a data selection from one or more
data sources. A CDS view consists of several parts, but two of them are:
Extension: An extension is an optional clause that allows a CDS view to extend another CDS view by
adding new elements, annotations, or associations. The extension clause has the syntax EXTEND
VIEW view_name WITH view_name. The first view_name is the name of the CDS view that is being
extended, and the second view_name is the name of the CDS view that is doing the extension1.
Field list: A field list is a mandatory clause that specifies the elements of the CDS view. The field list
has the syntax SELECT FROM data_source { element_list }. The data_source is the name of the data
source that the CDS view selects data from, and the element_list is a comma-separated list of
elements that the CDS view exposes. The elements can be fields of the data source, expressions,
associations, or annotations2.
The following example shows a CDS view that extends another CDS view and defines a field list:
@AbapCatalog.sqlViewName: ‘ZCDS_EXT’ define view Z_CDS_Extension extend view Z_CDS_Base
with Z_CDS_Extension as select from ztable { // field list key ztable.id as ID, ztable.name as Name,
ztable.age as Age, // extension @Semantics.currencyCode: true ztable.currency as Currency }
The other options are not parts of a CDS view, but rather related concepts:
Partitioning attributes: Partitioning attributes are attributes that are used to partition a table into
smaller subsets of data. Partitioning attributes are defined in the ABAP Dictionary for transparent
tables and can improve the performance and scalability of data access. Partitioning attributes are not
part of the CDS view definition, but rather the underlying table definition3.
Semantic table attributes: Semantic table attributes are attributes that provide additional
information about the meaning and usage of a table. Semantic table attributes are defined in the
ABAP Dictionary for transparent tables and can be used to enhance the data modeling and
consumption of the table. Semantic table attributes are not part of the CDS view definition, but
rather the underlying table definition4.
Reference: 1: Extending CDS Views | SAP Help Portal 2: SELECT List - ABAP Keyword
Documentation 3: Partitioning Attributes - ABAP Keyword Documentation 4: Semantic Table
Attributes - ABAP Keyword Documentation
Question: 36
CERTEMPIRE.COM
Questions and Answers PDF 30/73
What are some properties of database tables? Note: There are 2 correct answers to this question.
Answer: A, D
Explanation:
Database tables are data structures that store information in two dimensions, using rows and
columns. Each row represents a record or an entity, and each column represents an attribute or a
field. Database tables may have key fields, which are columns that uniquely identify each row or a
subset of rows. Key fields can be used to enforce data integrity, perform efficient searches, and
establish relationships to other tables. Database tables can have relationships to other tables, which
are associations or links between the key fields of two or more tables. Relationships can be used to
model the logical connections between different entities, join data from multiple tables, and enforce
referential integrity12.
Reference: 1: Table (database) - Wikipedia 2: Database design basics - Microsoft Support
Question: 37
Which type of legacy code does SAP recommend you eliminate when you review modifications as
part of an SAP S/4HANA system conversion? Note: There are 2 correct answers to this question.
Answer: B, D
Explanation:
SAP recommends that you eliminate the following types of legacy code when you review
modifications as part of an SAP S/4HANA system conversion:
Code that now is identical to a standard SAP object. This type of code is redundant and unnecessary,
as it does not provide any additional functionality or customization. It can also cause conflicts or
errors during the system conversion, as the standard SAP object may have changed or been replaced
in SAP S/4HANA. Therefore, you should delete this type of code and use the standard SAP object
instead.
Code that can be redesigned as a key user extension. This type of code is usually related to UI or
business logic adaptations that can be achieved using the in-app tools provided by SAP S/4HANA. By
redesigning this type of code as a key user extension, you can simplify and standardize your code
base, reduce maintenance efforts, and avoid compatibility issues during the system conversion.
Therefore, you should migrate this type of code to the key user extensibility framework and delete
the original code.
CERTEMPIRE.COM
Questions and Answers PDF 31/73
The other types of legacy code are not recommended to be eliminated, as they may still be relevant
or necessary for your business processes. However, you should still review and adjust them according
to the SAP S/4HANA simplification items and best practices. These types of code are:
Code that supports a critical business process. This type of code is essential for your business
operations and cannot be easily replaced or removed. However, you should check if this type of code
is compatible with SAP S/4HANA, and if not, you should adapt it accordingly. You should also
consider if this type of code can be optimized or enhanced using the new features and capabilities of
SAP S/4HANA.
Code that has less than 10% usage according to usage statistics. This type of code is rarely used and
may not be worth maintaining or converting. However, you should not delete this type of code
without verifying its relevance and impact on your business processes. You should also consider if
this type of code can be replaced or consolidated with other code that has higher usage or better
performance.
Reference: Custom Code Management (CCM) During an SAP S/4HANA Conversion, Custom Code
Migration Guide for SAP S/4HANA 2020
Question: 38
Why would you use Access Controls with CDS Views? Note: There are 2 correct answers to this
question.
A. Only the data corresponding to the user's authorization is transferred from the database to the
application layer.
B. The system field sy-subrc is set, giving you the result of the authorization check
C. You do not have to remember to implement AUTHORITY CHECK statements.
D. All of the data from the data sources is loaded into your application automatically and filtered
there according to the user's authorization.
Answer: A, C
Explanation:
You would use Access Controls with CDS Views for the following reasons:
A) Only the data corresponding to the user’s authorization is transferred from the database to the
application layer. This is true because Access Controls allow you to define CDS roles that specify the
authorization conditions for accessing a CDS view. The CDS roles are evaluated for every user at
runtime and the system automatically adds the restrictions to the selection conditions of the CDS
view. This ensures that only the data that the user is authorized to see is read from the database and
transferred to the application layer. This improves the security and the performance of the data
access1.
C) You do not have to remember to implement AUTHORITY CHECK statements. This is true because
Access Controls provide a declarative and centralized way of defining the authorization logic for a
CDS view. You do not have to write any procedural code or use the AUTHORITY CHECK statement to
check the user’s authorization for each data source or field. The system handles the authorization
check automatically and transparently for you2.
The following reasons are not valid for using Access Controls with CDS Views:
B) The system field sy-subrc is set, giving you the result of the authorization check. This is false
because the system field sy-subrc is not used by Access Controls. The sy-subrc field is used by the
AUTHORITY CHECK statement to indicate the result of the authorization check, but Access Controls
CERTEMPIRE.COM
Questions and Answers PDF 32/73
do not use this statement. Instead, Access Controls use CDS roles to filter the data according to the
user’s authorization2.
D) All of the data from the data sources is loaded into your application automatically and filtered
there according to the user’s authorization. This is false because Access Controls do not load all the
data from the data sources into the application layer. Access Controls filter the data at the database
layer, where the data resides, and only transfer the data that the user is authorized to see to the
application layer. This reduces the data transfer and the memory consumption of the application
layer1.
Reference: 1: Access Controls | SAP Help Portal 2: ABAP CDS - Access Control - ABAP Keyword
Documentation
Question: 39
A. FROM
B. INTO CORRESPONDING FIELDS OF
C. INTO
D. FIELDS
Answer: C
Explanation:
The ABAP SQL clause that allows the use of inline declarations is the INTO clause. The INTO clause is
used to specify the target variable or field symbol where the result of the SQL query is stored. The
INTO clause can use inline declarations to declare the target variable or field symbol at the same
position where it is used, without using a separate DATA or FIELD-SYMBOLS statement. The inline
declaration is performed using the DATA or @DATA operators in the declaration expression12. For
example:
The following code snippet uses the INTO clause with an inline declaration to declare a local variable
itab and store the result of the SELECT query into it:
SELECT * FROM scarr INTO TABLE @DATA (itab).
The following code snippet uses the INTO clause with an inline declaration to declare a field symbol
<fs> and store the result of the SELECT query into it:
SELECT SINGLE * FROM scarr INTO @<fs>.
You cannot do any of the following:
FROM: The FROM clause is used to specify the data source of the SQL query, such as a table, a view,
or a join expression. The FROM clause does not allow the use of inline declarations12.
INTO CORRESPONDING FIELDS OF: The INTO CORRESPONDING FIELDS OF clause is used to specify
the target structure or table where the result of the SQL query is stored. The INTO CORRESPONDING
FIELDS OF clause does not allow the use of inline declarations. The target structure or table must be
declared beforehand using a DATA or FIELD-SYMBOLS statement12.
FIELDS: The FIELDS clause is used to specify the columns or expressions that are selected from the
data source of the SQL query. The FIELDS clause does not allow the use of inline declarations. The
FIELDS clause must be followed by an INTO clause that specifies the target variable or field symbol
where the result is stored12.
Reference: 1: SELECT - ABAP Keyword Documentation - SAP Online Help 2: Inline Declarations - ABAP
Keyword Documentation - SAP Online Help
CERTEMPIRE.COM
Questions and Answers PDF 33/73
Question: 40
In class ZCL_CLASS_A, you use the statement DATA var TYPE ***
What may stand in place of ***? Note: There are 2 correct answers to this question.
Answer: BD
Explanation:
In class ZCL_CLASS_A, you use the statement DATA var TYPE *** to declare a data object named var
with a data type specified by ***. The data type can be any of the following1:
A predefined ABAP type, such as i, f, c, string, xstring, and so on.
A data element from the ABAP Dictionary, such as matnr, carrid, bukrs, and so on. A data element
defines the semantic and technical attributes of a data field, such as the domain, the length, the data
type, the description, and the value range2.
A domain from the ABAP Dictionary, such as matnr_d, carrid_d, bukrs_d, and so on. A domain
defines the technical attributes of a data field, such as the data type, the length, the output length,
the number of decimal places, and the value range3.
A type defined globally in a class, an interface, or a type pool, such as zcl_class_b=>type_a,
zif_interface_c=>type_b, ztype_pool_d=>type_c, and so on. A global type is a type that is defined in
a global repository object and can be used in any program or class4.
A type defined locally in the current class, such as type_a, type_b, type_c, and so on. A local type is a
type that is defined in the declaration part of a class and can only be used within the class5.
Therefore, the possible values for *** are B. the name of a data element from the ABAP Dictionary
and D. the name of a domain from the ABAP Dictionary. The other options are not valid because:
A) The name of a type defined privately in class ZCL_CLASS_A is a local type and cannot be used with
the DATA statement. A local type can only be used with the TYPES statement5.
C) The name of a type defined privately in another class is a private type and cannot be accessed
from outside the class. A private type can only be used within the class that defines it.
Reference: 1: DATA - ABAP Keyword Documentation 2: Data Elements - ABAP Dictionary - SAP Online
Help 3: Domains - ABAP Dictionary - SAP Online Help 4: Global Types - ABAP Keyword
Documentation 5: Local Types - ABAP Keyword Documentation : Private Types - ABAP Keyword
Documentation
Question: 41
Which of the following integration frameworks have been released for ABAP cloud development?
Note: There are 3 correct answers to this question.
A. SOAP consumption
B. CDS Views
C. Business Add-ins (BAdls)
CERTEMPIRE.COM
Questions and Answers PDF 34/73
D. Business Events
E. OData services
Answer: A, D, E
Explanation:
The following are the integration frameworks that have been released for ABAP cloud development:
SOAP consumption: This framework allows you to consume SOAP web services from ABAP cloud
applications. You can use the ABAP Development Tools in Eclipse to create a service consumption
model based on a WSDL file or URL. The service consumption model generates the required ABAP
artifacts, such as proxy classes, data types, and constants, to access the web service. You can then
use the proxy classes to call the web service operations from your ABAP code1
Business Events: This framework allows you to publish and subscribe to business events from ABAP
cloud applications. Business events are messages that represent a change in the state of a business
object or process. You can use the ABAP Development Tools in Eclipse to create a business event
definition based on a CDS view entity or a projection view. The business event definition specifies the
event key, the event payload, and the event metadata. You can then use the ABAP Messaging
Channel (AMC) framework to publish and subscribe to business events using the AMC API2
OData services: This framework allows you to expose and consume OData services from ABAP cloud
applications. OData is a standardized protocol for creating and consuming RESTful APIs. You can use
the ABAP RESTful Application Programming Model (RAP) to create OData services based on CDS view
entities or projection views. The RAP framework generates the required OData metadata and
runtime artifacts, such as service definitions, service bindings, and service implementations. You can
then use the SAP Gateway framework to register and activate your OData services. You can also use
the ABAP Development Tools in Eclipse to consume OData services from other sources using the
service consumption model3
The other integration frameworks are not released for ABAP cloud development, as they are either
not supported or not recommended for cloud scenarios. These frameworks are:
CDS Views: CDS views are not an integration framework, but a data modeling framework. CDS views
are used to define data models based on database tables or other CDS view entities. CDS views can
have associations, aggregations, filters, parameters, and annotations. CDS views can also be used as
the basis for other integration frameworks, such as OData services or business events4
Business Add-ins (BAdls): BAdls are not supported for ABAP cloud development, as they are part of
the classic ABAP enhancement framework. BAdls are used to implement custom logic in predefined
enhancement spots in the standard SAP code. BAdls are not compatible with the cloud strategy and
the clean core paradigm, as they modify the SAP code and can cause upgrade and maintenance
issues. For ABAP cloud development, SAP recommends using the key user extensibility tools or the
side-by-side extensibility approach instead of BAdls.
Reference: Consuming SOAP Services - ABAP Keyword Documentation, Business Events - ABAP
Keyword Documentation, OData Services - ABAP Keyword Documentation, CDS Data Model Views -
ABAP Keyword Documentation, [Business Add-Ins (BAdIs) - ABAP Keyword Documentation]
Question: 42
When processing an internal table with the statement LOOP AT itab... ENDLOOP, what system
variable contains the current row number?
A. sy-index
CERTEMPIRE.COM
Questions and Answers PDF 35/73
B. sy-subrc
C. sy-linno
D. sy-tabix
Answer: D
Explanation:
When processing an internal table with the statement LOOP AT itab… ENDLOOP, the system variable
that contains the current row number is sy-tabix. The sy-tabix variable is a predefined field of the
system structure sy that holds the index or the row number of the current line in an internal table
loop. The sy-tabix variable is initialized with the value 1 for the first loop pass and is incremented by 1
for each subsequent loop pass. The sy-tabix variable can be used to access or modify the current line
of the internal table using the index access12.
Reference: 1: LOOP AT itab - ABAP Keyword Documentation - SAP Online Help 2: System Fields - ABAP
Keyword Documentation - SAP Online Help
Question: 43
For what kind of applications would you consider using on-stack developer extensions? Note: There
are 2 correct answers to this question.
A. Applications that provide APIs for side by side SAP BTP apps
B. Applications that access SAP S/4HANA data using complex SQL
C. Applications that integrate data from several different systems
D. Applications that run separate from SAP S/4HANA
Answer: A, B
Explanation:
On-stack developer extensibility is a type of extensibility that allows you to create development
projects directly on the SAP S/4HANA Cloud technology stack. It gives you the opportunity to develop
cloud-ready and upgrade-stable custom ABAP applications and services inside the SAP S/4HANA
Cloud, public edition system. You can use the ABAP Development Tools in Eclipse to create and
deploy your on-stack extensions. On-stack developer extensibility is suitable for the following kinds
of applications:
Applications that provide APIs for side by side SAP BTP apps. On-stack developer extensibility allows
you to create OData services or RESTful APIs based on CDS view entities or projection views. These
services or APIs can expose SAP S/4HANA data and logic to other applications that run on the SAP
Business Technology Platform (SAP BTP) or other platforms. This way, you can create a loosely
coupled integration between your SAP S/4HANA system and your side by side SAP BTP apps.
Applications that access SAP S/4HANA data using complex SQL. On-stack developer extensibility
allows you to use ABAP SQL to access SAP S/4HANA data using complex queries, such as joins,
aggregations, filters, parameters, and code pushdown techniques. You can also use ABAP SQL to
perform data manipulation operations, such as insert, update, delete, and upsert. This way, you can
create applications that require advanced data processing and analysis on SAP S/4HANA data.
The other kinds of applications are not suitable for on-stack developer extensibility, as they have
different requirements and challenges. These kinds of applications are:
CERTEMPIRE.COM
Questions and Answers PDF 36/73
Applications that integrate data from several different systems. On-stack developer extensibility is
not meant for creating applications that integrate data from multiple sources, such as other SAP
systems, third-party systems, or cloud services. This is because on-stack developer extensibility does
not support remote access or data replication, and it may cause performance or security issues. For
this kind of applications, you should use side by side extensibility, which allows you to create
applications that run on the SAP BTP and communicate with the SAP S/4HANA system via public APIs
or events.
Applications that run separate from SAP S/4HANA. On-stack developer extensibility is not meant for
creating applications that run independently from the SAP S/4HANA system, such as standalone
apps, microservices, or web apps. This is because on-stack developer extensibility requires a tight
coupling with the SAP S/4HANA system, and it may limit the scalability, flexibility, and portability of
the applications. For this kind of applications, you should use side by side extensibility, which allows
you to create applications that run on the SAP BTP and leverage the cloud-native features and
services of the platform.
Reference: Developer Extensibility in SAP S/4HANA Cloud ABAP Environment, SAP S/4HANA
Extensibility – Simplified Guide for Beginners
Question: 44
Using ABAP SQL, which select statement selects the mat field on line #17?
Answer: B
Explanation:
Using ABAP SQL, the select statement that selects the mat field on line #17 is:
SELECT mat FROM demo_sales_cds_so_i_ve…
This statement selects the mat field from the CDS view demo_sales_cds_so_i_ve, which is defined on
line #1. The CDS view demo_sales_cds_so_i_ve is a projection view that projects the fields of the
CDS view demo_sales_cds_so_i, which is defined on line #2. The CDS view demo_sales_cds_so_i is a
CERTEMPIRE.COM
Questions and Answers PDF 37/73
join view that joins the fields of the database table demo_sales_so_i, which is defined on line #3, and
the CDS view demo_sales_cds_material_ve, which is defined on line #4. The CDS view
demo_sales_cds_material_ve is a value help view that provides value help for the material field of
the database table demo_sales_so_i. The mat field is an alias for the material field of the database
table demo_sales_so_i, which is defined on line #91.
The other options are not valid because:
A) SELECT mat FROM Material… is not valid because Material is not a valid data source in the given
code. There is no CDS view or database table named Material.
C) SELECT mat FROM demo_sales_so_i… is not valid because demo_sales_so_i is not a valid data
source in the given code. There is no CDS view named demo_sales_so_i, only a database table. To
access a database table, the keyword TABLE must be used, such as SELECT mat FROM TABLE
demo_sales_so_i…
D) SELECT mat FROM demo sales cds material ve… is not valid because demo sales cds material ve is
not a valid data source in the given code. There is no CDS view or database table named demo sales
cds material ve. The correct name of the CDS view is demo_sales_cds_material_ve, with underscores
instead of spaces.
Reference: 1: Projection Views - ABAP Keyword Documentation
Question: 45
Refer to the Exhibit.
with which predicate condition can you ensure that the CAST will work?
A. IS SUPPLIED
B. IS NOT INITIAL
C. IS INSTANCE OF
D. IS BOUND
Answer: C
Explanation:
The predicate condition that can be used to ensure that the CAST will work is IS INSTANCE OF. The IS
INSTANCE OF predicate condition checks whether the operand is an instance of the specified class or
interface. This is useful when you want to perform a downcast, which is a conversion from a more
general type to a more specific type. A downcast can fail if the operand is not an instance of the
target type, and this can cause a runtime error. Therefore, you can use the IS INSTANCE OF predicate
condition to check whether the downcast is possible before using the CAST operator12. For example:
The following code snippet uses the IS INSTANCE OF predicate condition to check whether the
variable g_super is an instance of the class lcl_super. If it is, the CAST will work and the variable
g_sub1 will be assigned the value of g_super.
CERTEMPIRE.COM
Questions and Answers PDF 38/73
DATA: g_super TYPE REF TO lcl_super, g_sub1 TYPE REF TO lcl_sub1. IF g_super IS INSTANCE OF
lcl_super. g_sub1 = CAST #( g_super ). g_sub1->method( … ). ENDIF.
You cannot do any of the following:
IS SUPPLIED: The IS SUPPLIED predicate condition checks whether an optional parameter of a
method or a function module has been supplied by the caller. This is useful when you want to handle
different cases depending on whether the parameter has a value or not. However, this predicate
condition has nothing to do with the CAST operator or the type of the operand12.
IS NOT INITIAL: The IS NOT INITIAL predicate condition checks whether the operand has a non-initial
value. This is useful when you want to check whether the operand has been assigned a value or
not. However, this predicate condition does not guarantee that the CAST will work, because the
operand may have a value but not be an instance of the target type12.
IS BOUND: The IS BOUND predicate condition checks whether the operand is a bound reference
variable. This is useful when you want to check whether the operand points to an existing object or
not. However, this predicate condition does not guarantee that the CAST will work, because the
operand may point to an object but not be an instance of the target type12.
Reference: 1: Predicate Expressions - ABAP Keyword Documentation - SAP Online Help 2: ABAP -
Predicates | SAP Community
Question: 46
In ABAP SQL, which of the following can be assigned an alias? Note: There are 2 correct answers to
this question.
Answer: BC
Explanation:
In ABAP SQL, an alias is a temporary name that can be assigned to a field or a database table in a
query. An alias can be used to make the query more readable, to avoid name conflicts, or to access
fields or tables with long names. An alias is created with the AS keyword and is only valid for the
duration of the query1.
The following are examples of how to assign an alias to a field or a database table in ABAP SQL:
B) field (from field list): A field is a column of a table or a view that contains data of a certain type. A
field can be assigned an alias in the field list of a SELECT statement, which specifies the fields that are
selected from the data source. For example, the following query assigns the alias name to the field
carrname of the table scarr:
SELECT carrid, carrname AS name FROM scarr.
The alias name can be used instead of carrname in other clauses of the query, such as WHERE,
GROUP BY, ORDER BY, and so on2.
C) database table: A database table is a collection of data that is organized in rows and columns. A
database table can be assigned an alias in the FROM clause of a SELECT statement, which specifies
the data source that is selected from. For example, the following query assigns the alias c to the table
scarr:
SELECT c.carrid, c.carrname FROM scarr AS c.
CERTEMPIRE.COM
Questions and Answers PDF 39/73
The alias c can be used instead of scarr in other clauses of the query, such as WHERE, JOIN, GROUP
BY, ORDER BY, and so on3.
The following are not valid for assigning an alias in ABAP SQL:
A) order criterion (from order by clause): An order criterion is a field or an expression that is used to
sort the result set of a query in ascending or descending order. An order criterion cannot be assigned
an alias in the ORDER BY clause of a SELECT statement, because the alias is not visible in this
clause. The alias can only be used in the clauses that follow the clause where it is defined1.
D) group criterion (from group by clause): A group criterion is a field or an expression that is used to
group the result set of a query into subsets that share the same values. A group criterion cannot be
assigned an alias in the GROUP BY clause of a SELECT statement, because the alias is not visible in
this clause. The alias can only be used in the clauses that follow the clause where it is defined1.
Reference: 1: ALIASES - ABAP Keyword Documentation 2: SELECT List - ABAP Keyword
Documentation 3: FROM Clause - ABAP Keyword Documentation
Question: 47
A. Simple variable
B. Structure
C. Internal Table
Answer: B
Explanation:
Based on the following code, the variable type of connection_full is a structure. A structure is a
complex data type that consists of a group of related data objects, called components, that have their
own data types and names. A structure can be defined using the TYPES statement or based on an
existing structure type, such as a CDS view entity or a CDS DDIC-based view. In this case, the variable
connection_full is declared using the TYPE addition, which means that it has the same structure type
as the CDS view entity /DMO/I_Connection. The CDS view entity /DMO/I_Connection is a data model
view that defines a data model based on the database table /DMO/Connection. The CDS view entity
/DMO/I_Connection has the following components: carrid, connid, airpfrom, airpto, distance, and
fltime. Therefore, the variable connection_full has the same components as the CDS view entity
/DMO/I_Connection, and each component has the same data type and length as the corresponding
field in the database table /DMO/Connection.
Reference: CDS Data Model Views - ABAP Keyword Documentation, DATA - ABAP Keyword
Documentation, Structure Types - ABAP Keyword Documentation
Question: 48
Exhibit
CERTEMPIRE.COM
Questions and Answers PDF 40/73
Which of the following ABAP SQL snippets are syntactically correct ways to provide a value for the
parameter on line #4? Note: There are 2 correct answers to this question
Answer: AB
Explanation:
Question: 49
Which of the following are valid sort operations for internal tables? Note: There are 3 correct
answers to this question.
Answer: A, C, D
CERTEMPIRE.COM
Questions and Answers PDF 41/73
Explanation:
Question: 50
You want to provide a short description of the data definition for developers that will be attached to
the database view
Which of the following annotations would do this if you inserted it on line #27
Answer: D
Explanation:
The annotation that can be used to provide a short description of the data definition for developers
that will be attached to the database view is the @EndUserText.label annotation. This annotation is
used to specify a text label for the data definition that can be displayed in the development tools or
in the documentation. The annotation can be inserted on line #27 in the code snippet provided in the
question12. For example:
The following code snippet uses the @EndUserText.label annotation to provide a short description of
the data definition for the CDS view ZCDS_VIEW:
@AbapCatalog.sqlViewName: ‘ZCDS_VIEW’ @AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true @AccessControl.authorizationCheck: #CHECK @EndUserText.label:
‘CDS view for flight data’ "short description for developers define view ZCDS_VIEW as select from
sflight { key carrid, key connid, key fldate, seatsmax, seatsocc }
You cannot do any of the following:
@UI.headerInfo.description.label: This annotation is used to specify a text label for the description
field of the header information of a UI element. This annotation is not relevant for the data definition
of a database view12.
@UI.badge.title.label: This annotation is used to specify a text label for the title field of a badge UI
element. This annotation is not relevant for the data definition of a database view12.
@EndUserText.quickInfo: This annotation is used to specify a quick information text for the data
definition that can be displayed as a tooltip in the development tools or in the documentation. This
annotation is not the same as a short description or a label for the data definition12.
CERTEMPIRE.COM
Questions and Answers PDF 42/73
Reference: 1: ABAP CDS - SAP Annotations - ABAP Keyword Documentation - SAP Online
Help 2: ABAP CDS - Data Definitions - ABAP Keyword Documentation - SAP Online Help
Question: 51
Which statement can you use to change the contents of a row of data in an internal table?
A. Append table
B. Modify table
C. Insert table
D. Update table
Answer: B
Explanation:
The statement that can be used to change the contents of a row of data in an internal table is
MODIFY table. The MODIFY table statement can be used to change the contents of one or more rows
of an internal table, either by specifying the table index, the table key, or a condition. The MODIFY
table statement can also be used to change the contents of a database table, by specifying the table
name and a work area or an internal table. The MODIFY table statement can use the TRANSPORTING
addition to specify which fields should be changed, and the WHERE addition to specify which rows
should be changed.
The other statements are not suitable for changing the contents of a row of data in an internal table,
as they have different purposes and effects. These statements are:
APPEND table: This statement can be used to add a new row of data to the end of an internal table,
either by specifying a work area or an inline declaration. The APPEND table statement does not
change the existing rows of the internal table, but only increases the number of rows by one.
INSERT table: This statement can be used to insert a new row of data into an internal table, either by
specifying the table index, the table key, or a sorted position. The INSERT table statement does not
change the existing rows of the internal table, but only shifts them to make room for the new row.
The INSERT table statement can also be used to insert a new row of data into a database table, by
specifying the table name and a work area or an inline declaration.
UPDATE table: This statement can be used to update the contents of a database table, by specifying
the table name and a work area or an internal table. The UPDATE table statement can use the SET
addition to specify which fields should be updated, and the WHERE addition to specify which rows
should be updated. The UPDATE table statement does not affect the internal table, but only the
corresponding database table.
Reference: MODIFY table - ABAP Keyword Documentation, APPEND table - ABAP Keyword
Documentation, INSERT table - ABAP Keyword Documentation, UPDATE table - ABAP Keyword
Documentation
Question: 52
As a consultant you are posed the following question from a client who is using SAP S/4HANA Cloud,
public edition and also SAP BTP, ABAP environment.
"We are currently using an SAP Fiori app based on SAP Fiori elements that analyzes open orders. We
have determined that it should be extended via a new button on the UI which will perform an on-
CERTEMPIRE.COM
Questions and Answers PDF 43/73
the-fly calculation and display the result in a quick popup for the enduser. We have been informed by
SAP that all underlying stack layers for the SAP Fiori app have been extensibility enabled."
Based on this which of the following extension types would you recommend to the customer to add
the new button?
Answer: C
Explanation:
Question: 53
Refer to the Exhibit.
The "demo_ods_assoc_spfi data source referenced in line #4 contains a field "connid" which you
would like to expose in the element list.
Which of the following statements would do this if inserted on line #8?
A. demo_ods_assoc_spfli.connid,
B. demo_ods_assoc_spfli-connid/
C. spfli-connid,
D. _spfli.connid/
Answer: A
Explanation:
The statement that can be used to expose the field “connid” of the data source
“demo_ods_assoc_spfli” in the element list is A. demo_ods_assoc_spfli.connid,. This statement uses
the dot notation to access the field “connid” of the data source “demo_ods_assoc_spfli”, which is an
association defined on line #4. The association “demo_ods_assoc_spfli” links the data source
“demo_ods” with the table “spfli” using the field “carrid”. The statement also ends with a comma to
separate it from the next element in the list12.
You cannot do any of the following:
B) demo_ods_assoc_spfli-connid/: This statement uses the wrong syntax to access the field “connid”
of the data source “demo_ods_assoc_spfli”. The dash notation is used to access the components of a
CERTEMPIRE.COM
Questions and Answers PDF 44/73
structure or a table, not the fields of a data source. The statement also ends with a slash, which is not
a valid separator for the element list12.
C) spfli-connid,: This statement uses the wrong data source name to access the field “connid”. The
data source name should be “demo_ods_assoc_spfli”, not “spfli”. The statement also uses the wrong
syntax to access the field “connid”, as explained above12.
D) _spfli.connid/: This statement uses the wrong data source name and the wrong separator to
access the field “connid”. The data source name should be “demo_ods_assoc_spfli”, not “_spfli”. The
statement also ends with a slash, which is not a valid separator for the element list12.
Reference: 1: ABAP CDS - SELECT, select_list - ABAP Keyword Documentation - SAP Online
Help 2: ABAP CDS - SELECT, from - ABAP Keyword Documentation - SAP Online Help
Question: 54
A. SORTED TABLE
B. INDEX TABLE
C. STANDARD TABLE
D. HASHED TABLE
Answer: B
Explanation:
A generic internal table type is a table type that does not define all the attributes of an internal table
in the ABAP Dictionary; it leaves some of these attributes undefined. A table type is generic in the
following cases1:
You have selected Index Table or Not Specified as the access type.
You have not specified a table key or specified an incomplete table key.
You have specified a generic secondary table key.
A generic table type can be used only for typing formal parameters or field symbols. A generic table
type cannot be used for defining data objects or constants2.
Therefore, the correct answer is B. INDEX TABLE, which is a generic table type that does not specify
the access type or the table key. The other options are not generic table types, because:
A) SORTED TABLE is a table type that specifies the access type as sorted and the table key as a unique
or non-unique primary key3.
C) STANDARD TABLE is a table type that specifies the access type as standard and the table key as a
non-unique standard key that consists of all the fields of the table row in the order in which they are
defined4.
D) HASHED TABLE is a table type that specifies the access type as hashed and the table key as a
unique primary key5.
Reference: 1: Generic Table Types - ABAP Dictionary - SAP Online Help 2: Generic ABAP Types - ABAP
Keyword Documentation - SAP Online Help 3: Sorted Tables - ABAP Keyword Documentation - SAP
Online Help 4: Standard Tables - ABAP Keyword Documentation - SAP Online Help 5: Hashed Tables -
ABAP Keyword Documentation - SAP Online Help
Question: 55
CERTEMPIRE.COM
Questions and Answers PDF 45/73
A. Find entity
B. Select entity
C. Get entity
D. Read entity
Answer: C
Explanation:
In RESTful Application Programming, the EML statement that retrieves an object is GET entity. The
GET entity statement is used to read data of an entity instance from the database or the transaction
buffer. The GET entity statement can specify the entity name, the entity key, and the entity elements
to be retrieved. The GET entity statement can also use the IN LOCAL MODE addition to bypass the
access control, authorization control, and feature control checks. The GET entity statement returns a
single entity instance or raises an exception if no instance is found or multiple instances match the
key.
The other EML statements are not used to retrieve an object, but have different purposes and
effects. These statements are:
FIND entity: This statement is used to search for entity instances that match a given condition. The
FIND entity statement can specify the entity name, the entity elements to be returned, and the
condition to be applied. The FIND entity statement can also use the IN LOCAL MODE addition to
bypass the access control, authorization control, and feature control checks. The FIND entity
statement returns a table of entity instances or an empty table if no instances match the condition.
SELECT entity: This statement is used to query data of entity instances from the database or the
transaction buffer. The SELECT entity statement can specify the entity name, the entity elements to
be returned, and the filter, order, and aggregation options to be applied. The SELECT entity statement
can also use the IN LOCAL MODE addition to bypass the access control, authorization control, and
feature control checks. The SELECT entity statement returns a table of entity instances or an empty
table if no instances match the query.
READ entity: This statement is not a valid EML statement, but an ABAP statement. The READ
statement is used to access a single row of an internal table using the table index or the table key.
The READ statement can also use the TRANSPORTING addition to specify which fields should be
returned, and the INTO addition to specify the target variable. The READ statement returns a single
row of the internal table or raises an exception if no row is found or multiple rows match the key.
Reference: GET ENTITY - ABAP Keyword Documentation, FIND ENTITY, ENTITIES - ABAP Keyword
Documentation, SELECT ENTITY, ENTITIES - ABAP Keyword Documentation, READ - ABAP Keyword
Documentation
Question: 56
CERTEMPIRE.COM
Questions and Answers PDF 46/73
Answer: B, C
Explanation:
The data declarations that will always work without truncation or rounding for the assignment
gv_target = gv_source are B and C. This is because the target data type string is a variable-length
character type that can hold any character string, including those of data types c (fixed-length
character) and d (date). The assignment of a character or date value to a string variable will not cause
any loss of information or precision, as the string variable will adjust its length to match the source
value12.
You cannot do any of the following:
A) DATA gv_source TYPE string, to DATA gv_target TYPE c.: This data declaration may cause truncation
for the assignment gv_target = gv_source. This is because the target data type c is a fixed-length
character type that has a predefined length. If the source value of type string is longer than the target
length of type c, the source value will be truncated on the right to fit the target length12.
D) DATA gv_source TYPE p LENGTH 8 DECIMALS 3. to DATA gv_target TYPE p LENGTH 16 DECIMALS 2.:
This data declaration may cause rounding for the assignment gv_target = gv_source. This is because
the target data type p is a packed decimal type that has a predefined length and number of decimal
places. If the source value of type p has more decimal places than the target type p, the source value
will be rounded to the target number of decimal places12.
Reference: 1: ABAP Data Types - ABAP Keyword Documentation - SAP Online Help 2: ABAP
Assignment Rules - ABAP Keyword Documentation - SAP Online Help
Question: 57
To adhere to the most recent ABAP SQL syntax conventions from SAP, on which line must you insert
the "INTO TABLE @gt flights" clause to complete the SQL statement?
A. #15
B. #4
C. #6
D. #8
CERTEMPIRE.COM
Questions and Answers PDF 47/73
Answer: B
Explanation:
To adhere to the most recent ABAP SQL syntax conventions from SAP, you must insert the “INTO
TABLE @gt flights” clause on line #4 to complete the SQL statement. This is because the INTO or
APPENDING clause should be specified immediately after the SELECT clause, according to the ABAP
SQL syntax conventions1. The INTO or APPENDING clause defines the data object to which the results
set of the SELECT statement is assigned. The data object can be an internal table, a work area, or an
inline declaration. In this case, the data object is an internal table named gt_flights, which is created
using the inline declaration operator @DATA. The inline declaration operator allows you to declare
and create a data object in the same statement where it is used, without the need for a separate
DATA statement2.
The other lines are not suitable for inserting the “INTO TABLE @gt flights” clause, as they would
violate the ABAP SQL syntax conventions or cause syntax errors. These lines are:
#6: This line is not suitable for inserting the “INTO TABLE @gt flights” clause, as it would cause a
syntax error. This is because the FROM clause must be specified before the INTO or APPENDING
clause, according to the ABAP SQL syntax conventions1. The FROM clause defines the data sources
from which the data is read, such as database tables, CDS view entities, or CDS DDIC-based views. In
this case, the data source is the database table flights.
#8: This line is not suitable for inserting the “INTO TABLE @gt flights” clause, as it would cause a
syntax error. This is because the ORDER BY clause must be specified after the INTO or APPENDING
clause, according to the ABAP SQL syntax conventions1. The ORDER BY clause defines the sort order
of the results set of the SELECT statement. In this case, the results set is sorted by the fields carrid,
connid, and fltime.
#15: This line is not suitable for inserting the “INTO TABLE @gt flights” clause, as it would violate the
ABAP SQL syntax conventions. This is because the INTO or APPENDING clause should be specified as
close as possible to the SELECT clause, according to the ABAP SQL syntax conventions1. The INTO or
APPENDING clause should not be separated from the SELECT clause by other clauses, such as the
WHERE clause, the GROUP BY clause, the HAVING clause, the UNION clause, or the ORDER BY clause.
This is to improve the readability and maintainability of the ABAP SQL statement.
Reference: SELECT - ABAP Keyword Documentation, Inline Declarations - ABAP Keyword
Documentation
Question: 58
CERTEMPIRE.COM
Questions and Answers PDF 48/73
Answer: D
Explanation:
Question: 59
CERTEMPIRE.COM
Questions and Answers PDF 49/73
You want to define the following CDS view entity with an input parameter:
Define view entity Z_CONVERT With parameters currency : ???
Which of the following can you use to replace "???? Note: There are 2 correct answers to this
question.
Answer: A, C
Explanation:
The possible replacements for “???” in the CDS view entity definition with an input parameter are A.
built-in ABAP type and C. A data element. These are the valid types that can be used to specify the
data type of an input parameter in a CDS view entity. A built-in ABAP type is a predefined elementary
type in the ABAP language, such as abap.char, abap.numc, abap.dec, etc. A data element is a
reusable semantic element in the ABAP Dictionary that defines the technical attributes and the
meaning of a field12. For example:
The following code snippet defines a CDS view entity with an input parameter currency of type
abap.cuky, which is a built-in ABAP type for currency key:
Define view entity Z_CONVERT With parameters currency : abap.cuky as select from … { … }
The following code snippet defines a CDS view entity with an input parameter currency of type
waers, which is a data element for currency key:
Define view entity Z_CONVERT With parameters currency : waers as select from … { … }
You cannot do any of the following:
B) A built-in ABAP Dictionary type: This is not a valid type for an input parameter in a CDS view entity.
A built-in ABAP Dictionary type is a predefined elementary type in the ABAP Dictionary, such as
CHAR, NUMC, DEC, etc. However, these types cannot be used directly in a CDS view entity definition.
Instead, they have to be prefixed with abap. to form a built-in ABAP type, as explained above12.
D) A component of an ABAP Dictionary structure: This is not a valid type for an input parameter in a
CDS view entity. A component of an ABAP Dictionary structure is a field that belongs to a structure
type, which is a complex type that consists of multiple fields. However, an input parameter in a CDS
view entity can only be typed with an elementary type, which is a simple type that has no internal
structure12.
Reference: 1: ABAP CDS - SELECT, parameter_list - ABAP Keyword Documentation - SAP Online Help
2: ABAP Data Types - ABAP Keyword Documentation - SAP Online Help
Question: 60
In the assignment, data (gv_result) = 1/8. what will be the data type of gv_result?
A. OTYPE I
B. TYPE DEFLOAT 16
C. TYPE P DECIMALS 3
D. TYPE P DECIMALS 2
CERTEMPIRE.COM
Questions and Answers PDF 50/73
Answer: B
Explanation:
The data type of gv_result in the assignment data (gv_result) = 1/8 will be TYPE DECFLOAT 16. This is
because the assignment operator (=) in ABAP performs an implicit type conversion from the source
type to the target type, according to the following rules12:
If the target type is specified explicitly, the source value is converted to the target type.
If the target type is not specified explicitly, the source type is used as the target type, unless the
source type is a literal or an expression, in which case the target type is determined by the following
priority order: DECFLOAT34, DECFLOAT16, P, F, I, C, N, X, STRING, XSTRING.
In this case, the target type is not specified explicitly, and the source type is an expression
(1/8). Therefore, the target type is determined by the priority order, and the first matching type is
DECFLOAT16, which is a decimal floating point type with 16 digits of precision12.
Reference: 1: ABAP Assignment Rules - ABAP Keyword Documentation - SAP Online Help 2: ABAP
Data Types - ABAP Keyword Documentation - SAP Online Help
Question: 61
What RESTful Application Programming feature is used to ensure the uniqueness of a semantic key?
A. Validation
B. Action
C. Determination
Answer: C
Explanation:
The RESTful Application Programming feature that is used to ensure the uniqueness of a semantic
key is determination. A determination is a type of behavior implementation that defines a logic that
is executed automatically when certain events occur, such as create, update, delete, or activate. A
determination can be used to calculate or derive values for certain fields, such as semantic keys,
based on other fields or external sources. A determination can also be used to check the uniqueness
of a semantic key by comparing it with the existing values in the database or the transaction buffer. A
determination can use the ABAP SQL or the EML syntax to access and manipulate data. A
determination can be defined using the DETERMINE action clause in the behavior definition of a CDS
view entity or a projection view. A determination can also be annotated with the
@ObjectModel.determination annotation to specify the event, the timing, and the scope of the
determination12
The other RESTful Application Programming features are not used to ensure the uniqueness of a
semantic key, but have different purposes and effects. These features are:
Validation: A validation is a type of behavior implementation that defines a logic that is executed
automatically when certain events occur, such as create, update, delete, or activate. A validation can
be used to check the consistency and correctness of the data, such as mandatory fields, data types,
value ranges, or business rules. A validation can use the ABAP SQL or the EML syntax to access and
manipulate data. A validation can be defined using the VALIDATE action clause in the behavior
definition of a CDS view entity or a projection view. A validation can also be annotated with the
@ObjectModel.validation annotation to specify the event, the timing, and the scope of the
CERTEMPIRE.COM
Questions and Answers PDF 51/73
validation12
Action: An action is a type of behavior implementation that defines a logic that is executed explicitly
by the user or the application. An action can be used to perform a specific business operation, such
as creating, updating, deleting, or activating an entity instance, or triggering a workflow or a
notification. An action can use the ABAP SQL or the EML syntax to access and manipulate data. An
action can be defined using the ACTION clause in the behavior definition of a CDS view entity or a
projection view. An action can also be annotated with the @ObjectModel.action annotation to
specify the name, the description, the parameters, and the visibility of the action12
Reference: Behavior Implementation - ABAP Keyword Documentation, Behavior Definition - ABAP
Keyword Documentation
Question: 62
Which of the following are incomplete ABAP types? Note: There are 2 correct answers to this
question.
A. String
B. T
C. C
D. P
Answer: CD
Explanation:
Incomplete ABAP types are types that do not specify all the attributes of a data type, such as the
length, the number of decimal places, or the value range. Incomplete types can only be used for the
typing of field symbols and formal parameters, not for the definition of data objects or
constants. Incomplete types can be either predefined or user-defined1.
The following are incomplete ABAP types:
C) C is a type for character strings with a generic length. The length of the character string has to be
specified when a data object or a constant is defined with this type. For example, DATA text TYPE c
LENGTH 10 defines a data object named text with a type c and a length of 10 characters2.
D) P is a type for packed numbers with a generic length and a generic number of decimal places. The
length and the number of decimal places of the packed number have to be specified when a data
object or a constant is defined with this type. For example, DATA amount TYPE p LENGTH 8 DECIMALS
2 defines a data object named amount with a type p, a length of 8 bytes, and 2 decimal places3.
The following are not incomplete ABAP types, because they specify all the attributes of a data type:
A) String is a type for variable-length character strings. The length of the character string is
determined at runtime and can vary from 0 to 2,147,483,647 characters. The length does not have to
be specified when a data object or a constant is defined with this type. For example, DATA text TYPE
string defines a data object named text with a type string and a variable length4.
B) T is a type for time values in the format HHMMSS. The length of the time value is fixed at 6
characters and does not have to be specified when a data object or a constant is defined with this
type. For example, DATA time TYPE t defines a data object named time with a type t and a length of 6
characters.
Reference: 1: Generic ABAP Types - ABAP Keyword Documentation 2: C - ABAP Keyword
Documentation 3: P - ABAP Keyword Documentation 4: String - ABAP Keyword Documentation : T -
ABAP Keyword Documentation
CERTEMPIRE.COM
Questions and Answers PDF 52/73
Question: 63
Setting a field to read-only in which object would make the field read-only in all applications of the
RESTful Application Programming model?
A. Service definition
B. Behaviour definition
C. Projection view
D. Metadata extension
Answer: B
Explanation:
The object that can be used to set a field to read-only in all applications of the RESTful Application
Programming model (RAP) is the behaviour definition. The behaviour definition is a CDS artefact that
defines the business logic and the UI behaviour of a business object. A business object is a CDS entity
that represents a business entity or concept, such as a customer, an order, or a product. The
behaviour definition can specify the properties of the fields of a business object, such as whether
they are mandatory, read-only, or transient. These properties are valid for all applications that use
the business object, such as transactional, analytical, or draft-enabled apps12. For example:
The following code snippet defines a behaviour definition for a business object ZI_PB_APPLICATION.
It sets the field APPLICATION to read-only for all applications that use this business object:
define behavior for ZI_PB_APPLICATION { field ( read only ) APPLICATION; … }
You cannot do any of the following:
A) Service definition: A service definition is a CDS artefact that defines the interface and the binding
of a service. A service is a CDS entity that exposes the data and the functionality of one or more
business objects as OData, InA, or SQL services. A service definition can specify the properties of the
fields of a service, such as whether they are filterable, sortable, or aggregatable. However, these
properties are only valid for the specific service that uses the business object, not for all applications
that use the business object12.
C) Projection view: A projection view is a CDS artefact that defines a view on one or more data
sources, such as tables, views, or associations. A projection view can select, rename, or aggregate
the fields of the data sources, but it cannot change the properties of the fields, such as whether they
are read-only or not. The properties of the fields are inherited from the data sources or the
behaviour definitions of the business objects12.
D) Metadata extension: A metadata extension is a CDS artefact that defines additional annotations
for a CDS entity, such as a business object, a service, or a projection view. A metadata extension can
specify the properties of the fields of a CDS entity for UI or analytical purposes, such as whether they
are visible, editable, or hidden. However, these properties are only valid for the specific UI or
analytical application that uses the metadata extension, not for all applications that use the CDS
entity12.
Reference: 1: ABAP CDS - Data Definitions - ABAP Keyword Documentation - SAP Online Help 2: ABAP
CDS - Behavior Definitions - ABAP Keyword Documentation - SAP Online Help
Question: 64
CERTEMPIRE.COM
Questions and Answers PDF 53/73
A) NOT 1
B) OR 3
C) AND 2
A. A B C
B. CAB
C. A C B
D. B A C
Answer: C
Explanation:
The sequence priority when evaluating a logical expression is C. A C B, which means NOT, AND, OR.
This is the order of precedence of the Boolean operators in ABAP, which determines how the system
implicitly parenthesizes all logical expressions that are not closed by explicit parentheses. The
operator with the highest priority is evaluated first, and the operator with the lowest priority is
evaluated last. The order of precedence of the Boolean operators in ABAP is as follows12:
NOT: The NOT operator is a unary operator that negates the logical expression that follows it. It has
the highest priority and is evaluated before any other operator. For example, in the expression NOT a
AND b, the NOT operator is applied to a first, and then the AND operator is applied to the result and
b.
AND: The AND operator is a binary operator that returns true if both logical expressions on its left
and right are true, and false otherwise. It has the second highest priority and is evaluated before the
OR and EQUIV operators. For example, in the expression a AND b OR c, the AND operator is applied
to a and b first, and then the OR operator is applied to the result and c.
OR: The OR operator is a binary operator that returns true if either or both logical expressions on its
left and right are true, and false otherwise. It has the third highest priority and is evaluated after the
NOT and AND operators, but before the EQUIV operator. For example, in the expression a OR b
EQUIV c, the OR operator is applied to a and b first, and then the EQUIV operator is applied to the
result and c.
EQUIV: The EQUIV operator is a binary operator that returns true if both logical expressions on its left
and right have the same truth value, and false otherwise. It has the lowest priority and is evaluated
after all other operators. For example, in the expression a AND b EQUIV c OR d, the EQUIV operator is
applied to a AND b and c last, after the AND and OR operators are applied.
Reference: 1: log_exp - Boolean Operators and Parentheses - ABAP Keyword Documentation - SAP
Online Help 2: Logical Expressions (log_exp) - ABAP Keyword Documentation - SAP Online Help
Question: 65
Which of the following results in faster access to internal tables? Note: There are 3 correct answers
to this question.
A. In a sorted internal table, specifying the primary key partially from the left without gaps.
B. In a sorted internal table, specifying the primary key completely.
C. In a standard internal table, specifying the primary key partially from the left without gaps.
D. In a hashed internal table, specifying the primary key partially from the left without gaps.
E. In a hashed internal table, specifying the primary key completely.
CERTEMPIRE.COM
Questions and Answers PDF 54/73
Answer: B, D, E
Explanation:
The access to internal tables can be optimized by using the appropriate table type and specifying the
table key. The table key is a set of fields that uniquely identifies a row in the table and determines
the sorting order of the table. The table key can be either the primary key or a secondary key. The
primary key is defined by the table type and the table definition, while the secondary key is defined
by the user using the KEY statement1.
The following results in faster access to internal tables:
B) In a sorted internal table, specifying the primary key completely. A sorted internal table is a table
type that maintains a predefined sorting order, which is defined by the primary key in the table
definition. The primary key can be either unique or non-unique. A sorted internal table can be
accessed using the primary key or the table index. The access using the primary key is faster than the
access using the table index, because the system can use a binary search algorithm to find the
row. However, the primary key must be specified completely, meaning that all the fields of the
primary key must be given in the correct order and without gaps2.
D) In a hashed internal table, specifying the primary key partially from the left without gaps. A
hashed internal table is a table type that does not have a predefined sorting order, but uses a hash
algorithm to store and access the rows. The primary key of a hashed internal table must be unique
and cannot be changed. A hashed internal table can only be accessed using the primary key, not the
table index. The access using the primary key is very fast, because the system can directly calculate
the position of the row using the hash algorithm. The primary key can be specified partially from the
left without gaps, meaning that some of the fields of the primary key can be omitted, as long as they
are the rightmost fields and there are no gaps between the specified fields.
E) In a hashed internal table, specifying the primary key completely. A hashed internal table is a table
type that does not have a predefined sorting order, but uses a hash algorithm to store and access the
rows. The primary key of a hashed internal table must be unique and cannot be changed. A hashed
internal table can only be accessed using the primary key, not the table index. The access using the
primary key is very fast, because the system can directly calculate the position of the row using the
hash algorithm. The primary key can be specified completely, meaning that all the fields of the
primary key must be given in the correct order.
The following do not result in faster access to internal tables, because:
A) In a sorted internal table, specifying the primary key partially from the left without gaps. A sorted
internal table is a table type that maintains a predefined sorting order, which is defined by the
primary key in the table definition. The primary key can be either unique or non-unique. A sorted
internal table can be accessed using the primary key or the table index. The access using the primary
key is faster than the access using the table index, because the system can use a binary search
algorithm to find the row. However, the primary key must be specified completely, meaning that all
the fields of the primary key must be given in the correct order and without gaps. If the primary key
is specified partially from the left without gaps, the system cannot use the binary search algorithm
and has to perform a linear search, which is slower2.
C) In a standard internal table, specifying the primary key partially from the left without gaps. A
standard internal table is a table type that does not have a predefined sorting order, but uses a
sequential storage and access of the rows. The primary key of a standard internal table is the
standard key, which consists of all the fields of the table row in the order in which they are defined. A
standard internal table can be accessed using the primary key or the table index. The access using the
primary key is slower than the access using the table index, because the system has to perform a
CERTEMPIRE.COM
Questions and Answers PDF 55/73
linear search to find the row. The primary key can be specified partially from the left without gaps,
but this does not improve the access speed, because the system still has to perform a linear search.
Reference: 1: Internal Tables - Overview - ABAP Keyword Documentation 2: Sorted Tables - ABAP
Keyword Documentation : Hashed Tables - ABAP Keyword Documentation : Standard Tables - ABAP
Keyword Documentation
Question: 66
Exhibit:
What are valid statements? Note: There are 3 correct answers to this question.
Answer: ABE
Explanation:
CERTEMPIRE.COM
Questions and Answers PDF 56/73
can be assigned to a new instance of the class cll using the NEW operator and the class name cll. The
inline declaration operator @DATA is optional in this case, as go_ifl is already declared. The
parentheses after the class name cll can be used to pass parameters to the constructor of the class
cll, if any123
E: This statement is valid. go_ifl may call method m2 with go_ifl->m2(…). This is because go_ifl is a
data object of type REF TO ifl, which is a reference to the interface ifl. The class cll implements the
interface ifl, which means that it inherits all the components of the interface ifl. The class cll also
defines a method m2, which is a public method of the class cll. Therefore, go_ifl can call the method
m2 using the reference variable go_ifl. The method m2 is not defined in the interface ifl, but it is
accessible through the interface ifl, as the interface ifl is implemented by the class cll. The
parentheses after the method name m2 can be used to pass parameters to the method m2, if any123
The other statements are not valid, as they have syntax errors or logical errors. These statements are:
C: This statement is not valid. go_cll may call method ml with go_cll->ifl~ml(). This is because go_cll
is a data object of type REF TO cll, which is a reference to the class cll. The class cll implements the
interface ifl, which means that it inherits all the components of the interface ifl. The interface ifl
defines a method ml, which can be called using the reference variable go_cll. However, the syntax for
calling an interface method using a class reference is go_cll->ml(), not go_cll->ifl~ml(). The interface
component selector ~ is only used when calling an interface method using an interface reference,
such as go_ifl->ifl~ml(). Using the interface component selector ~ with a class reference will cause a
syntax error123
D: This statement is not valid. Instead of go_cll = NEW #() you could use go_ifl = NEW #(…). This is
because go_ifl is a data object of type REF TO ifl, which is a reference to the interface ifl. The
interface ifl cannot be instantiated, as it does not have an implementation. Therefore, go_ifl cannot
be assigned to a new instance of the interface ifl using the NEW operator and the inline declaration
operator @DATA. This will cause a syntax error or a runtime error. To instantiate an interface, you
need to use a class that implements the interface, such as the class cll123
Reference: INTERFACES - ABAP Keyword Documentation, CLASS - ABAP Keyword
Documentation, NEW - ABAP Keyword Documentation
Question: 67
CERTEMPIRE.COM
Questions and Answers PDF 57/73
What are valid statements? Note: There are 3 correct answers to this question
Answer: CDE
Explanation:
CERTEMPIRE.COM
Questions and Answers PDF 58/73
interface ifl defines a method ml, which can be called using the reference variable m0_ifl. The
interface method ml has the name ifl~ml in the class, where ifl is the name of the interface and the
character ~ is the interface component selector12
The other statements are not valid, as they have syntax errors or logical errors. These statements are:
A: This statement is not valid. In class CL1, the interface method is named ifl~ml, not if-ml. This is
because class CL1 implements the interface ifl using the INTERFACES statement in the public section
of the class definition. The interface ifl defines a method ml, which can be called using the class
name or a reference to the class. The interface method ml has the name ifl~ml in the class, where ifl
is the name of the interface and the character ~ is the interface component selector. Using the
character - instead of the character ~ will cause a syntax error12
B: This statement is not valid. Class CL2 does not use the interface, but only has a reference to the
interface. This is because class CL2 has a data member named m0_ifl of type REF TO ifl, which is a
reference to the interface ifl. The interface ifl defines a method ml, which can be called using the
reference variable m0_ifl. However, class CL2 does not implement the interface ifl, nor does it inherit
the interface components. Therefore, class CL2 does not use the interface, but only references the
interface12
Reference: INTERFACES - ABAP Keyword Documentation, CLASS - ABAP Keyword Documentation
Question: 68
What would be the correct expression to change a given string value 'mr joe doe' into 'JOE' in an
ABAP SQL field list?
Answer: C
Explanation:
The correct expression to change a given string value ‘mr joe doe’ into ‘JOE’ in an ABAP SQL field list
is C. SELECT FROM TABLE dbtabl FIELDS Of1, substring(upper(‘mr joe doe’), 4, 3) AS f2_sub_up, f3,…
This expression uses the following SQL functions for strings12:
upper: This function converts all lowercase characters in a string to uppercase. For example,
upper(‘mr joe doe’) returns ‘MR JOE DOE’.
substring: This function returns a substring of a given string starting from a specified position and
with a specified length. For example, substring(‘MR JOE DOE’, 4, 3) returns ‘JOE’.
AS: This keyword assigns an alias or a temporary name to a field or an expression in the field list. For
example, AS f2_sub_up assigns the name f2_sub_up to the expression substring(upper(‘mr joe doe’),
CERTEMPIRE.COM
Questions and Answers PDF 59/73
4, 3).
You cannot do any of the following:
A) SELECT FROM TABLE dbtabl FIELDS Of1, upper(left( ‘mr joe doe’, 6)) AS f2_up_left, f3,…: This
expression uses the wrong SQL function for strings to get the desired result. The left function returns
the leftmost characters of a string with a specified length, ignoring the trailing blanks. For example,
left( ‘mr joe doe’, 6) returns ‘mr joe’. Applying the upper function to this result returns ‘MR JOE’,
which is not the same as ‘JOE’.
B) SELECT FROM TABLE dbtabl FIELDS Of1, left(lower(substring( ‘mr joe doe’, 4, 3)), 3) AS
f2_left_lo_sub, f3,…: This expression uses unnecessary and incorrect SQL functions for strings to get
the desired result. The lower function converts all uppercase characters in a string to lowercase. For
example, lower(substring( ‘mr joe doe’, 4, 3)) returns ‘joe’. Applying the left function to this result
with the same length returns ‘joe’ again, which is not the same as ‘JOE’.
D) SELECT FROM TABLE dbtabl FIELDS Of1, substring(lower(upper( ‘mr joe doe’ ) ), 4, 3) AS
f2_sub_lo_up, f3,…: This expression uses unnecessary and incorrect SQL functions for strings to get
the desired result. The lower function converts all uppercase characters in a string to lowercase, and
the upper function converts all lowercase characters in a string to uppercase. Applying both functions
to the same string cancels out the effect of each other and returns the original string. For example,
lower(upper( ‘mr joe doe’ ) ) returns ‘mr joe doe’. Applying the substring function to this result
returns ‘joe’, which is not the same as ‘JOE’.
Reference: 1: SQL Functions for Strings - ABAP Keyword Documentation - SAP Online Help 2: sql_func
- String Functions - ABAP Keyword Documentation - SAP Online Help
Question: 69
What are some characteristics of secondary keys for internal tables? Note: There are 3 correct
answers to this question.
A. Secondary keys must be chosen explicitly when you actually read from an internal table.
B. Multiple secondary keys are allowed for any kind of internal table.
C. Hashed secondary keys do NOT have to be unique.
D. Sorted secondary keys do NOT have to be unique.
E. Secondary keys can only be created for standard tables.
Answer: A, B, D
Explanation:
Secondary keys are additional keys that can be defined for internal tables to optimize the access to
the table using fields that are not part of the primary key. Secondary keys can be either sorted or
hashed, depending on the table type and the uniqueness of the key. Secondary keys have the
following characteristics1:
A) Secondary keys must be chosen explicitly when you actually read from an internal table. This
means that when you use a READ TABLE or a LOOP AT statement to access an internal table, you have
to specify the secondary key that you want to use with the USING KEY addition. For example, the
following statement reads an internal table itab using a secondary key sec_key:
READ TABLE itab USING KEY sec_key INTO DATA(wa).
If you do not specify the secondary key, the system will use the primary key by default2.
B) Multiple secondary keys are allowed for any kind of internal table. This means that you can define
more than one secondary key for an internal table, regardless of the table type. For example, the
CERTEMPIRE.COM
Questions and Answers PDF 60/73
following statement defines an internal table itab with two secondary keys sec_key_1 and
sec_key_2:
DATA itab TYPE SORTED TABLE OF ty_itab WITH NON-UNIQUE KEY sec_key_1 COMPONENTS field1
field2 sec_key_2 COMPONENTS field3 field4.
You can then choose which secondary key to use when you access the internal table1.
D) Sorted secondary keys do NOT have to be unique. This means that you can define a sorted
secondary key for an internal table that allows duplicate values for the key fields. A sorted secondary
key maintains a predefined sorting order for the internal table, which is defined by the key fields in
the order in which they are specified. For example, the following statement defines a sorted
secondary key sec_key for an internal table itab that sorts the table by field1 in ascending order and
field2 in descending order:
DATA itab TYPE STANDARD TABLE OF ty_itab WITH NON-UNIQUE SORTED KEY sec_key COMPONENTS
field1 ASCENDING field2 DESCENDING.
You can then access the internal table using the sorted secondary key with a binary search algorithm,
which is faster than a linear search3.
The following are not characteristics of secondary keys for internal tables, because:
C) Hashed secondary keys do NOT have to be unique. This is false because hashed secondary keys
must be unique. This means that you can only define a hashed secondary key for an internal table
that does not allow duplicate values for the key fields. A hashed secondary key does not have a
predefined sorting order for the internal table, but uses a hash algorithm to store and access the
table rows. For example, the following statement defines a hashed secondary key sec_key for an
internal table itab that hashes the table by field1 and field2:
DATA itab TYPE STANDARD TABLE OF ty_itab WITH UNIQUE HASHED KEY sec_key COMPONENTS
field1 field2.
You can then access the internal table using the hashed secondary key with a direct access algorithm,
which is very fast.
E) Secondary keys can only be created for standard tables. This is false because secondary keys can
be created for any kind of internal table, such as standard tables, sorted tables, and hashed tables.
However, the type of the secondary key depends on the type of the internal table. For example, a
standard table can have sorted or hashed secondary keys, a sorted table can have sorted secondary
keys, and a hashed table can have hashed secondary keys1.
Reference: 1: Secondary Table Key - ABAP Keyword Documentation 2: READ TABLE - ABAP Keyword
Documentation 3: Sorted Tables - ABAP Keyword Documentation : Hashed Tables - ABAP Keyword
Documentation
Question: 70
What are the effects of this annotation? Note: There are 2 correct answers to this question.
CERTEMPIRE.COM
Questions and Answers PDF 61/73
A. The value of sy-langu will be passed to the CDS view automatically both when you use the -1 CDS
view in ABAP and in another CDS view entity (view on view).
B. You can still override the default value with a value of your own.
C. The value of sy-langu will be passed to the CDS view automatically when you use the CDS view in
ABAP but not when you use it in another view entity
D. It is no longer possible to pass your own value to the parameter.
Answer: A, B
Explanation:
The annotation @Environment.systemField: #LANGUAGE is used to assign the ABAP system field sy-
langu to an input parameter of a CDS view or a CDS table function. This enables the implicit
parameter passing in Open SQL, which means that the value of sy-langu will be automatically passed
to the CDS view without explicitly specifying it in the WHERE clause. This also applies to the CDS
views that use the annotated CDS view as a data source, which means that the value of sy-langu will
be propagated to the nested CDS views (view on view)12. For example:
The following code snippet defines a CDS view ZI_FLIGHT_TEXTS with an input parameter p_langu
that is annotated with @Environment.systemField: #LANGUAGE:
define view ZI_FLIGHT_TEXTS with parameters p_langu : syst_langu @<Environment.systemField:
#LANGUAGE as select from sflight left outer join scarr on sflight.carrid = scarr.carrid left outer join
stext on scarr.carrid = stext.carrid { sflight.carrid, sflight.connid, sflight.fldate, scarr.carrname,
stext.text as carrtext } where stext.langu = :p_langu
The following code snippet shows how to use the CDS view ZI_FLIGHT_TEXTS in ABAP without
specifying the value of p_langu in the WHERE clause. The value of sy-langu will be automatically
passed to the CDS view:
SELECT carrid, connid, fldate, carrname, carrtext FROM zi_flight_texts INTO TABLE @DATA(lt_flights).
The following code snippet shows how to use the CDS view ZI_FLIGHT_TEXTS in another CDS view
ZI_FLIGHT_REPORT. The value of sy-langu will be automatically passed to the nested CDS view
ZI_FLIGHT_TEXTS:
define view ZI_FLIGHT_REPORT with parameters p_langu : syst_langu @<Environment.systemField:
#LANGUAGE as select from zi_flight_texts(p_langu) { carrid, connid, fldate, carrname, carrtext,
count(*) as flight_count } group by carrid, connid, fldate, carrname, carrtext
The annotation @Environment.systemField: #LANGUAGE does not prevent the possibility of
overriding the default value with a value of your own. You can still specify a different value for the
input parameter p_langu in the WHERE clause, either in ABAP or in another CDS view. This will
CERTEMPIRE.COM
Questions and Answers PDF 62/73
override the value of sy-langu and pass the specified value to the CDS view12. For example:
The following code snippet shows how to use the CDS view ZI_FLIGHT_TEXTS in ABAP with a
specified value of p_langu in the WHERE clause. The value ‘E’ will be passed to the CDS view instead
of the value of sy-langu:
SELECT carrid, connid, fldate, carrname, carrtext FROM zi_flight_texts WHERE p_langu = ‘E’ INTO
TABLE @DATA(lt_flights).
The following code snippet shows how to use the CDS view ZI_FLIGHT_TEXTS in another CDS view
ZI_FLIGHT_REPORT with a specified value of p_langu in the WHERE clause. The value ‘E’ will be
passed to the nested CDS view ZI_FLIGHT_TEXTS instead of the value of sy-langu:
define view ZI_FLIGHT_REPORT with parameters p_langu : syst_langu @<Environment.systemField:
#LANGUAGE as select from zi_flight_texts(p_langu) { carrid, connid, fldate, carrname, carrtext,
count(*) as flight_count } where p_langu = ‘E’ group by carrid, connid, fldate, carrname, carrtext
Reference: 1: ABAP CDS - parameter_annot - ABAP Keyword Documentation - SAP Online
Help 2: ABAP CDS - session_variable - ABAP Keyword Documentation - SAP Online Help
Question: 71
In RESTful Application Programming, a business object contains which parts? Note: There are 2
correct answers to this question.
A. CDS view
B. Behavior definition
C. Authentication rules
D. Process definition
Answer: A, B
Explanation:
In RESTful Application Programming, a business object contains two main parts: a CDS view and a
behavior definition1.
A) CDS view: A CDS view is a data definition that defines the structure and the data source of a
business object. A CDS view can consist of one or more entities that are linked by associations or
compositions. An entity is a CDS view element that represents a node or a projection of a business
object. An entity can have various annotations that define the metadata and the semantics of the
business object2.
B) Behavior definition: A behavior definition is a source code artifact that defines the behavior and
the validation rules of a business object. A behavior definition can specify the standard CRUD (create,
read, update, delete) operations, the draft handling, the authorization checks, and the side effects
for a business object. A behavior definition can also define custom actions, validations, and
determinations that implement the business logic of a business object3.
The following are not parts of a business object in RESTful Application Programming, because:
C) Authentication rules: Authentication rules are not part of a business object, but part of a service
binding. A service binding is a configuration artifact that defines how a business object is exposed as
an OData service. A service binding can specify the authentication method, the authorization scope,
the protocol version, and the service options for the OData service4.
D) Process definition: Process definition is not part of a business object, but part of a workflow. A
workflow is a business process that orchestrates the tasks and the events of a business object. A
workflow can be defined using the Workflow Editor in the SAP Business Application Studio or the SAP
CERTEMPIRE.COM
Questions and Answers PDF 63/73
Web IDE. A workflow can use the business object’s APIs to trigger or consume events, execute
actions, or read or update data5.
Reference: 1: Business Object | SAP Help Portal 2: CDS View Entities | SAP Help Portal 3: Behavior
Definition | SAP Help Portal 4: Service Binding | SAP Help Portal 5: Workflow | SAP Help Portal
Question: 72
DRAG DROP
You have a superclass superl and a subclass subl of superl. Each class has an instance constructor and
a static constructor. The first statement of your program creates an instance of subl. In which
sequence will the constructors be executed?
Answer:
Explanation:
CERTEMPIRE.COM
Questions and Answers PDF 64/73
The instance constructor is used to initialize the instance attributes and components of the class. The
instance constructor of the superclass is executed before the instance constructor of the subclass, as
the subclass inherits the instance components of the superclass. The instance constructor of the
subclass must call the instance constructor of the superclass explicitly using super->constructor,
unless the superclass is the root node object12
Instance constructor of subl. This is because the instance constructor is an instance method that is
executed automatically when an instance of the class is created using the statement CREATE OBJECT.
The instance constructor is used to initialize the instance attributes and components of the class. The
instance constructor of the subclass is executed after the instance constructor of the superclass, as
the subclass inherits the instance components of the superclass. The instance constructor of the
subclass must call the instance constructor of the superclass explicitly using super->constructor,
unless the superclass is the root node object12
Reference: Constructors of Classes - ABAP Keyword Documentation, METHODS - constructor - ABAP
Keyword Documentation
Question: 73
In a subclass subl you want to redefine a component of a superclass superl. How do you achieve this?
Note: There are 2 correct answers to this question.
Answer: A, C
Explanation:
CERTEMPIRE.COM
Questions and Answers PDF 65/73
Question: 74
Exhibit:
With Icl_super being superclass for Icl_subl and Icl_sub2 and with methods subl_methl and
sub2_methl being subclass-specific methods of Id_subl or Icl_sub2, respectivel. What will happen
when executing these casts? Note:
There are 2 correct answers to this question
Answer: AD
Explanation:
CERTEMPIRE.COM
Questions and Answers PDF 66/73
general type to a more specific type, while an upcast is a conversion from a more specific type to a
more general type. In this case, the CAST operator is trying to perform a downcast from go_super to
go_sub2, and this is possible, as go_super is pointing to an instance of cl_sub2, which is a subclass of
cl_super. Therefore, the CAST operator will assign the reference of go_super to go_sub2 without
raising an exception. However, the CAST operator will not work for go_subl, as explained in
statement A12
C: This statement is incorrect. go_sub2 = CAST #(go_super) will work. go_sub2->sub2_meth1(…) will
not work. This is because go_sub2 is a data object of type REF TO cl_sub2, which is a reference to the
subclass cl_sub2. go_super is a data object of type REF TO cl_super, which is a reference to the
superclass cl_super. The CAST operator is used to perform a downcast or an upcast of a reference
variable to another reference variable of a compatible type. A downcast is a conversion from a more
general type to a more specific type, while an upcast is a conversion from a more specific type to a
more general type. In this case, the CAST operator is trying to perform a downcast from go_super to
go_sub2, and this is possible, as go_super is pointing to an instance of cl_sub2, which is a subclass of
cl_super. Therefore, the CAST operator will assign the reference of go_super to go_sub2 without
raising an exception. However, the method call go_sub2->sub2_meth1(…) will not work, as
sub2_meth1 is a subclass-specific method of cl_sub2, which is not inherited by cl_super. Therefore,
the method call will raise an exception CX_SY_DYN_CALL_ILLEGAL_METHOD at runtime123
D: This statement is correct. go_subl->subl_meth1(…) will work. This is because go_subl is a data
object of type REF TO cl_subl, which is a reference to the subclass cl_subl. subl_meth1 is a subclass-
specific method of cl_subl, which is not inherited by cl_super. Therefore, the method call go_subl-
>subl_meth1(…) will work, as go_subl is pointing to an instance of cl_subl, which has the method
subl_meth1123
Reference: NEW - ABAP Keyword Documentation, CAST - ABAP Keyword Documentation, Method
Call - ABAP Keyword Documentation
Question: 75
Which of the following string functions are predicate functions? Note: There are 2 correct answers to
this question.
A. find_any_not_of()
B. contains_any_of()
C. count_any_of()
D. matchesQ
Answer: B, D
Explanation:
String functions are expressions that can be used to manipulate character-like data in ABAP. String
functions can be either predicate functions or non-predicate functions. Predicate functions are string
functions that return a truth value (true or false) for a condition of the argument text. Non-predicate
functions are string functions that return a character-like result for an operation on the argument
text1.
The following string functions are predicate functions:
B) contains_any_of(): This function returns true if the argument text contains at least one of the
characters specified in the character set. For example, the following expression returns true, because
the text ‘ABAP’ contains at least one of the characters ‘A’, ‘B’, or ‘C’:
CERTEMPIRE.COM
Questions and Answers PDF 67/73
Question: 76
After you created a database table in the RESTful Application Programming model, what do you
create next?
A. A metadata extension
B. A projection view
C. A data model view
D. A service definition
Answer: B
Explanation:
After you created a database table in the RESTful Application Programming model (RAP), the next
step is to create a projection view on the database table. A projection view is a CDS artefact that
defines a view on one or more data sources, such as tables, views, or associations. A projection view
can select, rename, or aggregate the fields of the data sources, but it cannot change the properties of
the fields, such as whether they are read-only or not. The properties of the fields are inherited from
the data sources or the behaviour definitions of the business objects12. For example:
The following code snippet defines a projection view ZI_AGENCY on the database table
/DMO/AGENCY:
define view ZI_AGENCY as select from /dmo/agency { key agency_id, agency_name, street, city,
region, postal_code, country, phone_number, url }
The projection view is used to expose the data of the database table to the service definition, which
is the next step in the RAP. The service definition is a CDS artefact that defines the interface and the
binding of a service. A service is a CDS entity that exposes the data and the functionality of one or
more business objects as OData, InA, or SQL services. A service definition can specify the properties
of the fields of a service, such as whether they are filterable, sortable, or aggregatable12. For
example:
The following code snippet defines a service definition ZI_AGENCY_SRV that exposes the projection
CERTEMPIRE.COM
Questions and Answers PDF 68/73
Question: 77
CERTEMPIRE.COM
Questions and Answers PDF 69/73
when you attempt to activate the definition, what will be the response?
A. Activation error because the field names of the union do not match
B. Activation error because the field types of the union do not match
C. Activation error because the key fields of the union do not match
D. Activation successful
Answer: A
Explanation:
The response will be an activation error because the field names of the union do not match. This is
because the field names of the union must match in order for the definition to be activated. The
union operator combines the result sets of two or more queries into a single result set. The queries
that are joined by the union operator must have the same number and type of fields, and the fields
must have the same names1. In the given code, the field names of the union do not match, because
the first query has the fields carrname, connid, cityfrom, and cityto, while the second query has the
fields carrname, carrier_id, cityfrom, and cityto. The field connid in the first query does not match
the field carrier_id in the second query. Therefore, the definition cannot be activated.
Reference: 1: UNION - ABAP Keyword Documentation
Question: 78
You have two internal tables itab1 and itab2.What is true for using the expression itab1 =
corresponding #( itab2 )? Note: There are 2 correct answers to this question.
A. Fields with the same name but with different types may be copied from itab2 to itab1.
B. itab1 and itab2 must have at least one field name in common.
C. Fields with the same name and the same type will be copied from itab2 to itab1.
D. itab1 and itab2 must have the same data type.
CERTEMPIRE.COM
Questions and Answers PDF 70/73
Answer: B, C
Explanation:
The expression itab1 = corresponding #( itab2 ) is a constructor expression with the component
operator CORRESPONDING that assigns the contents of the internal table itab2 to the internal table
itab1. The following statements are true for using this expression:
B: itab1 and itab2 must have at least one field name in common. This is because the component
operator CORRESPONDING assigns the identically named columns of itab2 to the identically named
columns of itab1 by default, according to the rules of MOVE-CORRESPONDING for internal tables. If
itab1 and itab2 do not have any field name in common, the expression will not assign any value to
itab1 and it will remain initial or unchanged1
C: Fields with the same name and the same type will be copied from itab2 to itab1. This is because
the component operator CORRESPONDING assigns the identically named columns of itab2 to the
identically named columns of itab1 by default, according to the rules of MOVE-CORRESPONDING for
internal tables. If the columns have the same name but different types, the assignment will try to
perform a conversion between the types, which may result in a loss of precision, a truncation, or a
runtime error, depending on the types involved1
The following statements are false for using this expression:
A: Fields with the same name but with different types may be copied from itab2 to itab1. This is not
true, as explained in statement C. The assignment will try to perform a conversion between the
types, which may result in a loss of precision, a truncation, or a runtime error, depending on the
types involved1
D: itab1 and itab2 must have the same data type. This is not true, as the component operator
CORRESPONDING can assign the contents of an internal table of one type to another internal table of
a different type, as long as they have at least one field name in common. The target type of the
expression is determined by the left-hand side of the assignment, which is itab1 in this case. The
expression will create an internal table of the same type as itab1 and assign it to itab11
Reference: CORRESPONDING - Component Operator - ABAP Keyword Documentation
Question: 79
Given the following Core Data Service View Entity Data Definition:
1 @AccessControl.authorizationCheck: #NOT_REQUIRED
2 DEFINE VIEW ENTITY demo_flight_info_join
3 AS SELECT
4 FROM scarr AS a
5 LEFT OUTER JOIN scounter AS c
6 LEFT OUTER JOIN sairport AS p
7 ON p.id = c.airport
8 ON a.carrid = c.carrid
9 {
10 a.carrid AS carrier_id,
11 p.id AS airport_id,
12 c.countnum AS counter_number
13 }
CERTEMPIRE.COM
Questions and Answers PDF 71/73
A. scarr will be joined with scounter first and the result will be joined with sairport.
B. sairport will be joined to scounter first and the result will be joined with scarr.
C. scarr will be joined with sairport first and the result will be joined with scounter.
D. scounter will be joined to sairport first and the result will be joined with scarr.
Answer: A
Explanation:
Question: 80
Answer: A
Explanation:
Use public SAP APIs and SAP extension points. This rule ensures that the ABAP Cloud code is stable,
reliable, and compatible with the SAP solutions and the cloud operations. Public SAP APIs and SAP
extension points are the only allowed interfaces and objects to access the SAP platform and the SAP
applications. They are documented, tested, and supported by SAP. They also guarantee the lifecycle
CERTEMPIRE.COM
Questions and Answers PDF 72/73
Question: 81
A. The tested unit will automatically be appended to a default ABAP Test Cockpit Variant.
B. The tested unit cannot be transported.
C. The test will be aborted.
D. There will be a message in the test log.
Answer: D
Explanation:
CERTEMPIRE.COM
Questions and Answers PDF 73/73
CERTEMPIRE.COM