![](https://sapported.com/wp-content/uploads/2019/09/How-to-debug-Smart-Forms-step02.png)
The function modules are very common used artefact in SAP. Despite the fact that most of the new development in classic ABAP is carried out with the object-oriented approach, there are still areas that cannot be implemented without the use of a functional module for example RFC and some types of extensions.
PREREQUISITES:
- Access to any SAP system based on either SAP Netweaver or ABAP Platform
- SAPGUI installed on your local PC
- Authorization to access SE37
- Developer key for system based on Netweaver
- ABAP Function Group (How to create ABAP Function Group)
Step 1. Go to transaction SE37 (ABAP Function Modules). Put “SE37” in the command field and hit Enter:
![](https://sapported.com/wp-content/uploads/2021/01/image-1.png)
Step 2. In Function Module field put name of function module for example “Z_FB_ADD“. Keep in mind that most of SAP ABAP artefacts need to starts with “Z” or “Y” letter:
![](https://sapported.com/wp-content/uploads/2021/01/image-37.png)
Step 3. Click on Create button:
![](https://sapported.com/wp-content/uploads/2021/01/image-38.png)
Step 4. In Create Function Module popup fill Function Group for example “Z_FG_ARITHMETIC“. You also need to fill Short Text which is just simple description of your function module:
![](https://sapported.com/wp-content/uploads/2021/01/image-39.png)
Step 5. Click on Save button:
![](https://sapported.com/wp-content/uploads/2021/01/image-40.png)
Step 6. Our function will multiply two integer. We need to create two Import parameters X and Y. Fill everything like this:
![](https://sapported.com/wp-content/uploads/2021/01/image-41.png)
Step 7. Go to Export tab and fill export parameters like following:
![](https://sapported.com/wp-content/uploads/2021/01/image-42.png)
Step 8. Now go to Source Code tab and put following code:
z = x * y.
In the end it should look like this:
![](https://sapported.com/wp-content/uploads/2021/01/image-43.png)
Step 9. Click on Save button and then on Activate button:
![](https://sapported.com/wp-content/uploads/2021/01/image-44.png)
Step 10. Out function is ready and active. Now we can test it. Click on Test button:
![](https://sapported.com/wp-content/uploads/2021/01/image-45.png)
Step 11. Fill both import parameters:
![](https://sapported.com/wp-content/uploads/2021/01/image-46.png)
Step 12. Click on Execute button and check value given in result parameter:
![](https://sapported.com/wp-content/uploads/2021/01/image-47.png)
The result should be as follow:
![](https://sapported.com/wp-content/uploads/2021/01/image-48.png)