10-14-2008 4:45 PM
Hi,
I use new enhancement framework (sap 7.0). Today I discovered the existence of pre-methods, but I don't understand in what situation we should use them, as "usual" source enhancements at the top of a method are equivalent, and so they are sufficient.
The only important difference I saw is that the pre-methods can only use public attributes and methods, whileas source enhancements can work also on private and protected members.
So, do you know what they are for?
thx a lot!
sandra
06-20-2009 8:24 PM
I want to share my experience :
-- For both, we can add several implementations, but when we use pre-methods (or post-methods), we only see the code of one implementation at a time (moreover we don't see the main method code in the meantime), whileas implicit enhancement points are all displayed along with the main method code.
-- With 7.0, we can't use Pretty printer with implicit enhancement points, but we can with pre-methods (or post-methods)
Edited by: Sandra Rossi on Nov 26, 2009 1:12 PM below
-- As of 7.01 (but not in 7.0) there is a difference between implicit enhancement option at the end of a method AND the post-method : if a CHECK, EXIT or RETURN occurs in the method, the post method will be executed while the implicit enhancement option won't (see Note 1083387 - Execution of post enhancement methods). In 7.0 both implicit enhancement option at endmethod and the post-method were not executed in that situation.
11-29-2008 5:49 AM
06-20-2009 8:24 PM
I want to share my experience :
-- For both, we can add several implementations, but when we use pre-methods (or post-methods), we only see the code of one implementation at a time (moreover we don't see the main method code in the meantime), whileas implicit enhancement points are all displayed along with the main method code.
-- With 7.0, we can't use Pretty printer with implicit enhancement points, but we can with pre-methods (or post-methods)
Edited by: Sandra Rossi on Nov 26, 2009 1:12 PM below
-- As of 7.01 (but not in 7.0) there is a difference between implicit enhancement option at the end of a method AND the post-method : if a CHECK, EXIT or RETURN occurs in the method, the post method will be executed while the implicit enhancement option won't (see Note 1083387 - Execution of post enhancement methods). In 7.0 both implicit enhancement option at endmethod and the post-method were not executed in that situation.