04-12-2007 5:05 AM
Hi Experts,
What is the use of LOAD keyword in OOPS.For Example in CLASS<class> DEFINITION LOAD.
What does the LOAD actually do.
Regards,
Arun.
04-12-2007 5:13 AM
Hi,
Check the documentation from the help.
CLASS class DEFINITION LOAD.
Effect
The compiler normally loads the description of a global class from the class library the first time you use the class in your program - in particular, when you use the class for the first time to specify the type of a reference variable. However, if the first access to a global class in a program is to its static components or in the definition of an event handler method , you must load it explicitly using the statement CLASS class DEFINITION LOAD. This variant has no corresponding ENDCLASS statement.
Example
CLASS CL_GUI_PICTURE DEFINITION LOAD.
CLASS C1 DEFINITION.
PUBLIC SECTION.
METHODS HANDLER FOR EVENT PICTURE_CLICK OF CL_GUI_PICTURE.
ENDCLASS.
CLASS C1 IMPLEMENTATION.
METHOD HANDLER.
...
ENDMETHOD.
ENDCLASS.
Thanks,
Naren