What are valid statements? Note: There are 3 correct answers to this question
In class CL1, the interface method is named if-ml.
Class CL2 uses the interface.
Class CL1 uses the interface.
In class CL2, the interface method is named ifl-ml.
Class CL1 implements the interface.
The following are the explanations for each statement:
The other statements are not valid, as they have syntax errors or logical errors. These statements are:
References: INTERFACES - ABAP Keyword Documentation, CLASS - ABAP Keyword Documentation
What is the sequence priority when evaluating a logical expression?
NOT 1
OR 3
AND 2
A B C
CAB
A C B
B A C
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:
References: 1: log_exp - Boolean Operators and Parentheses - ABAP Keyword Documentation - SAP Online Help 2: Logical Expressions (log_exp) - ABAP Keyword Documentation - SAP Online Help
In ABAP SQL, which of the following retrieves the association field_Airline-Name of a CDS view?
\_Airline-Name
/_Airline Name
@_Airline-Name
"_Airline Name
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.
References: 1: Path Expressions - ABAP Keyword Documentation
Which ABAP SQL clause allows the use of inline declarations?
FROM
INTO CORRESPONDING FIELDS OF
INTO
FIELDS
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:
SELECT * FROM scarr INTO TABLE @DATA (itab).
SELECT SINGLE * FROM scarr INTO @
You cannot do any of the following:
References: 1: SELECT - ABAP Keyword Documentation - SAP Online Help 2: Inline Declarations - ABAP Keyword Documentation - SAP Online Help
For the assignment, gv_target = gv_source.
which of the following data declarations will always work without truncation or rounding? Note: There
are 2 correct answers to this question.
DATA gv_source TYPE string, to DATA gv_target TYPE c.
DATA gv_source TYPE c. to DATA gv_target TYPE string.
DATA gv_source TYPE d. to DATA gv_target TYPE string.
DATA gv_source TYPE p LENGTH 8 DECIMALS 3. to DATA gv_target TYPE p LENGTH 16 DECIMALS 2.
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:
References: 1: ABAP Data Types - ABAP Keyword Documentation - SAP Online Help 2: ABAP Assignment Rules - ABAP Keyword Documentation - SAP Online Help
Which of the following ON conditions must you insert in place of "???"?
ON Z_Sourcel.camer_id = 7_Source2 carrier_id
ON Sprojection Camer=Source2 carrier_id
ON Sprojection. Carrier Source2.carrier
ON Sprojection.carrier_id=Z_Source2.carrier_id
The correct ON condition that must be inserted in place of “???” is:
ON Sprojection.carrier_id=Z_Source2.carrier_id
This ON condition specifies the join condition between the CDS view Sprojection and the database table Z_Source2. The join condition is based on the field carrier_id, which is the primary key of both the CDS view and the database table. The ON condition ensures that only the records that have the same value for the carrier_id field are joined together1.
The other options are not valid ON conditions, because:
References: 1: ON Condition - ABAP Keyword Documentation
In which products must you use the ABAP Cloud Development Model? Note: There are 2 correct answers to this question.
SAP S/4HANA Cloud, private edition
SAP BTP, ABAP environment
SAP S/4HANA on premise
SAP S/4HANA Cloud, public edition
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. References: 1: ABAP Cloud | SAP Blogs 2: SAP S/4HANA Cloud Extensibility – Overview and Comparison | SAP Blogs
Which of the following are parts of answers to this question.
Partitioning attributes
Extension
Field list
Semantic table attributes
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:
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:
References: 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
Which of the following results in faster access to internal tables? Note: There are 3 correct answers to this question.
In a sorted internal table, specifying the primary key partially from the left without gaps.
In a sorted internal table, specifying the primary key completely.
In a standard internal table, specifying the primary key partially from the left without gaps.
In a hashed internal table, specifying the primary key partially from the left without gaps.
In a hashed internal table, specifying the primary key completely.
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:
The following do not result in faster access to internal tables, because:
References: 1: Internal Tables - Overview - ABAP Keyword Documentation 2: Sorted Tables - ABAP Keyword Documentation : Hashed Tables - ABAP Keyword Documentation : Standard Tables - ABAP Keyword Documentation
Which of the following are features of Core Data Services? Note: There are 3 correct answers to this question.
Inheritance
Associations
Annotations
Delegation
Structured Query Language (SQL)
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:
You cannot do any of the following:
References: 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 - SAP Online Help] : [Object-Oriented Programming in ABAP | SAP Help Portal]
When accessing the subclass instance through go_super, what can you do? Note: There are 2 correct answers to this question.
Access the inherited private components.
Access the inherited public components.
Call a subclass specific public method
Call inherited public redefined methods.
When accessing the subclass instance through go_super, you can do both of the following:
You cannot do any of the following:
References: 1: Object Oriented - ABAP Development - Support Wiki 2: Inheritance and Instantiation - ABAP Keyword Documentation
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.
You add the clause REDEFINITION to the component in subl.
You implement the redefined component for a second time in superl.
You implement the redefined component in subl.
You add the clause REDEFINITION to the component in superl.
To redefine a component of a superclass in a subclass, you need to do the following12:
You cannot do any of the following:
References: 1: METHODS - REDEFINITION - ABAP Keyword Documentation - SAP Online Help 2: Redefining Methods - ABAP Keyword Documentation - SAP Online Help
Which of the following are ABAP Cloud Development Model rules?
Note: There are 2 correct answers to this question.
Use public SAP APIs and SAP extension points.
Build ABAP RESTful application programming model-based services.
Reverse modifications when a suitable public SAP API becomes available.
Build ABAP reports with either ABAP List Viewer (ALV) or SAP Fiori.
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 "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.
ZF1' can be called only if it is released for cloud development.
'ZF1' can be called if a wrapper is created for it and the wrapper itself is released for cloud development.
"ZF1" can be called whether it is released or not for cloud development
ZF1" can be called if a wrapper is created for it but the wrapper itself is not released for cloud development.
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:
References: 1: SAP API Business Hub 2: Creating an ABAP Cloud Project | SAP Help Portal 3: Calling Remote Function Modules | SAP Help Portal
In what order are objects created to generate a RESTful Application Programming application?
Database table 1
Service binding Projection view 4
Service definition 3
Data model view 2
D A B C
B D C A
A D C B
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:
References: 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
Which of the following ABAP SQL statements are valid? Note: There are 2 correct answers to this question.
SELECT FROM /dmo/connection FIELDS carrid O airpfrom,
MAX(distance) AS dist_max, MIN( distance) AS dist_min GROUP BY carrid, airpfrom INTO TABLE @DATA(It_hits)
SELECT FROM /dmo/connection FIELDS \/ O carrid, airpfrom,
MAX( distance) AS dist_max, MIN(distance) AS dist_min INTO TABLE @DATA(It_hits)
SELECT FROM /dmo/connection FIELDS V D MAX(distance) AS dist_max
MIN(distance) AS dist_min INTO TABLE @DATA(It_hits).
SELECT FROM /dmo/connection FIELDS r—i carrid, airpfrom u GROUP BY carrid, connid
INTO TABLE @DATA(It_hits).
The following are the explanations for each ABAP SQL statement:
References: SELECT - ABAP Keyword Documentation, GROUP BY - ABAP Keyword Documentation
/DMO/I_Connection is a CDS view.
What variable type is connection full based on the following code? DATA connection full TYPE
/DMD/I_Connection.
Simple variable
Structure
Internal Table
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.
References: CDS Data Model Views - ABAP Keyword Documentation, DATA - ABAP Keyword Documentation, Structure Types - ABAP Keyword Documentation
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-
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?
RAP BO Behavior Extension
SAP HANA database table extension
RAP BO Node Extension
Business Service Extension
What are the effects of this annotation? Note: There are 2 correct answers to this question.
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).
You can still override the default value with a value of your own.
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
It is no longer possible to pass your own value to the parameter.
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:
define view ZI_FLIGHT_TEXTS with parameters p_langu : syst_langu @ SELECT carrid, connid, fldate, carrname, carrtext FROM zi_flight_texts INTO TABLE @DATA(lt_flights). define view ZI_FLIGHT_REPORT with parameters p_langu : syst_langu @ 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 override the value of sy-langu and pass the specified value to the CDS view12. For example: SELECT carrid, connid, fldate, carrname, carrtext FROM zi_flight_texts WHERE p_langu = ‘E’ INTO TABLE @DATA(lt_flights). define view ZI_FLIGHT_REPORT with parameters p_langu : syst_langu @ References: 1: ABAP CDS - parameter_annot - ABAP Keyword Documentation - SAP Online Help 2: ABAP CDS - session_variable - ABAP Keyword Documentation - SAP Online Help
Which of the following types are permitted to be used for
A database table from the ABAP Dictionary
A CDS DDIC-based view
An external view from the ABAP Dictionary
A database view from the ABAP Dictionary
The
You cannot do any of the following:
References: 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
Which of the following are valid sort operations for internal tables? Note: There are 3 correct answers to this question.
Sort a standard table using
SORT itab ASCENDING.
Sort a sorted table using
SORT itab BY fieldl ASCENDING field2 DESCENDING.
Sort a standard table using
SORT itab BY field1 field2.
Sort a standard table using
SORT itab.
Sort a sorted table using
SORT itab DESCENDING.
Exhibit:
What are valid statements? Note: There are 3 correct answers to this question.
go_if 1 may call method ml with go_ift->ml().
Instead of go ell = NEW #(...) you could use go ifl = NEW cll(. ... ).
go_cll may call method ml with go_dl->ifl-ml().
Instead of go_cll = NEW #() you could use go_iff - NEW #(...).
go_ifl may call method m2 with go if->m2(...).
The following are the explanations for each statement:
The other statements are not valid, as they have syntax errors or logical errors. These statements are:
References: INTERFACES - ABAP Keyword Documentation, CLASS - ABAP Keyword Documentation, NEW - ABAP Keyword Documentation
When processing a loop with the statement DO... ENDDO, what system variable contains the implicit loop counter?
sy-linno
sy-labix
sy-subrc
sy-index
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 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
References: 1: DO - ABAP Keyword Documentation
What is the purpose of a foreign key relationship between two tables in the ABAP Dictionary?
To document the relationship between the two tables
To ensure the integrity of data in the corresponding database tables
To create a corresponding foreign key relationship in the database
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.
References: 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