2011 Apr 15 8:52 PM
Hi!
In ABAP OO it´s impossible use PERFORM command. I would like to organize code in BADI NOTIF_EVENT_SAVE (method has more than 2000 lines).
How can i do that? Create function modules? Has any way better?
2011 Apr 15 9:40 PM
You can create private methods in the same class for the modularization.
Regards,
Naimesh Patel
2011 Apr 15 9:40 PM
You can create private methods in the same class for the modularization.
Regards,
Naimesh Patel
2011 Apr 16 10:37 AM
If you want to use the code only inside the class, private method is the answer (or protected, if you want the method to be called by the inherited class in future). However, if you want to use the code outside the class (for example in a report), you should create the public method. The good practices suggest to avoid too long methods - instead of one big, it is better to create a number of small ones.
You can also create function module, and then call it in the method. You can call function modules inside methods.
2011 Apr 18 5:16 PM
Methods are the way to modularize OO routines. You can add methods to the BADI implementation by editing the Implementing Class in SE24 (You can find the 'Name of Implementing Class' in the Interface tab of SE19).