In Classic ABAP, SE11 was the central tool for table definitions. In ABAP Cloud, things are different: Tables are defined directly in code as DDL Source, activated via ABAP Development Tools (ADT). This article shows the transition from the classic SE11 world to modern CDS-based table definition.
The Problem: SE11 in ABAP Cloud?
Those looking for transaction SE11 in ABAP Cloud won’t find it:
SE11? → Doesn't exist in ABAP CloudSE16? → Doesn't exist in ABAP CloudSM30? → Doesn't exist in ABAP CloudAll data definitions are done through ADT (Eclipse) and DDL Source Files.
Table Definition Comparison
Classic ABAP (SE11)
Transaction SE11 → Database Table → ZFLIGHT_BOOK
Fields: MANDT CLNT Client BOOKING_ID NUMC(10) Booking number FLIGHT_ID NUMC(10) Flight number CUSTOMER_ID NUMC(10) Customer number BOOKING_DATE DATS Booking date PRICE CURR(15,2) Price CURRENCY CUKY Currency STATUS CHAR(1) Status
→ Activate → Database table createdABAP Cloud (DDL Source)
@EndUserText.label: 'Flight Bookings'@AbapCatalog.enhancement.category: #NOT_EXTENSIBLE@AbapCatalog.tableCategory: #TRANSPARENT@AbapCatalog.deliveryClass: #A@AbapCatalog.dataMaintenance: #RESTRICTEDdefine table zflight_book { key client : abap.clnt not null; key booking_id : abap.numc(10) not null; flight_id : abap.numc(10); customer_id : abap.numc(10); booking_date : abap.dats; @Semantics.amount.currencyCode: 'zflight_book.currency_code' price : abap.curr(15,2); currency_code: abap.cuky; status : abap.char(1);}Advantages of DDL Syntax:
- Version-controllable with Git (see abapGit)
- No GUI dependency
- Annotations directly at field level
- Better readability in code reviews
Creating Tables in ADT
Step-by-Step
1. Right-click on package → New → Other ABAP Repository Object2. Dictionary → Database Table3. Enter name: ZFLIGHT_BOOK4. Description: Flight Bookings5. Finish → DDL Source is generatedBasic Table Structure
@EndUserText.label: 'Table Description'@AbapCatalog.enhancement.category: #NOT_EXTENSIBLE@AbapCatalog.tableCategory: #TRANSPARENT@AbapCatalog.deliveryClass: #A@AbapCatalog.dataMaintenance: #RESTRICTEDdefine table ztable { key client : abap.clnt not null; key key_field : <datatype> not null; field1 : <datatype>; field2 : <datatype>;}Important Annotations
| Annotation | Meaning | Values |
|---|---|---|
@AbapCatalog.tableCategory | Table type | #TRANSPARENT, #STRUCTURE |
@AbapCatalog.deliveryClass | Delivery class | #A (Application data), #C (Customizing) |
@AbapCatalog.dataMaintenance | Maintenance permission | #RESTRICTED, #ALLOWED |
@AbapCatalog.enhancement.category | Extensibility | #NOT_EXTENSIBLE, #EXTENSIBLE_ANY |
Built-in Data Types in ABAP Cloud
In ABAP Cloud, data types are referenced directly with abap.<type>:
Commonly Used Types
" Stringsfield_char : abap.char(30); " Fixed lengthfield_string : abap.string(256); " Variable lengthfield_numc : abap.numc(10); " Numeric text (e.g., IDs)field_lang : abap.lang; " Language key
" Numbersfield_int : abap.int4; " Integer (4 bytes)field_int8 : abap.int8; " Integer (8 bytes)field_dec : abap.dec(10,2); " Decimal numberfield_curr : abap.curr(15,2); " Currency amountfield_quan : abap.quan(13,3); " Quantity field
" Date and Timefield_date : abap.dats; " Date (YYYYMMDD)field_time : abap.tims; " Time (HHMMSS)field_tstmp : abap.utclong; " UTC timestamp (recommended!)
" Othersfield_bool : abap_boolean; " Boolean (X or blank)field_client : abap.clnt; " Clientfield_cuky : abap.cuky; " Currency keyfield_unit : abap.unit(3); " Unit of measureTimestamps: Prefer UTCLONG
" ❌ Old: Separate date and timecreated_date : abap.dats;created_time : abap.tims;
" ✅ New: UTC timestampcreated_at : abap.utclong;changed_at : abap.utclong;The type abap.utclong stores timestamps timezone-independent and is the standard for ABAP Cloud.
Data Elements and Domains
Classic ABAP: Separate Objects
SE11 → Domain → ZBOOKING_STATUS Data type: CHAR(1) Value range: O (Open), C (Confirmed), X (Cancelled)
SE11 → Data Element → ZBOOKING_STATUS Domain: ZBOOKING_STATUS Field label: Booking Status
SE11 → Table → ZFLIGHT_BOOK STATUS → Data element ZBOOKING_STATUSABAP Cloud: Integrated Definition
In ABAP Cloud, data elements are defined as DDL Source:
@EndUserText.label: 'Booking Status'@EndUserText.heading: 'Status'define type zbooking_status : abap.char(1)Domain with Fixed Values
For fixed value sets, there’s the Enumeration concept:
" Enumeration for booking statusCLASS zcl_booking_status DEFINITION PUBLIC FINAL CREATE PUBLIC.
PUBLIC SECTION. TYPES: BEGIN OF ENUM booking_status, open VALUE IS INITIAL, confirmed, cancelled, END OF ENUM booking_status.ENDCLASS.Or directly as CDS Type:
@EndUserText.label: 'Booking Status'define type zbooking_status : abap.char(1)enum { open = 'O'; confirmed = 'C'; cancelled = 'X';}Complete Flight Booking Example
Main Table: Bookings
@EndUserText.label: 'Flight Bookings'@AbapCatalog.enhancement.category: #NOT_EXTENSIBLE@AbapCatalog.tableCategory: #TRANSPARENT@AbapCatalog.deliveryClass: #A@AbapCatalog.dataMaintenance: #RESTRICTEDdefine table zflight_book { key client : abap.clnt not null; key booking_id : abap.numc(10) not null;
" Business keys flight_id : abap.numc(10); customer_id : abap.numc(10);
" Booking data booking_date : abap.dats; @Semantics.amount.currencyCode: 'zflight_book.currency_code' price : abap.curr(15,2); currency_code : abap.cuky; seats_booked : abap.int4; booking_status : abap.char(1);
" Administrative fields created_by : abap.uname; created_at : abap.utclong; last_changed_by : abap.uname; last_changed_at : abap.utclong; local_last_changed: abap.utclong;}Master Data Table: Flights
@EndUserText.label: 'Flight Data'@AbapCatalog.enhancement.category: #NOT_EXTENSIBLE@AbapCatalog.tableCategory: #TRANSPARENT@AbapCatalog.deliveryClass: #A@AbapCatalog.dataMaintenance: #RESTRICTEDdefine table zflight { key client : abap.clnt not null; key flight_id : abap.numc(10) not null;
" Flight data carrier_id : abap.char(3); connection_id : abap.numc(4); flight_date : abap.dats;
" Route departure_city : abap.char(30); departure_code : abap.char(3); arrival_city : abap.char(30); arrival_code : abap.char(3);
" Capacity seats_max : abap.int4; seats_occupied : abap.int4;
" Price @Semantics.amount.currencyCode: 'zflight.currency_code' base_price : abap.curr(15,2); currency_code : abap.cuky;}Master Data Table: Customers
@EndUserText.label: 'Customer Master Data'@AbapCatalog.enhancement.category: #NOT_EXTENSIBLE@AbapCatalog.tableCategory: #TRANSPARENT@AbapCatalog.deliveryClass: #A@AbapCatalog.dataMaintenance: #RESTRICTEDdefine table zcustomer { key client : abap.clnt not null; key customer_id : abap.numc(10) not null;
" Customer data first_name : abap.char(40); last_name : abap.char(40); email : abap.char(100); phone : abap.char(30);
" Address street : abap.char(60); city : abap.char(40); postal_code : abap.char(10); country : abap.char(3);}Table Entities: The New Architecture
With ABAP Cloud 2024, the concept of Table Entities was introduced. The table itself becomes an entity - without an additional CDS View.
Classic Approach (three objects)
1. Database table (ZFLIGHT_BOOK)2. CDS View (ZI_FlightBooking)3. Behavior Definition (ZI_FlightBooking)Table Entity Approach (two objects)
1. Table Entity (ZI_FlightBooking) - Table + View in one2. Behavior Definition (ZI_FlightBooking)Table Entity Definition
@EndUserText.label: 'Flight Booking (Table Entity)'@AbapCatalog.enhancement.category: #NOT_EXTENSIBLEdefine table entity zi_flightbooking { key client : abap.clnt not null; key booking_id : abap.numc(10) not null;
flight_id : abap.numc(10); customer_id : abap.numc(10); booking_date : abap.dats;
@Semantics.amount.currencyCode: 'zi_flightbooking.currency_code' price : abap.curr(15,2); currency_code : abap.cuky; booking_status : abap.char(1);
created_by : abap.uname; created_at : abap.utclong; last_changed_by : abap.uname; last_changed_at : abap.utclong; local_last_changed: abap.utclong;}Comparison: Table vs. Table Entity
| Aspect | Table + CDS View | Table Entity |
|---|---|---|
| Objects | 2 (Table + View) | 1 |
| Maintenance | Double maintenance | Define once |
| Flexibility | High | Limited |
| Aliases | Freely choosable | Field name = column name |
| Calculated Fields | Yes | No |
| Recommended for | Complex models | Simple CRUD |
For more on CDS patterns, see the upcoming article on RAP CDS patterns.
Foreign Keys and Associations
Foreign Key in Table Definition
In ABAP Cloud, foreign keys are defined via annotations:
@EndUserText.label: 'Flight Bookings with Foreign Keys'define table zflight_book_fk { key client : abap.clnt not null; key booking_id : abap.numc(10) not null;
@AbapCatalog.foreignKey.screenCheck: false flight_id : abap.numc(10) with foreign key zflight where client = zflight_book_fk.client and flight_id = zflight_book_fk.flight_id;
@AbapCatalog.foreignKey.screenCheck: false customer_id : abap.numc(10) with foreign key zcustomer where client = zflight_book_fk.client and customer_id = zflight_book_fk.customer_id;
" ... more fields}Associations in CDS Views
For RAP applications, associations in CDS Views are the better way:
@AccessControl.authorizationCheck: #CHECK@EndUserText.label: 'Flight Bookings with Associations'define root view entity ZI_FlightBooking as select from zflight_book as Booking
association [1..1] to ZI_Flight as _Flight on $projection.FlightId = _Flight.FlightId
association [1..1] to ZI_Customer as _Customer on $projection.CustomerId = _Customer.CustomerId{ key Booking.booking_id as BookingId, Booking.flight_id as FlightId, Booking.customer_id as CustomerId, Booking.booking_date as BookingDate,
@Semantics.amount.currencyCode: 'CurrencyCode' Booking.price as Price, Booking.currency_code as CurrencyCode, Booking.booking_status as BookingStatus,
" Expose associations _Flight, _Customer}Cardinalities
| Cardinality | Meaning | Example |
|---|---|---|
[0..1] | Optional, max 1 | Optional contact person |
[1..1] | Exactly 1 | Booking → Flight |
[0..*] | Optional, any number | Customer → Bookings |
[1..*] | At least 1, any number | Order → Items |
Populating and Reading Tables
Inserting Data
" Single recordINSERT INTO zflight_book VALUES @( VALUE #( client = sy-mandt booking_id = '0000000001' flight_id = '0000000100' customer_id = '0000000001' booking_date = cl_abap_context_info=>get_system_date( ) price = '499.00' currency_code = 'EUR' booking_status = 'O' created_by = cl_abap_context_info=>get_user_technical_name( ) created_at = utclong_current( ) )).
" Multiple recordsDATA(lt_bookings) = VALUE #( ( client = sy-mandt booking_id = '0000000002' flight_id = '0000000101' ... ) ( client = sy-mandt booking_id = '0000000003' flight_id = '0000000102' ... )).INSERT zflight_book FROM TABLE @lt_bookings.Reading Data
" Read via CDS View (recommended for RAP)SELECT FROM ZI_FlightBooking FIELDS BookingId, FlightId, BookingDate, Price WHERE BookingStatus = 'O' INTO TABLE @DATA(lt_open_bookings).
" With associationsSELECT FROM ZI_FlightBooking AS Booking FIELDS Booking~BookingId, \_Flight-DepartureCity, \_Flight-ArrivalCity, \_Customer-LastName INTO TABLE @DATA(lt_with_details).Best Practices
1. Always Plan Administrative Fields
" These fields should be in every table:created_by : abap.uname;created_at : abap.utclong;last_changed_by : abap.uname;last_changed_at : abap.utclong;local_last_changed: abap.utclong; " For ETag/Optimistic Locking2. Use Semantic Annotations
" Correctly annotate currency fields@Semantics.amount.currencyCode: 'currency_code'price : abap.curr(15,2);currency_code : abap.cuky;
" Correctly annotate quantity fields@Semantics.quantity.unitOfMeasure: 'unit'quantity : abap.quan(13,3);unit : abap.unit(3);3. Follow Naming Conventions
Tables: z<area>_<name> → zflight_bookTable Entities: zi_<name> → zi_flightbookingCDS Views: ZI_<Name> (Interface) → ZI_FlightBooking ZC_<Name> (Consumption) → ZC_FlightBooking4. UTCLONG Instead of DATS/TIMS
" ❌ Avoid:changed_date : abap.dats;changed_time : abap.tims;
" ✅ Prefer:changed_at : abap.utclong;Conclusion
Tables in ABAP Cloud are exclusively defined via DDL Source in ADT:
| Classic (SE11) | ABAP Cloud (ADT) |
|---|---|
| GUI-based | Code-based |
| Domain → Data element → Table | Types inline or as Type |
| Foreign Key dialog | Foreign Key annotation |
| Not version-controllable | Git-ready |
The transition requires initial training, but offers clear advantages: Better readability, version control, and integration with the RAP stack.
For next steps with RAP, see RAP Basics, for CDS Views in detail CDS Views, and for migrating existing objects the ABAP Cloud Migration Guide.