SAP Classes and Methods



sap classes methods

SAP Classes Methods are much the same as classes within any other development language and offer you an object orientated way of developing your SAP application. If you are new to OO concepts then there are many resources available where you can try an learn about them. One of the best places to learn within an SAP environment is by taking the SAP ABAP objects online course. This is available on udemy and has almost all positive reviews and has be taken by nearly 5000 students including myself. 



But on a very simplistic how do I get a class/method to work in my code they are the similar to SAP function modules. The class is like the function group and the method is the actual function module that is called in order to perform the actual processing. 

The ABAP code is also quite similar, only real difference is that you also have to reference the class as well as the method name.


---Function Module: 
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING...

---Class/Method:
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING...

You will also notice like with the example GUI_DOWNLOAD that although SAP have converted many of there function modules into class methods all they do within the method is call the original function module. Here is a basic example and some good comments that summarise the issue people who do not use OO concepts have when trying to understand the benefits of object orientated concepts.


Popular SAP Classes 
Here are a few links to popular SAP class objects but easiest way to find the class you are looking for is to use the search functionality on this page. 

CL_ABAP_CHAR_UTILITIES 

CL_SALV_TABLE 

CL_GUI_FRONTEND_SERVICES 

Other SAP classes


Index list to available SAP Classes

CL_ESFSMP_PROPERTY_PROVIDER SAP Class
CL_ESFSMP_PROPERTY_PROVIDER is a standard SAP class available within R/3 SAP systems depending on your version and release level. Below is[...]
CL_MOBILE_SYSTEM_LOGIN SAP Class – Logon Page for Mobile Devices
CL_MOBILE_SYSTEM_LOGIN is a standard SAP object class available within R/3 SAP systems depending on your version and release level. Below[...]
ABAP Display web page
Using class method CL_ABAP_BROWSER => SHOW_URL to display a web site URL to the user. Below is the documentation, parameters[...]
Method search and it’s associated class
If you want to do a method search and it's associated class with SAP or even search for attributes within[...]