06-18-2007 1:49 PM
hi what is the purpose of the type-pools and
when we are using this and how to use and
how to decler
thanks
mahi
06-18-2007 2:04 PM
Mahesh,
what it is :
You will come across certain situations in which you need to declare the same set of variables in a number of abap programs . To reduce the pain of this repeatative declarations, you need to declare just one Type-pool and only refer this type pool wherever u need to declare the variables.So in a way, it is global data declaration .
where to define :
Somewhere, where it should be VISIBLE .
like class, interface, common program etc
~ Laxmi
pls reward helpful answers
06-18-2007 1:50 PM
Hi Mahesh,
TYPE-POOLS tpool.
Effect
Declaring global data types and constants from a type group.
The TYPE-POOLS statement declares the data types and constants of type group tpool You can specify it in the global data declarations of an ABAP program or in the declaration section of a class or interface. The data types and constants of the type group are visible as of this statement in the current context.
Notes
If the declared type group tpool integrates a further type group with the TYPE-POOLS statement, its data types and constants are also declared.
,,Data types declared using type groups cover ABAP Dictionary data types of the same name.
Example
Declaration of the predefined type group abap. By referring to the table type abap_func_parmbind_tab from the type group abap, the system declares an internal table parameter_tab for the dynamic parameter transfer to function modules.
TYPE-POOLS abap.
DATA parameter_tab TYPE abap_func_parmbind_tab.
Regards
Aneesh.
06-18-2007 2:04 PM
Mahesh,
what it is :
You will come across certain situations in which you need to declare the same set of variables in a number of abap programs . To reduce the pain of this repeatative declarations, you need to declare just one Type-pool and only refer this type pool wherever u need to declare the variables.So in a way, it is global data declaration .
where to define :
Somewhere, where it should be VISIBLE .
like class, interface, common program etc
~ Laxmi
pls reward helpful answers
01-31-2008 11:52 PM
06-18-2007 2:08 PM
Hello Mahesh
In addition to grouping type definitions that are widespread used the type-pool was the only place in older SAP releases where you could define <b>globally visible constants</b>.
Nowadays we can use <b>constants of interfaces</b> (SE24) in order to define globally visible constants.
Regards
Uwe
06-18-2007 2:15 PM
Hi,
TYPE Pools can be thought of as an include having TYPE declarations.
The use of this in your program gives your program access to these TYPE declarations which can then be used directly in your program when declaring new data declaration.
TYPE-POOLS,TYPES, TYPE-POOL
TYPES----
USER DEFINED DATATYPES ARE DECLARED WITH TYPES STATEMENT
TYPE-POOL----
IT IS A PROGRAM WITH A COLLECTION OF TYPES STATEMENTS. CAN BE CREATED IN DICTIONARY
TYPE-POOLS----
IT IS A COLLECTION OF TYPE-POOL s.
in an ABAP Program we use TYPE-POOLS statement which is a collection of different TYPE-POOL s
ex: TYPE-POOLS : ICON, SLIS etc
TYPES POOLS is group (library) of type, it's defined in dictionary and in this way a type needs to be declared only once in type pools.
When you want to use a type of a certains type pools, you only have to indicate the type pools without to declare the type in your program.
For example when you create an ALV program, all types you need to use are defined in types pool SLIS.
The objects that you don't want to create in SE11 but want a single place where you can declare them together will be done in TYPE POOLs. The best example is SLIS where you have declared all the TYPES that are required to execute a ALV REPORT using the REUSE functions.
In this way you define your types only once and then you can use them everytime you need:
TYPE-POOLS SLIS.
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
The type SLIS_T_FIELDCAT_ALV is defined in type pools SLIS.
Hope this info would be helpful to you.
Thanks,
Sapna