Does anyone know if there is a setting for allowing or not allowing the direct access to components of global classes in ABAP OO?
The same source code on one machine (WAS 6.20 SP25) works without any problems and generates syntax error on another one with the same release and SP. We have just got a new test environment which for soem reason doesn't accept the source code form DEV system.
The error message:
Direct access to components of the global class /SAPDII/CL_VMS_ACTION
is not possible (CLASS /SAPDII/CL_VMS_ACTION DEFINITION LOAD statement is missing).
P.S. Selbstverstaendlich jede Antwort in DE oder EN ist gern gesehen
adding this statement is an obvious solution ... but, the whole application in DEV is written without it and it works. Now after transporting the development to TST wthe problem occured.
We would have to trace every possible place in DEV, where we would have to add it, whiche is a considerable effort.
I'm sure the CLASS /SAPDII/CL_VMS_ACTION DEFINITION LOAD statement exists in the DEV system. May be it's in an include, and the other system still uses an older version of this include.
I suggest you do a global search for CL_VMS_ACTION (just in case the / in the prefix is causing trouble) in the source code of your main program.
I'm sure there's a CLASS /SAPDII/CL_VMS_ACTION DEFINITION LOAD statement somewhere.
(If the text search doesn't find this statement, may be it's included in a macro definition ...)
It can't be, because the TST is build on transports from DEV. So the source code should be the same.
It's not only CL_VMS_ACTION which caused this problem. In any place where we used parameters from global classes in DEV we had the same problem. We have already solved it by analyzing the code and adjusting it accordingly (adding the DEFINITION LOAD) in DEV and transporting to TST. We had like 30 occurences for about 10 classes (SAP standard and Custom ones).
I still don't know why TST behaves different, but at least we have a working application.