‎2007 Aug 16 11:58 AM
‎2007 Aug 16 12:25 PM
Hi
It can be useful in making the friendhip with other classes.
using the friendhip u can access even the private components oi that class.
reward points if it is useful.
Regards,
Satish.
‎2007 Aug 16 12:39 PM
Hi,
The Statement
class: lcl_locl type ref to lcl_local_class DEFINITION DEFERRED.
In general, you define and use a class within the same context. A context is the common environment of a set of classes and interfaces, for example, the set of local classes in a program. However, you may need to refer to a class using the REF TO addition before it has been defined (for example, if two classes refer to each other). In this case, you can declare the class before you define it using the variant CLASS class DEFINITION DEFERRED.
Hope that Helps
Anirban M.
‎2007 Aug 16 1:32 PM
use of differed is you can use the class before you implemeted
‎2007 Aug 16 2:04 PM
Actually it's simple.
In Plain English
If you code say this at the start of your program
CLASS LCL_HANDLE_EVENTS DEFINITION DEFERRED.
You can then in your DATA section code this before you have defined or loaded the CLASS LCL_HANDLE_EVENTS .
DATA: GR_EVENTS TYPE REF TO LCL_HANDLE_EVENTS,
Normally if the class hasn't yet been defined or loaded this statement would give you a syntax error.
You often need these type of variables referring to a class that you haven't defined or loaded yet.
Cheers
jimbo
‎2007 Aug 16 2:59 PM
Hi,
Look at this links:
<a href="https://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3e59b790-0201-0010-88aa-bc8a7f95f6fb">Why use ABAP Objects</a>
<a href="https://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/37c5db90-0201-0010-3a9b-d0a5288f3c15">Eight Reasons Why Every ABAP Developer Should Give ABAP Objects a Second Look</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2503f09c-0801-0010-dc89-80bab376e4b8">Object Oriented ABAP - Local and Global classes</a>
For more informations look at:
<a href="http://https://wiki.sdn.sap.com/wiki/display/ABAP/ABAPObjectsGetting+Started">ABAP Objects Getting Started</a>
<a href="/people/dirk.feeken/blog/2007/07/06/abap-trial-version-for-newbies-part-17--your-first-abap-object Trial Version for Newbies: Part 17 - Your first ABAP Object</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf">ABAP Code Sample for Objects</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47">ABAP Code Sample to Learn Basic Concept of Object-Oriented Programming</a>
<a href="https://media.sdn.sap.com/public/eclasses/teched04/ABAP151_files/Default.htm#nopreload=1">ABAP Objects for Java Developers</a>
<a href="https://wiki.sdn.sap.com/wiki/display/ABAP/ABAP+Objects">ABAP Objects</a>
Regards.
Marcelo Ramos