SAP / SAP Beginner (0 to 2 yrs) Interview questions
What is the difference between ABAP and ABAP Objects?
Classical ABAP refers to the original, procedural style of writing ABAP programs — a sequence of
statements, subroutines (FORM/PERFORM), and event blocks, without object-oriented
constructs. ABAP Objects is the object-oriented extension to the language, introduced later, adding
classes, interfaces, inheritance, and polymorphism — the same OOP concepts found in languages like Java.
" classical procedural style FORM calculate_total USING iv_price TYPE p CHANGING cv_total TYPE p. cv_total = cv_total + iv_price. ENDFORM. " ABAP Objects (OOP) style CLASS lcl_calculator DEFINITION. PUBLIC SECTION. METHODS: add_price IMPORTING iv_price TYPE p. ENDCLASS.
Modern SAP development strongly favors ABAP Objects for new code, since it brings the same maintainability and reusability benefits object orientation provides in any language, but classical procedural ABAP still exists throughout many older, existing SAP systems and remains fully supported.
More Related questions...