Methods
Quick answer
Understanding a method’s interface, its inputs, output and exceptions, is how you correctly call SAP and custom classes.
Key takeaways
- A method is a named operation on a class, with parameters (importing/exporting/changing/returning) and possible exceptions…
- View a class’s methods in SE24/ADT.
- Read each method’s parameters and exceptions to understand how to call it.
- Watch out: Guessing instead of using the reference tools.
What it is
A method is a named operation on a class, with parameters (importing/exporting/changing/returning) and possible exceptions (raising). Calling a method invokes that behaviour; RETURNING methods enable clean functional-style calls.
How to find/use it
- View a class’s methods in SE24/ADT.
- Read each method’s parameters and exceptions to understand how to call it.
- Prefer RETURNING for single results; check RAISING for error handling.
- Look for documented/released methods on public APIs.
Why it matters
Understanding a method’s interface, its inputs, output and exceptions, is how you correctly call SAP and custom classes. Well-designed methods (small, single-purpose, clear parameters) make code readable and reusable.
Common pitfalls
- Guessing instead of using the reference tools.
- Editing/using without understanding the object.
- Relying on memory for details you can look up.
Want to learn this properly?
Our live, instructor-led SAP Training covers this hands-on, with real projects and a certification path.
Check your understanding
Which statement is true of Methods?
- A. Calling a method invokes that behaviour; RETURNING methods enable clean functional-style calls.
- B. Keyboard shortcuts in SAP GUI let you perform common actions, save, back, enter, function keys, without…
- C. Linux is the primary platform for modern SAP, and the only supported OS for the SAP HANA database.
Show answer
A. Calling a method invokes that behaviour; RETURNING methods enable clean functional-style calls.
Covered in the “What it is” section of this lesson.
Which of these also applies to Methods?
- A. Incompatible kernel version preventing startup.
- B. Well-designed methods (small, single-purpose, clear parameters) make code readable and reusable.
- C. Account determination (OBYC) errors breaking goods movements.
Show answer
B. Well-designed methods (small, single-purpose, clear parameters) make code readable and reusable.
Covered in the “Why it matters” section of this lesson.
Which part of the Learn SAP curriculum covers Methods?
- A. SAP security
- B. SAP reference
- C. SAP architecture
Show answer
B. SAP reference
This lesson sits in the SAP reference section of the Learn SAP course.