This document describes how to save test data via debugger for function modules. There is already a similar document posted here:
https://wiki.scn.sap.com/wiki/display/CRM/Saving+test+data+with+New+ABAP+Debugger But I think, it is hard to find and in this document it looks like a CRM specific feature which is not the case.
It is often useful to reproduce the behaviour of function modules. It happens often that they are called very deep in call stack and reproduction can be very hard. Besides often you want to change e.g. import parameter (to test if one parameter setting is the reason) which is not possible in Debugger. For these reasons it is good to save test data for later use.
1. Click on tools symbol
2. Click on “save data as test data”
3. Enter a name
4. If you call the function module via SE37 and click on “test data directory” your new test data are displayed and can be used