Appendices
Syntax cheat sheet, keywords (selection), important transaction codes, system fields (sy-*) reference, version history, learning resources and suggested study plan (12 weeks).
Appendices
44.1 Syntax cheat sheet 44.2 Keywords (selection) Declarations: DATA TYPES CONSTANTS STATICS FIELD-SYMBOLS CLASS-DATA TABLES PARAMETERS SELECT-OPTIONS RANGES(obsolete) FINAL. Control: IF ELSEIF ELSE ENDIF CASE WHEN OTHERS ENDCASE DO ENDDO WHILE ENDWHILE LOOP ENDLOOP AT ENDAT CHECK EXIT CONTINUE RETURN. Modularization: FORM PERFORM ENDFORM FUNCTION ENDFUNCTION CALL FUNCTION METHOD ENDMETHOD CALL METHOD MODULE ENDMODULE INCLUDE DEFINE END-OF-DEFINITION. OO: CLASS DEFINITION IMPLEMENTATION ENDCLASS INTERFACE ENDINTERFACE INTERFACES ALIASES INHERITING FROM ABSTRACT FINAL REDEFINITION PUBLIC PROTECTED PRIVATE SECTION FRIENDS CREATE EVENTS RAISE EVENT SET HANDLER ME SUPER NEW CAST. Tables: APPEND INSERT MODIFY DELETE READ TABLE SORT COLLECT CLEAR FREE REFRESH(obsolete) DESCRIBE. SQL: SELECT SINGLE FROM FIELDS WHERE INTO APPENDING GROUP BY HAVING ORDER BY UP TO ROWS FOR ALL ENTRIES JOIN UNION WITH INSERT UPDATE MODIFY DELETE COMMIT WORK ROLLBACK WORK OPEN CURSOR FETCH CLOSE CURSOR. Exceptions: TRY CATCH CLEANUP ENDTRY RAISE EXCEPTION THROW RETRY RESUME. Events (reports): LOAD-OF-PROGRAM INITIALIZATION AT SELECTION-SCREEN START-OF-SELECTION END-OF-SELECTION TOP-OF-PAGE END-OF-PAGE AT LINE-SELECTION AT USER-COMMAND. Strings: CONCATENATE SPLIT CONDENSE TRANSLATE REPLACE FIND SHIFT OVERLAY. Dynamic: ASSIGN CREATE DATA CREATE OBJECT GET REFERENCE UNASSIGN. RAP/EML: READ ENTITIES MODIFY ENTITIES COMMIT ENTITIES ROLLBACK ENTITIES GET PERMISSIONS SET LOCKS RAISE ENTITY EVENT IN LOCAL MODE. Other: AUTHORITY-CHECK MESSAGE SUBMIT CALL TRANSACTION LEAVE CALL SCREEN SET SCREEN WRITE ULINE SKIP NEW-LINE FORMAT OPEN DATASET TRANSFER READ DATASET CLOSE DATASET GET TIME STAMP CONVERT TIME STAMP WAIT.
44.3 Important transaction codes Transport Management System BAdI definition / implementation Repository Information System Table maintenance generator Number range objects SQL / performance trace Define / monitor jobs Last failed authorization check IDoc display / list IDoc test tool IDoc types / segments Business Object Builder Adobe Form Builder Gateway Service Builder Activate OData V2 services OData V4 service groups Gateway error log Application server directories ABAP Test Cockpit Customizing (IMG) Transport Organizer tools 44.4 System fields (sy-*) reference
Return code of the last statement (0 = success) Current row index in table loops / READ TABLE Loop counter in DO / WHILE
Rows processed by the last ABAP SQL statement sy-datum / sy-uzeit Application server date / time sy-datlo / sy-timlo / sy-zonlo User's local date / time / time zone System ID (e.g. DEV) Application server host name sy-repid / sy-cprog Current program / calling program Current transaction code Function code (user command) Current screen number X if running in background
sy-msgid, sy-msgty, sy-msgno, sy-msgv1…sy-msgv4 Last message details
Offset found by string comparison operators Index of the current list level sy-lilli / sy-lisel Selected list line number / content sy-pagno / sy-linno Current list page / line Rows in table (set by DESCRIBE TABLE) Alphabet constant ABC…Z
Treat system fields as read-only. In ABAP Cloud, use CL_ABAP_CONTEXT_INFO and XCO instead of most date/user fields.
44.5 Version history Key language features Function modules, logical databases, ALV basics ABAP Objects, class-based UI controls
Class-based exceptions, BSP, Unicode support, shared objects (6.40)
New debugger, enhancement framework, new BAdIs, ABAP Unit (since 6.40)
String templates, string functions, secondary keys, DECFLOAT
Inline declarations, constructor operators (NEW VALUE CONV CAST REF COND SWITCH CORRESPONDING REDUCE FILTER), table expressions, FOR, new Open SQL syntax with @, CDS views, AMDP
IS INSTANCE OF, CASE TYPE OF, int8, SQL expressions extended, UNION, CDS table functions
Enumerations, CTEs (WITH), CROSS JOIN, interface DEFAULT
Selecting from internal tables, RAISE EXCEPTION NEW, virtual sorting
ABAP SQL renamed, += operators, utclong, window functions, RAP foundations
CDS view entities, PCRE, RAP enhancements, INTERSECT/EXCEPT
FINAL( ) inline, ABAP Cloud language version, RAP business events, CDS hierarchy and table entity work
2023–2025 releases (S/4HANA 2023/2025, BTP continuous) RAP extensibility and background processing (bgPF), released API growth, clean-core levels, ABAP AI capabilities in ADT (BTP ABAP Environment receives features quarterly; on-premise ABAP Platform versions follow S/4HANA releases.) 44.6 Learning resources Official (free):
ABAP Keyword Documentation (F1 in the editor; help.sap.com) — the definitive language reference
SAP Learning (learning.sap.com) — free learning journeys: "Acquiring Core ABAP Skills", "Developing with ABAP Cloud", RAP
SAP Developers tutorials (developers.sap.com) — BTP trial, RAP, CDS missions
SAP Community (community.sap.com) — blogs and Q&A; the ABAP Development group
SAP ABAP cheat sheets on GitHub (SAP-samples/abap-cheat-sheets) — executable examples of every topic
Clean ABAP style guide (github.com/SAP/styleguides) RAP sample flight model /DMO/ (github.com/SAP/abap-platform-refscen-flight) openSAP / SAP Learning courses on ABAP Cloud and S/4HANA extensibility
*ABAP Objects: ABAP Programming in SAP NetWeaver* — Keller & Krüger *Complete ABAP* — Kiran Bandari *ABAP to the Future* — Paul Hardy
*ABAP RESTful Application Programming Model: The Comprehensive Guide* — Lutz Baumbusch et al.
*Core Data Services for ABAP* — Renzo Colle et al.
*Clean ABAP: A Style Guide for Developers* — Klaus Haeuptle et al.
*ABAP Development for SAP HANA* — Schneider, Westenberger, Gahm
*Test-Driven Development with ABAP Objects* — Winfried Schwarzmann
Open source & tools: abapGit, abap2xlsx, ABAP Cleaner, abapLint, ajson, ABAP Logger (all on GitHub; see dotabap.org).
Community: SAP Community, SAP Inside Track / SAP Stammtisch events, Reddit r/SAP and r/abap, Stack Overflow [abap] tag, SAP TechEd recordings.
44.7 Suggested study plan (12 weeks) SAP architecture, landscape, tools, first programs (SAP GUI and ADT)
Data types, DDIC objects, operators and expressions Strings, control flow — Part I exercises
Internal tables classic and modern — Capstone 1 Modularization, function modules, ABAP SQL, LUW and locking
Reports, selection screens, ALV, dialog basics — Capstone 2 ABAP Objects, patterns, exceptions — Part II exercises, Capstone 3
Field symbols, RTTS, enhancements, BAPIs/RFC, IDocs — Capstone 4
Files, forms, jobs, authorizations, performance — Capstone 5
CDS, AMDP, RAP, OData and Fiori elements — Capstone 6 ABAP Cloud, clean core, ABAP Unit — Capstone 7
Debugging, ATC/Clean ABAP, abapGit/gCTS, best practices — Part III exercises, Capstone 8 🎓 Final Words
You've traveled from WRITE 'Hello, World!' through internal tables, ABAP SQL, ABAP Objects, BAPIs, and IDocs to CDS, RAP, and ABAP Cloud. ABAP is a language with a long memory: you'll read 1998 code in the morning and build a draft-enabled RAP service in the afternoon, so learn both worlds and always steer new work toward the modern, clean-core path. Get a trial system, run the SAP ABAP cheat sheets, build the capstone projects, keep the keyword documentation one F1 away, and share what you learn with the SAP community. Happy coding! 🚀
" Declarations
DATA lv_i TYPE i. DATA(lv_x) = 42. FINAL(lv_c) = `const`.
TYPES ty_t TYPE STANDARD TABLE OF zorders WITH EMPTY KEY.
CONSTANTS gc_max TYPE i VALUE 10. FIELD-SYMBOLS <fs> TYPE any.
" Expressions
lv_s = |Hello { lv_name WIDTH = 10 } { sy-datum DATE = ISO }|.
lv_r = COND #( WHEN a > b THEN a ELSE b ).
lv_d = SWITCH #( lv_k WHEN 1 THEN `one` ELSE `other` ).
lv_b = xsdbool( lv_x > 0 ).
lo_o = NEW zcl_x( ). lo_s = CAST zcl_sub( lo_o ).
lv_n = CONV i( '42' ). lr_r = REF #( lv_i ).
" Internal tables
lt_t = VALUE #( ( id = 1 ) ( id = 2 ) ).
ls_r = lt_t[ id = 1 ]. ls_r = VALUE #( lt_t[ id = 9 ] OPTIONAL ).
IF line_exists( lt_t[ id = 1 ] ). ENDIF.
lt_u = VALUE #( FOR w IN lt_t WHERE ( id > 1 ) ( w ) ).
lv_sum = REDUCE i( INIT s = 0 FOR w IN lt_t NEXT s = s + w-id ).
lt_f = FILTER #( lt_sorted WHERE status = 'O' ).
lt_m = CORRESPONDING #( lt_t MAPPING target = source ).
LOOP AT lt_t ASSIGNING FIELD-SYMBOL(<w>) GROUP BY <w>-customer INTO DATA(grp). ENDLOOP.
INSERT ls_r INTO TABLE lt_t. MODIFY TABLE lt_t FROM ls_r. DELETE lt_t WHERE id = 1.
SORT lt_t BY id DESCENDING. DATA(l
…