2006 Aug 31 1:01 PM
Hi all,
We have a report written in general ABAP.Now we would like to convert the same to Object oriented.what would be the best practice?
BR,
Disha.
Hi all,
We have a report written in general ABAP.Now we would like to convert the same to Object oriented.what would be the best practice?
BR,
Disha.
2006 Aug 31 1:03 PM
you can use local or global classes to do the same,
if its an ALV report u can create a container , and use the class CL_GUI_ALV_GRID
2012 Jun 01 12:40 PM
2006 Aug 31 1:09 PM
Hi,
One more query....Is there any tool by means of which we can convert existing general ABAP programs to Object Oriented which includes dialog programming?
BR,
Disha.
2006 Aug 31 1:12 PM
I dont think there is any such tool.. you will have to re-write the program in the new design.. or replace any function calls in the current program with methods etc..
~Suresh
2006 Aug 31 1:15 PM
Hi,
Can you give me some example for calling a FM with an object oriented approach?
BR,
Disha.
2006 Aug 31 1:19 PM
in object oriented we use only methods i guess instead of FMs
CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = WA_LAYOUT
CHANGING
IT_FIELDCATALOG = IT_FIELDCAT_WRT_OFF
IT_OUTTAB = IT_WRT_OFF_FLDS[].
2006 Aug 31 8:01 PM
Hello Disha
I believe that the best starting point for this conversion is the requirements document for this report.
Read the document carefully and see if you can identify specific "business objects".
Each of these "business objects" may become an own class.
Very important: if, for example, your report is dealing with lots of invoices do NOT care about the quantity but think exclusively about ONE "invoice object".
Next identify for each object the required methods.
Finally, compose your objects together. For this you will probably need another class.
I can give you an example of a "report" I have written recently:
This "report" deals "Actual Assessment Cycles" (transaction KSU2). Because it was a dialog I created three classes: controller class, model class and view class (MVC architecture). I had about six different classes (for objects "CATS data", "employee", "Cycle", "Exceptions",...) that I composed together into the model instance (which should hold the buinsess logic). The view instance contained the controls for display (three ALV lists) and the controller instance was responsible for handling the user interactions.
A final remark: There are only rare occasions where we should use local classes. In general, create global classes (even if nobody else will use them) because the transparency is much better than with local classes (especially if the classes become bigger and bigger).
Hope I could give you some ideas.
Regards
Uwe
PS: It's worthwhile doing this shift from classical ABAP to ABAP-OO.
2006 Sep 01 8:12 AM
2006 Sep 01 8:28 AM
Hi all,
A very simple query:In OOPS,how do i call the BAPI "BAPI_CUSTOMERRETURN_CREATE"?
BR,
Disha.
2006 Sep 04 8:59 AM