Listing 3.7  Quelltextteil des Programms ZPTB00_PERFORMANCE_TESTER
REPORT  zptb00_performance_tester.
PARAMETERS:
* KM of last travel
  p_km TYPE i.
DATA:
* Amount and runtime for form and function
  l_amount_form TYPE f,
  l_runtime_form TYPE i,
  l_amount_function TYPE f,
  l_runtime_function TYPE i.
* First initialize l_runtime_form, then measure 
* performance
GET RUN TIME FIELD l_runtime_form.
PERFORM calculate_travel_expens USING p_km CHANGING 
l_amount_form.
PERFORM calculate_travel_expens USING p_km CHANGING 
l_amount_form.
PERFORM calculate_travel_expens USING p_km CHANGING 
l_amount_form.
PERFORM calculate_travel_expens USING p_km CHANGING 
l_amount_form.
PERFORM calculate_travel_expens USING p_km CHANGING 
l_amount_form.
GET RUN TIME FIELD l_runtime_form.
* First initialize l_runtime_function, then measure 
* performance
GET RUN TIME FIELD l_runtime_function. 

GET RUN TIME FIELD l_runtime_function.
* Write performance results to screen
WRITE: /'Runtime of form     :', l_runtime_form,
       /'Runtime of function :', l_runtime_function.
WRITE: /'Result of form      :', l_amount_form,
       /'Result of function  :', l_amount_function.
FORM calculate_travel_expens
  USING
    i_km TYPE i
  CHANGING
    e_amount TYPE f.

  e_amount = i_km * '0.3'.
ENDFORM.                    "calculate_travel_expens