08-05-2005 11:56 AM
Hi all,
I have a global class (created in SE24 - Class builder) and need to use constants and types in its methods, that are defined in an include.
In functional development we just put a "INCLUDE includename." in the function group top-include.
Where can I put that include in the global class?
I tried the "local types" source file, but it doesnt accept the constant definitions inside my include.
08-05-2005 12:03 PM
Hi,
Create a type pool with your types and constants and enter its name in the property screen of the class.
Svetlin
08-05-2005 12:03 PM
Hi,
Create a type pool with your types and constants and enter its name in the property screen of the class.
Svetlin
08-05-2005 2:04 PM
Hello,
you can add an include to a class.
Press button (Local) Types (CTRL+F5).
Christian
08-14-2005 12:02 PM
As I wrote in my original post, I tried that, but it failed due to constants being defined in the include I want to add.
08-14-2005 2:23 PM
hi, Frank Besler
If you want to add global (constant)value and type definantion, you can add them in the LXXXXTOP file, the XXXX is the function group name.
if you don't want all of the defination added only one file, you can create a file, named LXXXXFYYY, XXXX is still function group, YYY is the random string you set.
and add the 'include LXXXXFYYY' into the SAPLXXXX. (XXXX is still function group name). SAPLXXXX is the main program for the function group, you can find its name in the 'Attributes' tab 'Program name' fields in se37.
click the SAPLXXXX, you can see a example like this:
*******************************************************************
* System-defined Include-files. *
*******************************************************************
INCLUDE LATSVTOP. " Global Data
INCLUDE LATSVUXX. " Function Modules
*******************************************************************
* User-defined Include-files (if necessary). *
*******************************************************************
* INCLUDE LATSVF... " Subprograms
* INCLUDE LATSVO... " PBO-Modules
* INCLUDE LATSVI... " PAI-Modules
* add your include file here
include LATSVF01.
Please aware the your include file name can't be set random, you must follow the rule, otherwise the compile will failed.