‎2009 Oct 08 5:59 AM
Hi friends,
am working on module pool program i want to use oops concept in moduel pool.can any body give me an example in
module pool with oops .
Thanks in advance,
sai.
‎2009 Oct 08 10:38 AM
Refer [OO ABAP Dynpro Programming|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID1499581750DB00846827574872700296End?blog=/pub/wlg/2322]
Regards
Marcin
‎2009 Oct 28 3:38 PM
Hello,
we have uses ABAP OO and Classic Dypros in our current projekt a lot.
It turned out to be the best way to it like this:
1. Create your Dynpro
2. Create an Interface that corresponds only to that Dynpro.
3. In the Modules of the dynpro you only call Methods from that interface created above, also all checks of Dynprofields etc should be handled in the Implelmentation of the methods. so you do like that:
Module set_vbeln.
gi_dynp_class->set_vbeln( gs_sd-vbeln ).
endmodul.gi_dynp_class is from type of your interface.
4. Create an application class that implements all the methods of the interface with the logic needed. Using inheritance you can easily reuse the the Dynpro in different contexts with different Application classes behind it.
5. In PBO of the dynpro you have to make sure that the the variable gi_dynp_class is bound. So you will cast your application class instance to it:
gi_dynp_class ?= gi_app_class.
The application class must be instanciates at the beginning of the program before the dynpro is used.
As a class can implement several interface you can enable you application class for as many dynpros as you want to.
Hope that helps a bit ...
Greetings from Hamburg