BTP 2 - Short
BTP 2 - Short
Attempt 1
All questions
Question 1: Correct
How is 'Encapsulation' achieved In ABAP OO? Please choose the correct answer.
• By bundling data with the methods that operate on that data (Correct)
• By declaring all methods and attributes as public
• By implementing all methods in a single class
• By using global classes only
Explanation
‘Encapsulation’ in ABAP OO (Object-Oriented) is achieved by bundling data with the
methods that operate on that data.
Encapsulation is a protective cover that prevents the code and data from being
randomly accessed by other code defined outside the wrapper. Access to the code and
data inside the wrapper is tightly controlled through a well-defined interface.
Question 2: Correct
In ABAP for SAP HANA What is the purpose of 'Client-Side Caching'?
Question 4: Correct
Using ABAP CDS views Which of the following are benefits of? There are 3 correct
answers to this question.
• Enhanced performance with code pushdown (Correct)
• Direct access to database tables
• Automatic generation of OData services
• Rich data modeling capabilities (Correct)
• Integrated authorization checks (Correct)
Explanation
The benefits of using ABAP CDS views include:
Integrated Authorization Checks: ABAP CDS views can include authorization checks,
ensuring that only authorized users can access the data.
Rich Data Modeling Capabilities: ABAP CDS views offer rich data modeling capabilities,
including the ability to define complex views, use expressions and functions,
aggregates, “GROUP BY” and “HAVING” clauses, associations (including filters and
prefixes), “ORDER BY”, “CASE”, “UNION”, “JOIN”, and “TOP” among others.
Enhanced Performance with Code Pushdown: ABAP CDS views can enhance
performance by pushing computation to the database layer instead of doing it in the
application layer12. This is particularly beneficial when dealing with large volumes of
data.
So, integrated authorization checks, rich data modeling capabilities, and enhanced
performance with code pushdown are indeed benefits of using ABAP CDS views. They
provide a powerful tool for modern application development on SAP systems
Question 5: Correct
In the context of SAP S/4HANA Cloud, what is a Side-by-Side Extension? Please choose
the correct answer.
• An extension using only frontend technologies
• A direct modification to the standard SAP code
• An extension built within the S/4HANA core
• An extension built on a separate platform, like SAP BTP (Correct)
Explanation
A Side-by-Side Extension in the context of SAP S/4HANA Cloud is an extension built on
a separate platform, like SAP Business Technology Platform (BTP).
The primary consideration with choosing a side-by-side approach is that while the
application may need SAP S/4HANA Cloud data, it doesn’t need the runtime
environment1. Side-by-side extensions utilize remote APIs for access and manipulation
of SAP S/4HANA Cloud data. The data is then available to be utilized locally by other
SAP BTP services, stored locally if desired, or combined with additional data from other
sources for reporting and analysis.
So, an extension built on a separate platform, like SAP BTP, is indeed a Side-by-Side
Extension in the context of SAP S/4HANA Cloud. It allows for greater flexibility and
customization to meet specific business needs
Question 6: Correct
When working with interfaces What do you have to consider?
Static methods, instance methods, static events, and instance events are possible
interface components: Interfaces can extend the functionality of a class. They can
declare globally or locally in ABAP programs.
Instance methods are not implemented in an interface: The interface in SAP ABAP is
different from the class, it cannot have any implementation like the class. It defines a
set of method declarations that a class must implement without providing any
implementation detail of that method.
Implementing classes must declare the interface in their public section: The interface
can be implemented in the same class where the functionality extension is required.
The implementing class must declare the interface in their public section.
So, all three statements you provided are correct considerations when working with
interfaces in SAP ABAP.
Question 7: Correct
What is the significance of the 'Friend' relationship between classes in ABAP OO?
Please choose the correct answer.
• It restricts access to methods and attributes to a specific class
• It enables classes to access each other's private components (Correct)
• It is used to define inheritance relationships
• It allows classes to share all methods and attributes
Explanation
The ‘Friend’ relationship in ABAP OO (Object-Oriented) does indeed enable classes to
access each other’s private components.
In ABAP OO, the visibility of properties of a class is typically limited to three scopes:
Public, Protected, and Private. Public properties are open to all, Protected properties are
open only to subclasses, and Private properties are only for the class itself.
However, with ‘Friend’ classes, you can access even the private properties of an object
without inheritance. This becomes useful when you want to implement factory patterns
or in unit testing.
It’s important to note that friendship is a unilateral principle. A class that grants
friendship is not automatically a friend of its friends. If the class that grants friendship
wants to access the private or protected components of its friend, the latter must grant
friendship explicitly.
Also, subclasses of friends and interfaces that are assigned a friend as a component
interface also become friends. Therefore, extreme care should be taken when defining a
friendship.
In summary, the ‘Friend’ relationship in ABAP OO is a powerful tool that allows classes
to work closely together by granting access to their mutually invisible components.
However, it should be used judiciously to maintain the integrity and encapsulation of
your classes
Question 8: Correct
in ABAP OO which of the following statements about Encapsulation is true?
Explanation
Encapsulation in ABAP OO does indeed protect an object’s state by bundling methods
and data together. It is a mechanism of wrapping data and functions together, which
hides the data and function from the outside world, thus promoting data hiding. This
means obstructing the view of private data and functions from unwanted third parties,
and data abstraction means showing users only what they need to see.
Question 9: Correct
What does the ALV Grid Control provide In ABAP? Please choose the correct answer.
• An interactive and customizable table display(Correct)
• A tool for user authentication
• A method for data encryption
• A framework for mobile applications
Explanation
The ALV Grid Control is placed within a SAP GUI screen is up to you. You can, for
example, “dock” a control to an arbitrary side of a dynpro. The ABAP Workbench uses
this technique in combination with an ALV Grid Control to dynamically blend in
additional information — e.g., a global worklist that contains repository objects, or
syntax error messages belonging to the currently shown source code
Use public SAP APIs and SAP extension points: ABAP Cloud Development Model
mandates the use of public SAP APIs and extension points to allow automated cloud
operation.
Build ABAP RESTful application programming model-based services: The ABAP Cloud
Development Model leverages the ABAP RESTful Application Programming Model
(RAP) for building services.
So, using public SAP APIs and SAP extension points, and building ABAP RESTful
application programming model-based services are indeed rules of the ABAP Cloud
Development Model. These rules help ensure that the applications are cloud-ready and
can interact efficiently with other components in the SAP ecosystem
paradigm?
In the traditional programming approach, applications were designed to retrieve all the
data needed at once, and complex calculations and operations were then performed on
the internal tables in the application layer. However, with an in-memory database like
SAP HANA, it’s recommended to push more of the load of expensive calculation, data
processing, and mathematical operations to the database layer, since SAP HANA’s
capabilities and features enable applications to process data in real time.
The goal should be to bring back only the required details to the application server,
rather than moving a much larger volume of intermediate data and then calculating the
details in ABAP. This approach ensures that your applications consider SAP HANA’s
features to deliver applications with massive real-time data processing capabilities
Question 12: Correct
What is the role of SAP Business Technology Platform (BTP) In the context of ABAP
Cloud? Please choose the correct answer.
• To provide a platform for building, extending, and integrating SAP
applications(Correct)
• To replace the need for an on-premise SAP system
• To serve as the primary database for SAP applications
• To manage SAP system upgrades and patches
Explanation
The SAP Business Technology Platform (BTP) in the context of ABAP Cloud provides a
platform for building, extending, and integrating SAP applications.
SAP BTP is the technical foundation of the entire SAP ecosystem and plays a crucial
role for all SAP customers and partners1. It allows organizations to build a new cloud
solution or extend SAP systems. In other words, SAP BTP is a bundle of many different
services. Some of those services can be used for innovation and application
development, some services are purely for monitoring, some are databases as a
service, and some are runtimes as a service.
In particular, SAP BTP, ABAP Environment (known as “Steampunk”) lets you use your
ABAP know-how to develop and run ABAP applications in the cloud. It allows you to
focus on business logics, while BTP takes care of the technical aspects behind the
scenes.
So, providing a platform for building, extending, and integrating SAP applications is
indeed the role of SAP Business Technology Platform (BTP) in the context of ABAP
Cloud
dimensions (e.g., time, region, product). Which ABAP CDS feature should be
• Parameterized views
• Aggregation nodes
• Input parameters for dynamic filtering (Correct)
• Associations between views (Correct)
• Hierarchical views (Correct)
Explanation
When a company wants to analyze sales data across multiple dimensions (e.g., time,
region, product), the following ABAP CDS features can be used to efficiently model this
requirement:
Associations between views: Associations in CDS views allow you to navigate from one
view to another, and are used to model the relationships between different views. This
can be particularly useful when analyzing data across multiple dimensions.
Hierarchical views: Hierarchical views can be used to model data that is naturally
hierarchical. For example, time can be broken down into years, quarters, months, weeks,
and days. Similarly, a company’s organizational structure or product categories can also
be represented as hierarchies.
Input parameters for dynamic filtering: Input parameters in CDS views allow for dynamic
filtering of data. This means that the data returned by the view can be restricted based
on the values provided to these input parameters at runtime. This can be useful for
analyzing data across different dimensions based on various criteria.
So, all three statements you provided are correct features of ABAP CDS views that can
be used to efficiently model the requirement of analyzing sales data across multiple
dimensions.
The term ‘In-app’ means that extensions are implemented within the S/4HANA Cloud
tenant itself. This framework allows key users to create fields, business logic, custom
business objects (CBO), and more. It is generally used to apply minor changes and
extensions, to increase user productivity or implement adaptations of the application
logic without changing the major parameters of the respective business processes.
In-app extensibility is a key capability that allows customers to differentiate with their
business processes and allows partners to provide industry-specific functionality or
globalization packages. So, enabling users to extend and personalize applications
within the SAP system is indeed the purpose of the ‘In-App Extensibility’ framework in
SAP S/4HANA Cloud
I hope this helps you understand the ‘Strategy’ design pattern better. 😊
If you want to learn more about ABAP OO design patterns, you can check out this
course on Udemy. It covers 23 design patterns with practical examples and exercises.
You can also take the practice tests on this web page to prepare for the ABAP Cloud
Back-End Developer Certification.
Explanation
In ABAP RAP (Restful Application Programming Model), the With_Draft functionality is
used to handle draft data and enable the implementation of draft-enabled applications.
• REDEFINITION (Correct)
• FINAL
• STATIC
• ABSTRACT
Explanation
The keyword REDEFINITION is used in ABAP to define a method that can be overridden
in a subclass. This keyword is used to redefine a method in a subclass that has been
inherited from a superclass. The redefined method can have the same parameters as
the inherited method, and it can provide a different implementation
ALV with IDA helps tables that contain very large quantities of data to be displayed on
the UI. The results of operations such as sorting, grouping, or filtering are also delivered
with a very fast response time1. It uses the in-memory database, such as SAP HANA,
without having to switch to a new programming environment.
In SALV with IDA, once the aggregation, filtering, the grouping is done in the HANA
database, only the resulted select query is transferred to the application layer. This
reduces the load on the application layer.
So, by leveraging the in-memory capabilities of HANA, ALV IDA can significantly
improve the performance of data retrieval and reporting in ABAP for SAP HANA. This
allows for faster and more efficient data processing, which is particularly beneficial for
handling large volumes of data
The ‘Clean Core’ approach aims to separate extensions from the core SAP application
and connect to business objects through stable interfaces. This ensures smooth
upgrades and extensions, preventing issues when moving from SAP S/4HANA on-
premise to the Cloud.
By keeping the core system clean, customers experience better maintainability, along
with lower total cost of ownership (TCO) for SAP S/4HANA Cloud. It also simplifies the
SAP upgrade processes in the future, reduces upgrade timelines, enables easier
extensibility, simplifies maintainability, and deployment process following the best
practices.
In summary, the ‘Clean Core’ philosophy is a crucial part of SAP’s strategy for S/4HANA
Cloud, aiming to provide a robust, flexible, and easily maintainable system that can
meet the unique needs of each customer while minimizing the need for custom code
and modifications
Question 23: Correct
For developing Fiori apps what is the primary advantage of using the ABAP RESTful
• The table is activated with a warning that you may lose data.
• The table is not activated. (Correct)
• The table is activated
• The table is activated without any warning, and the data is automatically
truncated to fit the new field length.
Explanation
If you try to shorten the length of a field in a database table that already contains data,
the table will not be activated.
When you attempt to reduce the size of a data type of a column, the database scans
existing data and returns an error if data exists that exceeds the new length limit. This is
because the operation could potentially lead to data loss.
Therefore, if you need to shorten the length of a field in a table that already contains
data, you should first ensure that no existing data exceeds the new length limit.
Otherwise, the table will not be activated.
In summary, while it’s possible to modify the length of a field in a database table, care
must be taken when the table already contains data to avoid potential data loss
CDS Table Functions are implemented natively on the database and can be called in
CDS. They support the HANA platform code pushdown capabilities in ABAP CDS. This
means that the data processing is pushed down to the database level, improving the
performance of applications.
A CDS Table Function is defined using the ABAP CDS statement DEFINE TABLE
FUNCTION and can be used as the data source in Open SQL read statements. Each CDS
Table Function includes the actual CDS entity of the table function that is generated in
the ABAP Dictionary and the CDS Table Function implementation (ABAP class library).
In contrast to the CDS views, the CDS Table Functions can be implemented using Native
SQL. This implementation is done within an AMDP method of an AMDP class and is
managed as an AMDP function by the AMDP framework in the database system.
CDS Table Functions can be consumed as data sources in other CDS views so that you
can add additional measures, fields to the definition. They behave like a table and can
be selected or joined in a CDS view like any table in the system.
In summary, CDS Table Functions provide a way to include complex logic that cannot be
achieved with standard CDS views, thereby enhancing the capabilities of ABAP CDS
Views
In ABAP OO, ‘Determinations’ are used to manage attributes of a given node. They can
also be used to create a custom determination to manage these attributes.
Determinations are triggered by certain events and are used to automatically calculate
or derive the value of one or more attributes.
SAP BTP provides the ability to create decoupled extensions (side-by-side) of the core
system using lifecycle-compliant methods (using only allowed APIs which ensure an
upgrade-safe method)4. These extensions are developed with various tools and
services of the SAP BTP and offer more flexibility than in-app extensions.
This approach aligns with the “Clean Code Paradigm”, which states that customers
should aim to keep the “core system”, e.g., an S/4 HANA (Cloud) system, clean, without
putting all the extensions directly in there, and instead building the extension on the SAP
BTP and integrating the “core” systems via APIs
SAP BTP offers services, tools, and capabilities to develop, extend, or integrate business
applications in the cloud2. This integration provides businesses with the ability to use
SAP BTP to extend and customize their S/4HANA Cloud solutions, which can result in
increased productivity, efficiency, and cost savings.
So, the ability to build and run custom applications is a significant advantage of using
SAP BTP for extending S/4HANA Cloud. It allows for greater flexibility and
customization to meet specific business needs.
Question 32: Correct
In ABAP for SAP HANA What is the significance of 'ALV IDA' (ALV with Integrated Data
Access)?
• It enables efficient data display by leveraging the power of the HANA database
(Correct)
• It is used for legacy system migration
• It is a tool for database administration
• It provides a framework for building web applications
Explanation
According to the web search results, ALV IDA (SAP List Viewer with Integrated Data
Access) is a special version of the List Viewer that helps tables that contain very large
quantities of data to be displayed on the UI. The results of operations such as sorting,
grouping, or filtering are also delivered with a very fast response time. It uses the in-
memory database, such as SAP HANA, without having to switch to a new programming
environment. There is no change in the user interface and standard functions (also ALV
services) of the ALV.
Database hints are instructions for the SAP HANA database server which influence the
way a database request is processed. They can be used to specify certain access paths,
overriding the SQL Optimizer’s determination. This can help improve the performance of
the database system when selecting a secondary index. So, optimizing query execution
plans is indeed the role of ‘Database Hints’ in ABAP SQL statements for SAP HANA
The ABAP Development Tools for SAP NetWeaver (ADT) enable ABAP developers to
perform development tasks using the ABAP application server capabilities in an Eclipse-
based IDE or on the classic ABAP Workbench. They offer failover-safe online
development in multiple AS ABAP systems, advanced source code editing and
refactoring support, powerful search and navigation capabilities, ideal support for task-
oriented and test-driven development, and built-in extensibility by rich extension points.
In particular, ABAP development tools for Eclipse enable you to perform ABAP-based
development tasks when you want to build, extend, and run ABAP applications based on
SAP products, such as SAP S/4HANA and SAP S/4HANA Cloud, private edition for
classic ABAP development as well as SAP BTP, ABAP environment and SAP S/4HANA
Cloud for Cloud development. So, providing an integrated environment for ABAP
development is indeed the significance of the ‘Eclipse-based ABAP Development Tools’
(ADT) in ABAP for SAP HANA.
Explanation
The SELECT SINGLE <tablename> ... statement in ABAP is used to read a single row
from a database table. This statement can be optimized for reading a single row, which
means it is generally somewhat faster than when using the addition UP TO 1 ROWS. The
SELECT SINGLE statement is designed to pass exactly one row to a flat structure as a
work area without opening a loop that must be closed using ENDSELECT or ENDWITH.
Usually, the row must be identified exactly, and it must be specified uniquely in the
WHERE condition
Question 37: Correct
What is the purpose of the 'GROUP BY' clause in an Open
Explanation
The ‘GROUP BY’ clause in an Open SQL SELECT statement in SAP ABAP is used to
combine rows that have the same values in specified columns. It groups rows that have
the same content in the columns or that have the same result in the SQL expressions
into a single row. This can considerably reduce the volume of data that has to be
transported from the database to the application server. So, the statement “To combine
rows that have the same values in specified columns” is a correct purpose of the
‘GROUP BY’ clause in an Open SQL SELECT statement in SAP ABAP.
Explanation
The ABAP RESTful Application Programming Model (RAP) in ABAP Cloud provides a
framework for building efficient, cloud-ready applications.
RAP defines the architecture for efficient end-to-end development of intrinsically SAP
HANA-optimized OData services (such as Fiori apps) in ABAP Cloud. It supports the
development of all types of Fiori applications as well as publishing Web APIs.
RAP is based on technologies and frameworks such as Core Data Services (CDS) for
defining semantically rich data models and a service model infrastructure for creating
OData services with bindings to an OData protocol and ABAP-based application
services.
In summary, the ABAP RESTful Application Programming Model plays a crucial role in
ABAP Cloud by providing a standardized development flow based on Core Data
Services (CDS), the ABAP language, and business services. This allows developers to
build innovative, cloud-ready SAP Fiori applications, local and Web APIs, and to easily
extend SAP standard applications on the ABAP platform, in the cloud as well as on-
premise
PUBLIC SECTION.
CLASS-METHODS b.
ENDCLASS.
• zcl_a->b( ).
• lo_a->b( ).
• lo_a=>b( ).
• zcl_a=>b( ). (Correct)
Explanation
The syntax you provided, zcl_a->b( ), is used for calling instance methods, not class
methods1. In your class definition, b is defined as a class method. Class methods are
called using the class name and the static component selector =>. Therefore, the
correct syntax for calling the class method b in class ZCL_A would be ZCL_A=>b( ). So,
the statement “zcl_a->b( )” is not the correct syntax for calling the class method b in
class ZCL_A
So, while CDS views provide an enhancement of SQL and offer capabilities beyond
traditional data modelling tools, they do not replace the need for SQL in ABAP.
Therefore, the statement “They replace the need for SQL in ABAP” is not a correct
advantage of using Core Data Services (CDS) views in ABAP for HANA.