‎2008 Sep 02 8:44 AM
Hi gurus,
when i tried to copy the code from function module into report and execute it, it is giving some error message as
Error: components of classes declared using u201CCLASSLCL_TREE_EVENT_HANDLER
DEFINITION DEFERREDu201D can only be accessed after you have defined the class
(CLASS LCL_TREE_EVENT_HANDLER DEFINITION)..
i included the declarations include and forms include which are standards.
i copied the function module 'HR_CH_PERS_FILE' to get the employee infotype details in tree structure.
thank you..
‎2008 Sep 02 8:49 AM
Hi,
You must put the INCLUDE that contains the class object instantiation code (CREATE OBJECT) after the INCLUDE which contains the CLASS DEFINITION.
This error is coming due to the fact the your program is trying to create an instance of the class whose definition is not found at the time of the instantiation.
That is
Before you write
DATA obj TYPE REF TO cl_XXXxx.
CREATE OBJECT obj.
You need to have
CLASS cl_XXXxx DEFINITION.
ENDCLASS.
Best Regards,
Sesh
‎2008 Sep 19 9:25 AM