You should use the test environment in the Function Builder to test new function modules before releasing them for general use. You can also use the test environment to examine functions written by other developers before calling these modules from within your own programs. The library's testing options let you determine if a function performs as it should and shows you if the module returns expected results. To run a test:
The Test Function Module screen appears. It displays all of the import and changing parameters of the function module.
Fill in values for the relevant import, changing, and tables parameters. To fill in single-field parameters, enter the value in the displayed field. To fill in table/ structure parameters, double-click on the parameter name.
The system runs the function module using your input and displays the values of the export parameters that result:
When you test a function module, the system displays any exceptions. The system also identifies the time required to execute the module in microseconds. This is an elapsed-time measurement. The measurement includes interrupt time as well as processing time. You should view this elapsed-time as an estimate only.
Other Test Options
The Function Builder contains more test options than simply running a function module. You can also run a test in the debugger or create a runtime analysis performance file for a function. To investigate a function module in debugging mode:
The system executes the function module in debugging mode. You can step through the function's code and use all the options offered within the Debugger
To test a function module's performance, select Runtime analysis (Transaction SE30) from the Test Environment for Function Modules screen. The system executes the function module and records the function's performance in a special performance data file. Select Eval.rtime analysis to display the results of the analysis.