Which of the following actions cause an indirect change to a database table requiring a table conversion? (Select 2)
Answer : A, C
In ABAP Cloud projects, structural changes to persisted artifacts must respect upgrade-safe contracts. Changes that alter the physical layout of a table (removing a column that comes via an included structure, or shortening the length of a column by changing its domain) lead to a database conversion because data type/column layout changes must be reconciled on the DB. While our RAP/CDS guides focus on modeling and service exposure, they emphasize strict, typed modeling and upgrade stability---any structural change that affects persistence is subject to strict checks and lifecycle handling.
By contrast, field labels (texts) do not change the physical table layout and thus don't require a conversion.
What are some principles of encapsulation?
(Select 2 correct answers)
Answer : A, D
Encapsulation in ABAP OO and ABAP Cloud ensures that internal object details are hidden from outside consumers.
A . Attributes can be changed through public methods Correct, because controlled access is provided through getter/setter or other methods.
B . Attributes can be changed by the client program directly Incorrect, this violates encapsulation.
C . Attributes cannot be changed Incorrect, they can be changed, but only via allowed mechanisms.
D . Attributes can only be changed by the class itself Correct, ensuring business logic consistency.
This aligns with RAP behavior definitions (BDEF) where internal attributes are encapsulated and only manipulated through behavior implementation methods.
Verified Study Guide Reference: ABAP Objects Programming Guide -- Encapsulation Principles.
When defining a METHOD, which parameter type can only have 1 value?
Answer : D
In ABAP Object-Oriented Programming within ABAP Cloud, methods can define multiple parameters of type IMPORTING, EXPORTING, or CHANGING. However, for RETURNING parameters, only one value is permitted per method.
This restriction ensures that RAP BOs and ABAP Cloud classes expose methods with clear, unambiguous outputs, aligning with best practices of encapsulation and functional programming design.
IMPORTING multiple allowed
EXPORTING multiple allowed
CHANGING multiple allowed
RETURNING exactly one allowed
Verified Study Guide Reference: ABAP Objects Programming Guide (Methods), ABAP Cloud Back-End Developer Documentation -- Method Signature Rules.
Given the following code excerpt that defines an SAP HANA database table:
DEFINE TABLE demo_table
{
KEY field1 : REFERENCE TO abap.clnt(3);
KEY field2 : abap.char(1332);
@Semantics.quantity.unitOfMeasure : 'demo_table.field4'
field3 : abap.quan(2);
field4 : abap.unit(2);
}
Which field is defined incorrectly?
Answer : A
Let's evaluate each field:
field1: Defined as REFERENCE TO abap.clnt(3) --- this is correct. It follows standard definition for client fields.
field2: Defined as abap.char(1332) --- this is incorrect. In ABAP CDS view entities, the maximum length for CHAR fields is limited to 1333 bytes total row size for all fields in a view or table. A single CHAR(1332) is almost the full limit and considered impractical or invalid in real implementations.
field3: Defined as abap.quan(2) --- this is correct, representing a quantity field with 2 decimal places.
field4: Defined as abap.unit(2) --- this is correct and compatible with the @Semantics.quantity.unitOfMeasure annotation used in field3.
Therefore, field2 is the invalid field due to its excessive length, likely breaching the allowable memory layout in the HANA table or violating SAP CDS limits.
ABAP CDS Development Guide, section 2.1 -- Table definitions and ABAP type length constraints; SAP Help 3, page 6 -- maximum lengths for data elements and supported annotations.
How can you execute test classes? (Select 3)
Answer : A, C, D
Interactive runs from the tested object or its test class in ADT: In RAP/ABAP Cloud test guides, you specify a test relation, which then lets you run unit tests directly from the context menu of the behavior definition (tested object) in ADT. This is the ''Run as unit test'' interaction from the tested object.
Interactive runs from the test class itself: Test classes are declared with FOR TESTING, and the same RAP guides show the canonical test-class structure used for ABAP Unit. In ADT, you can execute the test class via its context menu (''Run as Unit Test'').
Mass execution with ATC: The same document set prescribes governance via ABAP Test Cockpit (ATC) check variants applied across many objects, supporting mass test/check execution. ATC is used broadly to enforce ABAP Cloud rules and quality gates across developments, which covers running checks/tests at scale (mass).
There is no built-in mechanism to execute unit tests during transport release; the recommended mass execution path is via ATC, not via the Transport Organizer. (Hence B and E are not correct.)
===========
In a booking record, how can you calculate the difference in days between the order date (type D) and the flight date (type D) of a flight?
Answer : B
In ABAP, when calculating the difference between two date fields (type DATS), the result is directly a type i (integer) representing the difference in days.
Statement B is correct:
data(gv_diff_days) = gs_booking-flight_date - gs_booking-order_date.
This directly subtracts two DATS fields, resulting in an integer value for the number of days difference. No conversion is necessary.
Statements A and D are incorrect because the conv d( ... ) attempts to convert the result back to a DATS type, which is invalid since the result is an integer (number of days), not a date.
Statement C is syntactically correct but would produce the negative of the desired value (flight date - order date). It is semantically incorrect for the use case.
This approach is consistent with ABAP for Cloud Development, which requires explicit typing, and ABAP language version strict mode, where automatic type inference is restricted.
Which of the following are rules that extensions in SAP S/4HANA Cloud, public edition must adhere to? (Select 3 correct answers)
Answer : C, D, E
Tier 1 (cloud-ready) extensions ''follow ABAP Cloud rules and hence by default can only access the public SAP interfaces (objects released for cloud development).'' This directly supports using released APIs (C) and cloud-enabled/released technologies (D).
The three-tier extensibility model separates safe cloud extensions (Tier 1) from classic code; Tier 2 wrappers exist only to mitigate missing public APIs, but they are not the recommended pattern for S/4HANA Cloud public-edition extensions (therefore B is not a rule).
In S/4HANA Cloud, object changes are not allowed; instead, customers must use predefined extension points (E)---for example, whitelisted extension includes, released BAdIs, or CDS extension points exposed for cloud usage---consistent with the ABAP Cloud principle of public, released artifacts only. (This is the prescribed approach in the ABAP Cloud extensibility guidance that accompanies the three-tier model.)