ABAP Cloud vs. Classic ABAP - what are the differences? Which version should you learn? This complete comparison shows you side-by-side what has changed and why.
Overview: ABAP Cloud vs Classic ABAP
| Aspect | Classic ABAP | ABAP Cloud |
|---|---|---|
| Since when? | 1980s | 2019 (ABAP Environment) |
| Available in | SAP ECC, S/4HANA On-Prem | SAP BTP, S/4HANA Cloud |
| Development mode | All ABAP features | Released APIs only |
| UI technology | Dynpro, WebDynpro, Fiori | Fiori only |
| Deployment | On-Premise | Cloud & On-Premise |
| Upgrade stability | Often manual adjustments | Automatic (Clean Core) |
| Learning curve | Medium | Steep (many new concepts) |
In short: ABAP Cloud is the modern, cloud-ready variant of ABAP with stricter rules but better maintainability.
1. Syntax Comparison: Old vs. New
1.1 Data Declaration
Classic ABAP:
DATA lv_name TYPE string.DATA lv_count TYPE i.lv_name = 'Max Mustermann'.lv_count = 42.
DATA lt_customers TYPE TABLE OF ty_customer.DATA ls_customer TYPE ty_customer.ABAP Cloud:
" Inline declaration preferredDATA(lv_name) = 'Max Mustermann'.DATA(lv_count) = 42.
DATA(lt_customers) = VALUE ty_customer_table( ( id = 1 name = 'Max' ) ( id = 2 name = 'Anna' )).Difference: ABAP Cloud prefers inline declarations for shorter code.
1.2 String Operations
Classic ABAP:
DATA lv_full_name TYPE string.CONCATENATE lv_first_name lv_last_name INTO lv_full_name SEPARATED BY space.
" OrCONCATENATE 'Hello ' lv_name '!' INTO lv_greeting.ABAP Cloud:
" String TemplatesDATA(lv_full_name) = |{ lv_first_name } { lv_last_name }|.DATA(lv_greeting) = |Hello { lv_name }!|.
" With formattingDATA(lv_price) = |Price: { lv_amount CURRENCY = lv_currency }|.Difference: CONCATENATE is obsolete in ABAP Cloud. String templates are more modern and powerful.
1.3 Internal Tables
Classic ABAP:
DATA ls_customer TYPE ty_customer.
READ TABLE lt_customers INTO ls_customer WITH KEY id = lv_id.
IF sy-subrc = 0. " Customer found WRITE: ls_customer-name.ENDIF.
" Modify rowls_customer-name = 'New Name'.MODIFY TABLE lt_customers FROM ls_customer.ABAP Cloud:
" Table ExpressionTRY. DATA(ls_customer) = lt_customers[ id = lv_id ]. " Customer found cl_demo_output=>display( ls_customer-name ).
" Modify row directly lt_customers[ id = lv_id ]-name = 'New Name'.
CATCH cx_sy_itab_line_not_found. " Not foundENDTRY.
" Or: With OPTIONAL (no exception)DATA(ls_customer) = VALUE #( lt_customers[ id = lv_id ] OPTIONAL ).Difference: Table expressions are shorter and more modern, but require exception handling.
1.4 Control Structures
Classic ABAP:
IF lv_status = 'A'. lv_message = 'Active'.ELSEIF lv_status = 'I'. lv_message = 'Inactive'.ELSE. lv_message = 'Unknown'.ENDIF.
CASE lv_type. WHEN 'A'. lv_result = 'Type A'. WHEN 'B'. lv_result = 'Type B'. WHEN OTHERS. lv_result = 'Other type'.ENDCASE.ABAP Cloud:
" COND Expression (Inline IF)DATA(lv_message) = COND string( WHEN lv_status = 'A' THEN 'Active' WHEN lv_status = 'I' THEN 'Inactive' ELSE 'Unknown').
" SWITCH Expression (Inline CASE)DATA(lv_result) = SWITCH string( lv_type WHEN 'A' THEN 'Type A' WHEN 'B' THEN 'Type B' ELSE 'Other type').Difference: COND/SWITCH are functional (return values) instead of imperative.
1.5 Loops & Iterations
Classic ABAP:
DATA lv_total TYPE i VALUE 0.LOOP AT lt_orders INTO DATA(ls_order). lv_total = lv_total + ls_order-amount.ENDLOOP.
" Extract namesDATA lt_names TYPE TABLE OF string.DATA ls_name TYPE string.LOOP AT lt_customers INTO DATA(ls_customer). ls_name = ls_customer-name. APPEND ls_name TO lt_names.ENDLOOP.ABAP Cloud:
" REDUCE (for aggregations)DATA(lv_total) = REDUCE i( INIT sum = 0 FOR ls_order IN lt_orders NEXT sum = sum + ls_order-amount ).
" FOR Expression (for transformations)DATA(lt_names) = VALUE string_table( FOR ls_customer IN lt_customers ( ls_customer-name )).
" With filterDATA(lt_active_names) = VALUE string_table( FOR ls_cust IN lt_customers WHERE ( status = 'ACTIVE' ) ( ls_cust-name )).Difference: REDUCE/FOR are declarative and often more performant.
1.6 Database Access
Classic ABAP:
" SELECT * not recommended, but allowedSELECT * FROM mara INTO TABLE @DATA(lt_materials) WHERE mtart = 'FERT'.
" Without @-escaping (old syntax)SELECT matnr maktx FROM mara INTO TABLE lt_materials WHERE mtart = 'FERT'.ABAP Cloud:
" SELECT * FORBIDDEN in ABAP Cloud" Only Released CDS Views + Explicit fieldsSELECT Product, ProductDescription FROM I_Product INTO TABLE @DATA(lt_products) WHERE ProductType = 'FERT'.
" @-escaping is MANDATORYDifference:
SELECT *forbidden- Only Released APIs (CDS Views with Released status)
@-escaping mandatory
1.7 Subroutines (FORM/PERFORM)
Classic ABAP:
" Allowed in ClassicFORM calculate_total USING pv_amount TYPE p CHANGING pv_total TYPE p. pv_total = pv_amount * '1.19'.ENDFORM.
PERFORM calculate_total USING lv_amount CHANGING lv_total.ABAP Cloud:
" FORM/PERFORM FORBIDDEN" Only classes & methods
CLASS lcl_calculator DEFINITION. PUBLIC SECTION. CLASS-METHODS calculate_total IMPORTING iv_amount TYPE p RETURNING VALUE(rv_total) TYPE p.ENDCLASS.
CLASS lcl_calculator IMPLEMENTATION. METHOD calculate_total. rv_total = iv_amount * '1.19'. ENDMETHOD.ENDCLASS.
DATA(lv_total) = lcl_calculator=>calculate_total( lv_amount ).Difference: ABAP Cloud enforces object-oriented programming.
2. UI Development
Classic ABAP
Available Technologies:
- Dynpro (classic SAP GUI)
- WebDynpro ABAP
- SAP Fiori (with SAPUI5)
- BSP (Business Server Pages)
Dynpro Example:
" Screen 100 with MODULECALL SCREEN 100.
MODULE status_0100 OUTPUT. SET PF-STATUS 'MAIN'. SET TITLEBAR 'TITLE'.ENDMODULE.
MODULE user_command_0100 INPUT. CASE sy-ucomm. WHEN 'SAVE'. " Save WHEN 'BACK'. LEAVE TO SCREEN 0. ENDCASE.ENDMODULE.ABAP Cloud
Available Technologies:
- SAP Fiori (with SAPUI5 or Fiori Elements)
- Dynpro FORBIDDEN
- WebDynpro ABAP FORBIDDEN
Fiori Elements (RAP) Example:
" No UI code needed! Automatically generated from annotations
" Service Binding@EndUserText.label: 'Book Service'define service ZUI_BOOK_O4 { expose ZC_Book as Book;}
" Metadata Extension (UI layout)@UI.lineItem: [{ position: 10 }]@UI.identification: [{ position: 10 }]BookId;Difference: Dynpro is history. Fiori is the future (web-based, responsive).
3. Database Access & APIs
Classic ABAP
Access to:
- All SAP tables (MARA, VBAK, KNA1, etc.)
- All function modules
- All BAPIs
- All classes (including internal)
Example:
SELECT matnr maktx FROM mara INTO TABLE @DATA(lt_materials) WHERE mtart = 'FERT'.
CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL' EXPORTING material = lv_matnr IMPORTING material_general_data = ls_material.ABAP Cloud
Access to:
- Only Released APIs (CDS Views, classes with Released status)
- No direct table access to SAP tables
- Many old BAPIs not available
Example:
" Released CDS ViewSELECT Product, ProductDescription FROM I_Product INTO TABLE @DATA(lt_products).
" RAP/EML instead of BAPIREAD ENTITIES OF I_Product ENTITY Product ALL FIELDS WITH VALUE #( ( Product = lv_product_id ) ) RESULT DATA(lt_result).How to find Released APIs:
- ADT:
Ctrl+Shift+A→ Search with filter “API State: Released” - SAP API Business Hub: api.sap.com
- Released Objects: Green checkmark in ADT
Difference: ABAP Cloud has access restrictions for better upgrade stability.
4. RAP (RESTful ABAP Programming)
Classic ABAP
RAP available?
- Yes, but optional (from S/4HANA 2020)
- You can still use BAPIs, Dynpro, etc.
ABAP Cloud
RAP available?
- Main development model
- For transactional apps, RAP is the only way
RAP Components:
| Component | Purpose |
|---|---|
| CDS View | Data model |
| Behavior Definition (BDEF) | CRUD logic, actions, validations |
| Behavior Implementation (BIL) | Business logic in ABAP |
| Service Definition | Which entities are exposed? |
| Service Binding | OData Service (V2 or V4) |
Example - Managed Scenario:
managed implementation in class zbp_i_book unique;strict ( 2 );
define behavior for ZI_BOOK alias Bookpersistent table zbook_tab{ create; update; delete;
field ( readonly ) BookId; field ( numbering : managed ) BookId;
validation validateIsbn on save { field Isbn; } action markAsRead result [1] $self;}Difference: RAP is central in ABAP Cloud, optional in Classic ABAP.
5. Performance
Classic ABAP
Possible Performance Issues:
- SELECT in loops (common)
- No built-in optimizations
- Manual tuning required
Example Problem:
LOOP AT lt_customers INTO DATA(ls_customer). " SELECT in loop - very slow! SELECT SINGLE * FROM kna1 WHERE kunnr = ls_customer-id INTO @DATA(ls_detail).ENDLOOP.ABAP Cloud
Performance Advantages:
- CDS Views with automatic optimizations
- RAP Framework optimizes DB access
- Built-in caching
- EML batches operations automatically
Example Solution:
" One SELECT for all IDsSELECT FROM I_Customer FIELDS Customer, CustomerName FOR ALL ENTRIES IN @lt_customers WHERE Customer = @lt_customers-id INTO TABLE @DATA(lt_details).Difference: ABAP Cloud enforces best practices, Classic ABAP allows bad patterns.
6. Testing
Classic ABAP
Unit Testing:
- ABAP Unit available
- But often not used
- No Test Seam Framework
CLASS ltc_test DEFINITION FOR TESTING. PRIVATE SECTION. METHODS test_calculation FOR TESTING.ENDCLASS.
CLASS ltc_test IMPLEMENTATION. METHOD test_calculation. DATA(lv_result) = zcl_calculator=>calculate( 10 ). cl_abap_unit_assert=>assert_equals( act = lv_result exp = 12 ). ENDMETHOD.ENDCLASS.ABAP Cloud
Unit Testing:
- ABAP Unit recommended
- CDS Test Double Framework
- RAP Test Seams
CLASS ltc_test DEFINITION FOR TESTING. PRIVATE SECTION. CLASS-DATA environment TYPE REF TO if_cds_test_environment.
CLASS-METHODS class_setup. METHODS test_create_book FOR TESTING.ENDCLASS.
CLASS ltc_test IMPLEMENTATION. METHOD class_setup. environment = cl_cds_test_environment=>create_for_multiple_cds( i_for_entities = VALUE #( ( i_for_entity = 'ZI_BOOK' ) ) ). ENDMETHOD.
METHOD test_create_book. MODIFY ENTITIES OF zi_book ENTITY Book CREATE FROM VALUE #( ( %cid = 'B1' Title = 'Test' ) ). " Test assertions ENDMETHOD.ENDCLASS.Difference: ABAP Cloud has better testing tools and testing is culturally more important.
7. Deployment & DevOps
Classic ABAP
Deployment:
- Transports (DEV → QAS → PRD)
- Manual releases
- Little CI/CD
Version Control:
- abapGit optional
- Often no Git
ABAP Cloud
Deployment:
- Transports + seamless abapGit
- CI/CD Pipelines (ABAP Environment Pipelines)
- Continuous deployment possible
Version Control:
- abapGit recommended
- Git integration in ADT
Example CI/CD Pipeline:
# Azure DevOps / GitHub Actions- name: Run ABAP Unit Tests run: abap test --package ZBOOK
- name: Deploy to QAS run: abap deploy --target QAS
- name: Run Integration Tests run: abap integration-testDifference: ABAP Cloud is DevOps-friendlier.
8. When to Use Which Version?
Use Classic ABAP when:
- You have on-premise SAP ECC/S/4HANA
- Legacy code needs to be maintained
- Migration to ABAP Cloud (not yet) planned
- You need to work with Dynpro
- Short to medium-term projects (<5 years)
Example Scenarios:
- Maintenance of existing reports
- Quick customizations to standard code
- Projects with tight budget/time
Use ABAP Cloud when:
- Starting new development
- Cloud deployment planned (SAP BTP)
- Long-term maintainability important (>5 years)
- Following Clean Core strategy
- Modern development (RAP, Fiori)
Example Scenarios:
- New SAP Fiori apps
- S/4HANA Cloud projects
- Greenfield development
- SaaS applications on SAP BTP
9. Learning Curve
Classic ABAP
Learning Effort: Medium
Getting Started:
- ABAP basics (2-4 weeks)
- Internal tables, selects (2 weeks)
- Dynpro/reports (2-3 weeks)
- BAPIs, RFCs (1-2 weeks)
Total: ~3 months until productive
ABAP Cloud
Learning Effort: High
Getting Started:
- Modern ABAP syntax (2 weeks)
- CDS Views (3-4 weeks)
- RAP (6-8 weeks)
- SAP Fiori (4-6 weeks)
- Testing & DevOps (2 weeks)
Total: ~5-6 months until productive
However: Long-term better maintainability!
10. Migration: Classic → Cloud
Migration Path
Classic ABAP ↓Modernize (ABAP Cleaner, new syntax) ↓Identify Released APIs ↓ABAP Cloud-compliant new development ↓Step-by-step migration ↓ABAP Cloud ✓Tools:
- Custom Code Migration App (Fiori App)
- ABAP Test Cockpit (ATC Checks)
- ABAP Cleaner (syntax modernization)
See: ABAP Cloud Migration Guide
11. Costs
Classic ABAP
License Costs:
- On-premise license (one-time + maintenance)
- No cloud costs
Developer Costs:
- Average ABAP developer: €60-80k/year
ABAP Cloud
License Costs:
- SAP BTP: Pay-per-use (from ~€200/month)
- Or: S/4HANA Cloud (higher license costs)
Developer Costs:
- ABAP Cloud developer: €70-90k/year (higher demand)
Long-term: ABAP Cloud often cheaper through:
- Less maintenance effort
- Automatic upgrades
- Lower infrastructure costs (cloud)
12. Summary: Decision Matrix
| Criterion | Classic ABAP | ABAP Cloud | Winner |
|---|---|---|---|
| Entry barrier | Low | High | Classic |
| Long-term maintainability | Medium | High | Cloud |
| Performance | Good | Very good | Cloud |
| Upgrade stability | Low | Very high | Cloud |
| Flexibility | Very high | Medium | Classic |
| Cloud-ready | No | Yes | Cloud |
| UI modernity | Medium (Dynpro old) | High (Fiori only) | Cloud |
| Developer experience | Good | Very good (ADT) | Cloud |
| Community/resources | Very large | Growing | Classic |
| Future-proof | Medium | Very high | Cloud |
Conclusion:
- Short-term: Classic ABAP faster & more flexible
- Long-term: ABAP Cloud more maintainable & future-proof
Further Resources
On abapcloud.com:
- ABAP Cloud Migration Guide
- ABAP Cloud Developer Roadmap
- ABAP Cloud Cheat Sheet
- 10 Most Common ABAP Cloud Mistakes
- RAP Tutorial Series
External Resources:
Your Opinion?
- Do you develop with Classic ABAP or ABAP Cloud?
- Are you planning a migration?
- What do you miss in ABAP Cloud?
Share your experiences in the comments!
Good luck with your decision!