Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Purpose of LOAD in OOPS

Former Member
0 Kudos

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.

1 REPLY 1

Former Member
0 Kudos

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