save test data for function module via debugger
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.
Background:
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.
How To:
In Debugger:
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
Any idea why it's not available in the Class Builder?
I also discovered that import parameters are truncated to 200 characters, which is way too short for, say, json or xml.
Hello Arto,
I have no idea. I also would like to have the feature to save test data for methods/classes.
Learned something new and very useful from this. Thank you for pointing out this feature.