Standard classes worth knowing — the CL_ABAP_* you will reach for¶
Level: 201 · working knowledge
Status: stub — the shelf is here; each entry wants a program.
One line: A short list of SAP-delivered classes that solve a problem you will otherwise solve worse — type description, code page conversion, timestamps, random numbers, ALV, JSON, HTTP, mail — with what each is for, so the search starts from a name rather than from the class browser.
The shelf¶
| Class | For | Page |
|---|---|---|
cl_abap_typedescr, cl_abap_structdescr, cl_abap_tabledescr, cl_abap_elemdescr |
RTTI: describe a type, list its components, build a new one | Dynamic programming |
cl_abap_conv_codepage, cl_abap_conv_in_ce=>uccp |
characters ↔ bytes; a character from its code point | Unicode and code pages |
cl_abap_char_utilities |
newline, horizontal_tab, cr_lf as constants |
File handling |
cl_abap_tstmp |
timestamp arithmetic and conversion | Dates and times |
cl_abap_math |
rounding-mode constants, min/max of types | Numeric functions |
cl_abap_random, cl_abap_random_int |
random numbers with a seed | — |
cl_abap_regex, cl_abap_matcher |
stateful regular expressions | Regular expressions |
cl_abap_dyn_prg |
escaping and whitelists for dynamic SQL and code | Security |
cl_abap_unit_assert, cl_abap_testdouble |
tests and doubles | ABAP Unit |
cl_salv_table |
ALV in five lines | ALV |
cl_demo_output |
quick output in ADT and SAP GUI, better than WRITE for development |
WRITE |
/ui2/cl_json, cl_sxml_string_writer, xco_cp_json |
JSON | JSON and XML |
cl_http_client, cl_web_http_client_manager |
HTTP out | HTTP client |
cl_bcs, cl_document_bcs |
Email from ABAP | |
cl_gui_frontend_services |
files and dialogs on the user's PC | File handling |
cl_bali_log |
the released application log | Application log |
cl_system_uuid |
GUIDs | — |
cl_abap_context_info |
user, date, time in ABAP Cloud, where sy fields are restricted |
ABAP Cloud |
xco_cp_* |
the XCO library: the cloud-era utility layer for strings, JSON, time, generation | ABAP Cloud |
Most of these are documented in the class itself (ADT: F2 on the name) and in the keyword documentation under ABAP → Classes. Note that abaplint in this repository cannot resolve any of them, so a snippet calling one is checked for syntax only — see Keywords.
What this page still needs¶
- [ ] one
snippets/program per row that has no page, starting withcl_abap_randomandcl_system_uuid - [ ] the released/unreleased status of each in ABAP Cloud, checked
- [ ] the XCO library as its own page, since it is large
See also¶
- Dynamic programming — the RTTI family
- ABAP Cloud — which of these are released
- Resources — where the class documentation lives