This is the second (and final) part of a quick reference for the programming language ABAP. Extending the first part, this one is primarily focusing on ABAP’s object oriented programming features, like classes, OOP-exceptions, and inheritance.
The first part can be found here: ABAP Quick Reference
Encapsulation using function groups
FUNCTION-POOL s_person. * age is a global variable in the function-pool DATA: age TYPE i. FUNCTION inc_age. ADD 1 to age. ENDFUNCTION.
This is the first of two posts, providing a quick reference for ABAP developers. It primarily consists of code examples and doesn’t include major object oriented programming features, introduced in newer language versions.
The second part of this series, targeting OOP related topics, can be found here: ABAP Objects Quick Reference
ABAP (Advanced Business Application Programming) is a high-level programming language created by the German software company SAP SE. It is currently positioned, alongside Java, as the language for programming the SAP Application Server, which is part of the NetWeaver platform for building business applications.
Wikipedia ABAP article
Basic program structure
PARAMETERS pa_num TYPE i. * declare a variable DATA gv_output TYPE i. * assign value from pa_num to gv_output MOVE pa_num TO gv_output. WRITE: 'Input value', gv_output. NEW-LINE. " this is an inline comment WRITE 'Done'.