SAP Certified Associate - Back-End Developer - ABAP Cloud (C_ABAPD) Exam-style mock test
SAP Back-End Developer ABAP Cloud C_ABAPD Practice Exams|Practice test
Full explanations
Exam format
Pass line 65%
33 USD One-time · lifetime access
Enroll →
Sample questions
Example1 · ABAP Language Core, Data Types, and Internal Tables
A developer on the logistics team must declare a variable to hold a shipment's gross weight in kilograms with two decimal places, used in financial freight calculations where rounding errors are unacceptable. Which ABAP built-in type should be used for the declaration?
✓Type p with decimals, a packed number storing decimals accurately
Correct. Packed type p holds a fixed number of decimals exactly, so freight amount arithmetic avoids rounding drift.
・Type f, a binary floating point number that approximates values with rounding
Incorrect. Type f is binary floating point and introduces rounding inaccuracies unsuitable for freight money.
・Type i, a 4-byte integer that holds only whole numbers
Incorrect. Type i holds only whole numbers and cannot represent two decimal places.
・Type string, a variable-length character field holding text data of any length
Incorrect. Type string stores text and cannot be used directly in numeric calculations.
Explanation
For exact decimal arithmetic such as weights and amounts, packed type p is the correct choice because it preserves decimals precisely, unlike binary float f.
Example2 · Object-Oriented ABAP (Classes, Interfaces, Events, Exceptions)
A developer on the logistics team needs a local class ZCL_SHIPMENT that can be instantiated from outside its own class. Which visibility setting for the CREATE addition should be used when defining the class so other classes may create instances?
✓CREATE PUBLIC
Correct. CREATE PUBLIC allows any context, including external classes, to instantiate the class with CREATE OBJECT or NEW.
・CREATE PRIVATE
Incorrect. CREATE PRIVATE restricts instantiation to the class itself and its friends, blocking external creation.
・CREATE PROTECTED
Incorrect. CREATE PROTECTED limits instantiation to the class and its subclasses, not arbitrary external callers.
・CREATE FRIENDS only for the entire enclosing package and its subpackages
Incorrect. There is no such CREATE addition; friendship is granted separately and does not open instantiation to a whole package automatically.
Explanation
CREATE PUBLIC is the default-style setting that permits instantiation from any external context, which is what the shipment class requires.
Example3 · ABAP SQL and Code Pushdown
A logistics team reports slow nightly jobs. One job reads all 50 million shipment rows into an internal table, then loops to sum freight costs per carrier. Which principle should guide the redesign?
✓Push the aggregation into the database layer so only the summarized result set returns to ABAP
Correct. Code pushdown means doing data-intensive work such as aggregation in the database so only the small result set is transferred.
・Replace the LOOP with a parallel cursor so the ABAP server threads the summation faster
Incorrect. Parallel cursor helps ABAP-side loops but still transfers all 50 million rows to the application server.
・Buffer every shipment row in a hashed internal table and reuse it across the other nightly jobs that run later
Incorrect. Buffering the full dataset keeps the costly transfer and consumes huge amounts of application-server memory.
・Split the SELECT into several range-based SELECTs issued sequentially from the application server to reduce memory
Incorrect. Multiple range SELECTs still move all rows up to ABAP instead of aggregating at the database.
Explanation
The golden rule of code pushdown is to keep data-intensive operations like aggregation close to the data, returning only summarized results to ABAP.
Example4 · Core Data Services (CDS) Views
A developer in a manufacturing IT department is building a new CDS data model in ABAP Cloud to expose machine telemetry data. Following current ABAP Cloud guidelines, which statement should be used to define the top-level CDS artifact?
✓DEFINE VIEW ENTITY
Correct. In ABAP Cloud the CDS view entity, created with DEFINE VIEW ENTITY, is the recommended artifact and replaces the older DDIC-based view.
・DEFINE VIEW
Incorrect. DEFINE VIEW creates a classic DDIC-based CDS view, which is deprecated and not allowed in the ABAP Cloud development model.
・DEFINE TABLE FUNCTION
Incorrect. DEFINE TABLE FUNCTION declares an AMDP-backed table function, not a standard CDS view for exposing telemetry data.
・DEFINE STRUCTURE VIEW
Incorrect. DEFINE STRUCTURE VIEW is not valid CDS syntax and does not exist in the language.
Explanation
ABAP Cloud mandates CDS view entities defined with DEFINE VIEW ENTITY; the legacy DEFINE VIEW is not released for the Cloud model.
Example5 · RESTful Application Programming (RAP), ABAP Cloud, and Development Tools
A manufacturing IT team is designing a RAP-based app to manage shop-floor work orders. During design review, a junior developer asks which RAP layer exposes the business object as an OData service that the Fiori UI can consume. Which layer is responsible for this?
・The service adaptation layer
Incorrect. Service adaptation handles UI annotations and metadata extensions, not the core OData exposure.
・The data model and behavior layer
Incorrect. This layer defines the CDS entities and their behavior, but it does not itself publish the OData service.
✓The service provisioning layer
Correct. The service provisioning layer defines the service definition and binding that expose the business object as a consumable OData service.
・The persistence and database table layer
Incorrect. This layer stores the data in database tables and is not involved in service exposure at all.
Explanation
In RAP, the service provisioning layer (service definition plus service binding) is what turns a projected business object into a consumable OData (or other protocol) service.
Example6 · ABAP Language Core, Data Types, and Internal Tables
A developer in the manufacturing IT department must declare a variable to store a production line batch counter that holds whole numbers only. Which built-in ABAP type is the appropriate choice for a standard integer value?
・The character type C that stores alphanumeric text
Incorrect. Type C stores characters, not numeric integers used for counting.
・The packed type P suited for currency amounts
Incorrect. Type P is for packed decimals typically used with amounts and fractions, not plain integers.
・The decimal floating point type for scientific use
Incorrect. Decimal floating point is intended for high-precision scientific values, not a simple counter.
✓The integer type I
Correct. Type I is the built-in integer type for whole numbers.
Explanation
A batch counter holding whole numbers maps directly to the built-in integer type I.
Example7 · ABAP Language Core, Data Types, and Internal Tables
A retail developer must declare a variable to hold a product's unit price such as 19.99, keeping exact decimal precision for currency arithmetic in an ABAP Cloud report. Which built-in type should the developer use?
✓p
Correct. Packed type p stores numbers with exact decimal precision, which is required for monetary values like prices.
・f
Incorrect. The floating point type f is binary and introduces rounding errors, so it is unsuitable for exact currency amounts in retail pricing.
・i
Incorrect. The integer type i cannot represent the fractional cents in a price such as 19.99.
・string
Incorrect. The character type string holds text, not numeric values usable for decimal arithmetic.
Explanation
Monetary and other exact-decimal values use the packed type p; floating point f is only for scientific calculations where rounding is acceptable.
Example8 · ABAP Language Core, Data Types, and Internal Tables
In a retail inventory program, a developer defines a flat structure gs_item with fields matnr, qty, and price. How is the qty component of this structure accessed in ABAP?
✓gs_item-qty
Correct. The hyphen component selector is used to access a field of a flat structure, so gs_item-qty is right.
・gs_item->qty
Incorrect. The arrow operator is for dereferencing object or data references, not for accessing structure components.
・gs_item.qty
Incorrect. The dot notation is not the component selector used for ABAP structures.
・gs_item[qty]
Incorrect. Square brackets are used with internal tables as table bodies, not to select a structure component.
Explanation
ABAP uses the hyphen (-) component selector to read or write individual fields of a structure.
Example9 · ABAP Language Core, Data Types, and Internal Tables
A retail team needs an internal table of store records where each store_id must be unique and single-row reads by store_id must be fast. Which table category best fits this requirement?
✓Hashed table with a unique key
Correct. A hashed table enforces a unique key and gives near-constant time for single-record key access, matching the requirement.
・Standard table with a non-unique key
Incorrect. A standard table with a non-unique key allows duplicates and uses linear search for key access, so it does not fit.
・Sorted table with a non-unique key
Incorrect. A sorted table could keep uniqueness but single reads are logarithmic, not the fastest option, and the stated key here is non-unique.
・Standard table accessed by index only
Incorrect. Index-only access on a standard table neither enforces uniqueness nor provides fast key-based lookup.
Explanation
Hashed tables are optimal when a unique key is required and access is always by the full key.
Example10 · ABAP Language Core, Data Types, and Internal Tables
A utilities ABAP team stores a meter reading that may contain exactly three decimal places and must be used in financial billing without rounding drift. Which ABAP built-in type should the developer declare for this value?
✓Type p with the DECIMALS addition set to the required count
Correct. Packed type p with DECIMALS gives exact fixed-point decimals needed for billing.
・Type i for whole numbers only, holding no fractional part whatsoever for the reading
Incorrect. Type i holds only integers and cannot store the three decimal places.
・Type f for floating point values, which stores an approximate binary fraction of the amount
Incorrect. Type f introduces rounding drift and is unsuitable for exact billing amounts.
・Type string for arbitrary text, keeping the reading only as a sequence of characters
Incorrect. Type string holds text and cannot be used in arithmetic billing calculations.
Explanation
Fixed-point packed numbers preserve exact decimals required for financial billing, unlike integer, float, or text types.
Example11 · ABAP Language Core, Data Types, and Internal Tables
The utilities team needs an internal table that allows fast direct access by a non-unique key and preserves insertion order for a log of meter events. Which table category best fits this requirement?
・A sorted table with a unique key
Incorrect. A sorted table reorders rows by key and here the key must stay non-unique with insertion order.
✓A standard table
Correct. A standard table keeps insertion order and supports index and key access.
・A hashed table with a unique key
Incorrect. A hashed table requires a unique key and has no index order preserved.
・An index-free ranged table
Incorrect. No such ABAP table category named index-free ranged table exists.
Explanation
Standard tables preserve insertion order and permit both index and non-unique key access, matching the event log need.
Example12 · ABAP Language Core, Data Types, and Internal Tables
In a financial services app, a developer must declare a variable that holds a monetary amount with two decimal places and the correct arithmetic behavior for currency fields. Which built-in type is the most appropriate choice?
✓Type P with a defined number of decimals
Correct. Packed type P supports a defined number of decimals and exact fixed-point arithmetic, which is the standard choice for currency amounts.
・Type I for the amount
Incorrect. Type I stores whole numbers only and cannot represent two decimal places.
・Type STRING for the amount
Incorrect. Type STRING stores text and is not suitable for numeric arithmetic on amounts.
・Type C with a fixed length and manual comma handling by the caller later
Incorrect. Type C stores characters and would force unreliable manual parsing instead of proper numeric handling.
Explanation
Monetary amounts need exact decimal arithmetic, which packed type P provides via its decimal specification.
Example13 · ABAP Language Core, Data Types, and Internal Tables
A developer on the payments team assigns a value from a type C(10) field into a type C(4) field during a reconciliation routine. What happens to the source value when it is placed into the shorter target?
✓The value is truncated on the right to fit the target length
Correct. Assigning a longer character field to a shorter one truncates the surplus characters on the right.
・A syntax error prevents activation entirely
Incorrect. Such an assignment is syntactically valid and activates without error.
・The target automatically grows to length ten to preserve everything
Incorrect. A type C field has a fixed length and does not grow at runtime.
・The runtime raises an uncatchable exception and terminates the current reconciliation session immediately
Incorrect. No uncatchable exception is raised for simple character truncation.
Explanation
Character fields have fixed length, so a longer value is silently truncated on the right when assigned to a shorter target.
Example14 · ABAP Language Core, Data Types, and Internal Tables
A developer in a public sector IT group must store a citizen's unique registry number, which can exceed the range of a 4-byte integer but is always a whole number. Which built-in ABAP type is the most suitable choice?
・TYPE string, because it stores any length of characters
Incorrect. A string stores characters, not a numeric value, and should not model a whole number.
✓TYPE int8
Correct. int8 is an 8-byte integer that holds whole numbers far beyond the range of the 4-byte type i.
・TYPE i, the standard 4-byte integer
Incorrect. Type i is only 4 bytes and cannot hold values beyond roughly two billion.
・TYPE p LENGTH 8 DECIMALS 2 for maximum precision
Incorrect. Packed numbers with decimals are meant for fractional amounts, not whole registry numbers.
Explanation
int8 provides an 8-byte signed integer suitable for whole numbers that overflow the standard 4-byte type i.
Example15 · ABAP Language Core, Data Types, and Internal Tables
In a report that reads agency records, a developer writes SELECT SINGLE * FROM zagency INTO @DATA(ls_agency). What determines the type of ls_agency?
・It is always typed as a generic string regardless of the source
Incorrect. Inline declaration infers the actual type, not a generic string.
✓It becomes a structure whose type is inferred from the zagency table row
Correct. The @DATA() inline declaration infers a structure matching the row type of zagency.
・It is typed as REF TO data and must be dereferenced
Incorrect. The variable holds a work area structure, not a data reference.
・It must be declared explicitly beforehand because inline declaration is not allowed in a SELECT
Incorrect. Inline declaration in the INTO clause is exactly the supported syntax here.
Explanation
The @DATA() inline declaration lets the compiler infer the work area type from the SELECT list, here the full row structure of zagency.
▶ Try 10 free questions (graded)