Show TOC

 Testing Function ModulesLocate this document in the navigation structure

Use

You use this procedure to test new function modules before releasing them or to examine function modules written by other developers before using these modules in your programs.

Procedure
  1. In the Object Navigator (transaction SE80), open the function module you want to test.
  2. In the application toolbar, choose the Test/Execute pushbutton.

    The Test Function Module: Initial Screen appears. It displays all of the import and changing parameters of the function module.

  3. Fill in values for the relevant IMPORT, CHANGING, and TABLES parameters you want to test.
  4. Choose Execute.

    The system runs the function module using your input and displays the values of the export parameters.

    Note

    When you test a function module, the system displays all exceptions. It also calculates the time required to execute the module in microseconds.

Other Test Options

You can also run a test in the ABAP Debugger or create a runtime analysis performance file for a function.

To examine a function module in debugging mode:

  1. In the application toolbar, choose the Test/Execute pushbutton.
  2. Specify the data you want to transfer from your program to the function module.
  3. In the toolbar, choose the Debugging pushbutton.

    The system executes the function module in debugging mode. You can step through the code and use all options offered in the ABAP Debugger

To test the performance of a function module:

  1. Choose Function Modules → Runtime analysis (transaction SE30).

    The system executes the function module and records the performance function in a performance data file.

  2. To display the results of the analysis, choose Eval. rtime analysis.