05-05-2006 4:36 PM
Hi,
i'm trying to use some declarations in my program which are defined in an include or another program.
1. I need to create a class whose definition is in an include
2. i need to declare a variable like this
v_temp TYPE l_temp , l_temp is a structure defined in an include .
I'm trying to use the declarations in another program or an include in my program. however, i dont want to use 'include' statement
your help would be appreciated.
Thanks,
Kranthi.
05-05-2006 5:45 PM
Hi Kranthi,
You can declare your variables in an include and use them in your program by using the statement.
include zinclude.
write:/ v_temp. "v_temp is declared in zinclude.
BU tif you want to use type definitions to be used, then you must create a type pool in se11.
Choose type grouups radio-button.
give a name to your type-pool.
say create.
Use the type to define your variables.
Regards,
Ravi
05-05-2006 8:01 PM
Hi Kranti,
If u write the declarationin some other include or program n use it in other program, without using INCLUDE.. how would the complier understand where the declaration has come from?? U need to specify to the compiler the path of declaration and hence the include is included..
If u dont intend to use INCLUDE, declare a data element in ABAP dictionary and use it in ur program..
I dont think its possible to do it the way u have suggested..
BTW, why arent u in favour of using the INCLUDE.. is it because it has a lot of declarations..
Regards,
Tanveer.
Please mark helpful answers
05-05-2006 10:40 PM
Hi,
the include im trying to use refers to another include and so on. hope im clear.
Thanks,
Kranthi.
05-05-2006 10:48 PM
If you want to avoid that, then define a type-pool as Ravi suggested. And if you finally decide to do that, you should award him