Dear huang,
following links will be usefull.
https://help.sap.com/saphelp_nw04s/helpdata/en/56/14934259a5c66ae10000000a155106/content.htm
Needing Evidence on the Advantages of ABAP OO
Giving some usefull info from given link.
After an application has been developed, it has happened a few times that I've wanted to use the same logic (or very similarl) in a different context. By subclassing, I'm able to reuse what I've already developed, with little effort. All I've had to do is redefine one or two methods of the main class.
I often develop stuff that has to run on different versions of SAP. Subclassing here is very useful, as the subclass for ECC 6.0, for example, doesn't even have to pass syntax checking in 4.6c!
Another example.-
You have an application which can create a different CARS. For the OO design, you can create a super class LCL_CAR and than you can create subclasses LCL_SEDAN for Sedan, LCL_SPORTS for Sports car from this LCL_CAR Class. You can put all the common attributes of the cars in to the class LCL_CAR e.g. COLOR. You can create the car specific attribute in the subclass. E.g. ENGINE POWER in the LCL_SPORTS. Since your class LCL_SPORTS is a subclass of the LCL_CAR, you would all the protected attributes in the LCL_SPORTS class.
To do the same thing with the Class, you need to create separate FGs eg. ZFM_SPORTS, ZFM_SEDAN. You need to define all the attributes in both the FGs. Any new common attribute, than you need to add it into both FGs. More over you can't control the visibility of all the global data declared in the FG's Top include.
The good example (might be complex one) would be the SALV model. SAP has introduced an SALV model for ALV development. Up to release 640,
To create a Fullscreen ALV than you need to call the FM REUSE_ALV_GRID_DISPLAY
To create a List ALV, you need to call FM REUSE_ALV_LIST_DISPLAY
To create a OO ALV on the custom container, you need to create an instance of the object CL_GUI_ALV_GRID.
By introducing the SALV model, SAP has streamlined the interface to create the any type of the above listed ALVs by just creating the object of the class CL_SALV_TABLE. We don't need to worry about the different setting for the different ALVs e.g. Field catalog for the FM REUSE.. uses from the SLIS where as the field catalog for the CL_GUI_ALV_GRID would be LVC_T_FCAT type. If you use the CL_SALV_TABLE, you can the type of ALV display on the fly.
To see the so many instances of the same class or object, you can explore the attribute R_COLUMNS of class CL_SALV_TABLE which is type ref to class CL_SALV_COLUMNS_TABLE. This class has the attribute T_COLUMNS, which contains the actual reference of all the objects.
Run the report SALV_DEMO_TABLE_SIMPLE. Put a brekpoint on the statement cl_salv_table=>factory. Check the object GR_TABLE. See the attribute R_COLUMNS and try to explore the columns table.
Hope it helps.
Rigards,
Siddhesh Satghare.