
The Coverage API stores raw data for calculating code coverage in the database. It is a good idea to delete this data once you have calculated the coverage statistics that you need. If you do not explicitly delete the raw data, then it is deleted automatically at the end of the retention interval.
Use method IF_SCV_MEASUREMENT->FINALIZE to delete the raw data of a measurement.
DATA measurement TYPE REF TO if_scv_measurement.
* Discard the raw data of the measurement
measurement->finalize( ).
Once you have finalized data, you can no longer calculate new code coverage results. Example: You want to add branch coverage to the results that you have calculated for a program. You can add this metric only as long as you still have the raw data.
After you finalize, you also cannot merge measurements to aggregate them. Merging measurements requires the raw data of the measurements.
This section finishes the tutorial for measuring code coverage with the Coverage API. You can continue to Tutorial: Working with a Measurement Series.
Here is the complete tutorial program.