10-23-2006 10:36 AM
Hello everybody,
can someone please navigate me to some "real example" of using abap objects?
I went through demos in sap (I am using SAP R/3 4.6C) in <i>transaction ABAPDOCU, I have a book Horst Keller: Abap Objects (where partially the object orientation is written), I am reading articles in SAP professional journal or on web www.erpsapgenie.com, etc.
This is all nice, but no real example can I find.
What I mean with real example:
For example report, where I select data from database ("select *.." or "get ..." etc.), put this data to internal table, maintenance these data, output these data.
Or: in dialog programming write simple dialog, get data from PBO/PAI, put to into it, write data to database table, etc.
I have tryed the first case: simple, but meaningfull report, and I start to struggle with problems - if I will have internal table it should be variable of given class, and the table will be in interfase? Or it should be in some "global class main" - but - it is recomended to have as possible protected/private data - so if I will have global data it is worse programming behaviour the to use old procedural approach...
So generally, WHERE are some examples, where all standard behaviour of procedural programming is shown? - like
<i>- put data to internal table/get if from it,
- communication with dialog modules/calling selection screen,
<i>- open text file in present. server, </i>
<i>- preparing data for batch input processing, </i>
<i>- exist abap objects equivalent of logical databases or (we, application programmers) have to write it by ourselves? </i>
<i>- where are some real programs in R/3 4.6C, which are written fully object oriented? (but please not in HR module )</i>
<i>- etc.</i></i></i>
Are these things available to use in version R/3 4.6C?
Thanks a lot,
Alexander Talac.
10-23-2006 11:06 PM
Hi Alexander,
did you read Igor's blogs?
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/28520">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/28520</a>
They show OO at its best and all of them contain real code.
cheers
Thomas
10-23-2006 10:40 AM
Hi,
OOPS ALV links are as below...Check them,if they are useful,kindly reward points by clicking the star on the left of reply.
OOPS ALV
OOPS - Events.
Editable ALV
Tree
TabStrip
Multigrid
Check this for basic concepts of OOPS
Tabstrip
Editable ALV
Tree
http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
General Tutorial for OOPS
10-23-2006 1:52 PM
Hi,
the link to "general oop" is not valit (?).
I was asking for something a little bit different - not topics of how to use Controls - I use them already, and they can be used also in procedural programming. But how to write COMPLETELY OOP programs. Everywhere a lot of "tutorial" programs, not above mentioned real examples.
How the internal tables are maintaned in OOP, how should be written correctly communication between objects, etc. But real complete code, no just a few rows, etc. or powerpoint tutorial of basic syntax.....
thank you,
Alex.
10-23-2006 11:06 PM
Hi Alexander,
did you read Igor's blogs?
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/28520">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/28520</a>
They show OO at its best and all of them contain real code.
cheers
Thomas
10-24-2006 5:45 AM
Looks like you are interested more in the programming style and conventions than creating the classes. If you havent already done, in SE24 do a wildcard search on CL* and there are ton's of standard classes which might help you in what you are trying to accomplish.
hith
Sunil Achyut
10-24-2006 12:13 PM
Thank you for your answers,
I will look for patterns and standard objects, whether these help to understand how to put to life my future oop abap programs.
Alex.