Skip to Content
0
Former Member
Mar 29, 2010 at 02:06 PM

Access to local class, error in code check

1108 Views

Hi experts,

I got a report with the following includes

INCLUDE ztest_top. "top include

INCLUDE ztest_c01. "local class

INCLUDE ztest_e01. "events

INCLUDE ztest_f01. "functions

In my top include, I define a reference variable of my local class lcl_test defined in the c01 include. Therefore I need the

CLASS lcl_test DEFINITION DEFERRED.

line in my top include.

So far so good.

In my f01 include I got a form (called from e01 include), where I create my object. If I check my code now, I get an error(!) message saying

components of classes declared using  "CLASS LCL_TEST DEFINITION DEFERRED" can only be accessed after you have defined the class (CLASS LCL_TEST DEFINITION)

Althought it's an error message, I can activate the program and run it without getting any errors. If I check it again afterwards, the errors show up again.

I don't really get this, the class definition and the implementation are in the c01 include, so the form in the f01 should know the class, shouldn't it?

Can anyone explain this to me?

Thanks in advance!

Regards,

Tobi