Sei sulla pagina 1di 10

Step-by-Step approach in creating a Function Module


Open SE37 transaction.

Go to Goto Function groups Create group.


Give the function group name and short text. And click on Save.


Save this function group as local object.


Then open the transaction se80 and select the Function group from the drop down list. Enter the
function group name. Press Enter.


Right click on ZSSR and press activate.


Then you will get the following screen. Press Enter.


Go to the transaction se37 again and click on create.


Now it will ask for the function group. Enter the function group and give the short text. Press Save.


Click on the Attributes tab and give the short text.

10. Click on the Import tab and enter the Parameter name, Type and Reference type of variables A and

11. Click on Export tab and enter the Parameter name, Type and reference type of RES.

12. Click on Exceptions tab and enter the Exception and short text for that exception.

13. Now click on the Source code tab and write the following lines as shown bellow.

14. Press syntax check button or Ctrl+F2.

15. Now press on Activate button or press Ctrl+F3.

16. Press Enter.

17. Now Press on Test button or Press F8.

18. Enter values for A and B. And press Execute or F8.

19. The following screen will be displayed with result.

20. If you enter A value as 5. it will throw exception.

21. Output with Exception.

22. Now create and enjoy more Function Modules.