Comprehensive and Detailed Explanation from Exact Extract:
The ABAP DATA statement declares a variable with an assigned type.
A. Private type in the same class (ZCL_CLASS_A) → ✅ Allowed. A class can use its own local type definitions, declared using TYPES.
B. Domain from ABAP Dictionary → ❌ Not allowed directly. Domains define technical attributes but cannot be referenced directly in DATA; they must be wrapped in a data element.
C. Type defined privately in another class → ❌ Not accessible, since private definitions are encapsulated.
D. Data element from ABAP Dictionary → ✅ Allowed, because data elements are global dictionary objects.
This follows ABAP Cloud extensibility rules, ensuring encapsulation and strict typing.
Verified Study Guide Reference: ABAP Dictionary Development Guide, ABAP Cloud Back-End Developer Learning Material (Variable Typing and Encapsulation).
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit