2009 Mar 31 4:14 AM
Dear All expert,
I am a fresh man of object oriented program, so I have not any idead of OOP.I would like to get some study way from your experience. What kind of way I should take to grasp OOP? Should I study the classes and their method one by one, then I can use them in my own program? All is there any other way.
Thanks for your help in advance!
BR Edward.
2009 Mar 31 4:56 AM
2009 Mar 31 6:13 AM
Hello Edward
One possible start (probably not the easiest one) could be a comparative study of different BAdI implementing classes. These classes frequently deal with business objects which have a generic structure:
- 1 Header and multiple items (e.g. purchase order, purchase requisition, etc.)
The Wiki entry [Purchase order item - cl_po_header_handle_mm|https://wiki.sdn.sap.com/wiki/display/ABAP/Purchaseorderitem-cl_po_header_handle_mm] shows you how to use a class in order to read (and work with) a purchase order.
Next search the SDN for forum posting related to the following BAdIs:
ME_PROCESS_PO_CUST (dealing with purchase orders)
ME_PROCESS_REQ_CUST (dealing with purchase requisitions)
If you have an IDES system available then you can try and implement these BAdIs and debug the interface methods. By comparing these two BAdIs you will see the similarities between them.
Another interesting "stand-alone" class (or interface) is IF_RECA_MESSAGE_LIST. This class can be used as message collector and allows you to create application logs. For a sample report have a look at my Wiki posting [Message Handling - Finding the Needle in the Haystack|https://wiki.sdn.sap.com/wiki/display/profile/2007/07/09/MessageHandling-FindingtheNeedleintheHaystack]
Other examples which you may find interesting are:
[Unified Access to All HR Infotypes|https://wiki.sdn.sap.com/wiki/display/Snippets/UnifiedAccesstoAllHR+Infotypes]
[Accessing the Inacessible - Local Classes within Global Classes|https://wiki.sdn.sap.com/wiki/display/ABAP/AccessingtheInacessible-LocalClasseswithinGlobalClasses]
Regards
Uwe
2009 Mar 31 8:07 AM
2009 Apr 01 9:25 AM
2009 Apr 01 3:18 PM
I'll suggest not directly delving into real time objects, but to first study some theory and understand it without regard to any specific language (of course, read and understand the examples in some language as you go along). This will not take a long time, and since you would be referring to examples as you study, you will have all the confidence to work on any OOPS language.
Once you get the basic understanding, create a few simple applications on your own, and only then dive into some simple real time objects.
Directly getting into some specific real requirements without a comprehensive theoretical understanding always leads to a fragmented learning and not the best level of confidence.
Regards,
Z
2009 Apr 02 7:10 AM
Hi
I would suggest you to work with OOPs programatically first(not SE24) and you will understand how it works.
And then try working in SE24.
2009 Apr 02 9:32 AM
Hi Edaward,
Based on your understanding, you try to design a simple class with 1/ 2 methods with little functionality(like add ,substract,multiply 2numbers) .
1.Create a Class Definition.
2. Create a Class Implementation.
3. Then create an object and Execute the methods with objects.
After Completing successfully, you try to use the same approach for real time scenarios by applying new oops concepts for each scenario to learn new things.
First try to learn how to apply all Class attributes and related types(public,private and protected).
Then go for applying oops concepts like inheritance,polymorphism,exceptions,events etc.,
by
Prasad GVK.
2009 Apr 02 7:18 PM
Hi,
first you study general OO Concept. like
Object
Aattribute - private, public, protected and difference between them.
Class.
Method- Constructor, static and instance method. how to implement method
Polymorphism
interface
Inheritance
Events
you better go through BC401 and BC404 and workout examples provided in the materials then you will get good understanding.
Regards,
Peranandam
2009 Apr 02 7:43 PM
My suggestion will be use transaction ABAPDOCU you can find separate node for abap objects, its has everything in it.
a®
2009 Apr 08 1:37 PM