‎2008 Mar 19 7:11 AM
Hi friends,
when we are using gobal class why should we write DEFINITION LOAD at the end of declaration?
‎2008 Mar 19 8:49 AM
Hai Reddy,
CLASS class DEFINITION LOAD
The compiler normally loads the description of a global class from the class library the first time you use the class in your program .
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.
Regards.
Eshwar.
‎2008 Mar 19 7:25 AM
CLASS <classname> DEFINITION LOAD.The variant with the LOAD addition loads a global class class from the Class Library. This statement was needed before Release 6.20 if you wanted to access one of the static components of class from within a program, or to declare an event handler for class before class had been loaded automatically. From Release 6.20 onwards, the LOAD addition is only needed if the compilation of an ABAP program fails because it includes recursive accesses of a globa l class. In such cases, you may be able to make the program compilable by explicitly loading the class before recursion.
Hope this helps.
Thanks,
Balaji
‎2008 Mar 19 8:49 AM
Hai Reddy,
CLASS class DEFINITION LOAD
The compiler normally loads the description of a global class from the class library the first time you use the class in your program .
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.
Regards.
Eshwar.