‎2008 May 15 9:32 AM
What are TYPE-POOLS ?
Ex: while using ALV, we use TYPE-POOLS: SLIS.
Also what is SLIS. Is there any meaning for that ?
‎2008 May 15 9:34 AM
type-pools
TYPE-POOLS are used to declare a type pool to be used in the program.The specified type pool should already exists in the ABAP DICTONARY(SE11).Once the type pool has been declared we can use any of the constants and types declared in that type pool
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.
In SE11 you create the type-group or type-pool and use it in se38 using type-pools statement
TYPE-POOL tp
Type-pool statement is used to create a type group in the ABAP dictionary.It is the first statement in the definition.The type group is used to declare constants and types and these must begin with the name of the type pool and underscore.
e.g. TYPE-POOL owntypes.
TYPES num TYPE P DECIMALS 2.
TYPES name(14) TYPE C.
To use these types in the abap program we have to use the statement
TYPE-POOLS .
e.g. TYPE-POOLS owntypes.
DATA customer TYPE owntypes_num.
DATA name TYPE owntypes_name.
slis contains all the structures and tables that are helpful in bulding an alv report
SLIS is the type library for ALV grid.
If you'll use the ALV you have to add TYPE-POOLS : SLIS. command at the beginning of your code.
Consider these :
slis_t_fieldcat_alv is containing "_t_"
It means that it is an internal table and slis_fieldcat_alv is header line of that.
Here is a practical example for alv grid :
Just think that you have an internal table named 'ITAB' to show.
Step1 : First add these lines to your code :
TYPE-POOLS : SLIS.
DATA ALV_PROG_NAME LIKE SY-REPID.
ALV_PROG_NAME = SY-REPID.
DATA : ALV_ITAB_NAME(30),
L_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
ALV_ITAB_NAME = 'ITAB'. "!!Write here the name of your internal table
Step 2 : Add these two function :
The first function is filling the fieldcat L_FIELDCAT that you described, second is showing it on the screen usinf fms.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
regards
prasanth
‎2008 May 15 9:34 AM
type-pools
TYPE-POOLS are used to declare a type pool to be used in the program.The specified type pool should already exists in the ABAP DICTONARY(SE11).Once the type pool has been declared we can use any of the constants and types declared in that type pool
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.
In SE11 you create the type-group or type-pool and use it in se38 using type-pools statement
TYPE-POOL tp
Type-pool statement is used to create a type group in the ABAP dictionary.It is the first statement in the definition.The type group is used to declare constants and types and these must begin with the name of the type pool and underscore.
e.g. TYPE-POOL owntypes.
TYPES num TYPE P DECIMALS 2.
TYPES name(14) TYPE C.
To use these types in the abap program we have to use the statement
TYPE-POOLS .
e.g. TYPE-POOLS owntypes.
DATA customer TYPE owntypes_num.
DATA name TYPE owntypes_name.
slis contains all the structures and tables that are helpful in bulding an alv report
SLIS is the type library for ALV grid.
If you'll use the ALV you have to add TYPE-POOLS : SLIS. command at the beginning of your code.
Consider these :
slis_t_fieldcat_alv is containing "_t_"
It means that it is an internal table and slis_fieldcat_alv is header line of that.
Here is a practical example for alv grid :
Just think that you have an internal table named 'ITAB' to show.
Step1 : First add these lines to your code :
TYPE-POOLS : SLIS.
DATA ALV_PROG_NAME LIKE SY-REPID.
ALV_PROG_NAME = SY-REPID.
DATA : ALV_ITAB_NAME(30),
L_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
ALV_ITAB_NAME = 'ITAB'. "!!Write here the name of your internal table
Step 2 : Add these two function :
The first function is filling the fieldcat L_FIELDCAT that you described, second is showing it on the screen usinf fms.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
regards
prasanth
‎2008 May 15 9:34 AM
hi,
type-pools :
we can define global data declarations of an abap program.it is a collection of predefined data types.here we can define our own structures.
this statement allows u to access all the TYPES and CONSTANTS used in the type group. we can reuse this in other programs to reduce the redundancy.
SLIS is a standard type pool which containd all the internal table structures and constants,work areas which are necessary for alv report.
Edited by: raji ch on May 15, 2008 10:34 AM
‎2008 May 15 9:35 AM
Hi,
TYPE-POOLS tp
Type-pools are used to declare a type pool to be used in the program.The specified type pool should already exists in the ABAP DICTONARY(SE11).Once the type pool has been declared we can use any of the constants and types declared in that type pool.
TYPE-POOL tp
Type-pool statement is used to create a type group in the ABAP dictionary.It is the first statement in the definition.The type group is used to declare constants and types and these must begin with the name of the type pool and underscore.
e.g. TYPE-POOL owntypes.
TYPES num TYPE P DECIMALS 2.
TYPES name(14) TYPE C.
To use these types in the abap program we have to use the statement
TYPE-POOLS .
e.g. TYPE-POOLS owntypes.
DATA customer TYPE owntypes_num.
DATA name TYPE owntypes_name.
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS
Reward,if useful.
Thanks,
Chandu
‎2008 May 15 9:42 AM
Hi Manjunath,
TYPE-POOLS
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
Declares the types and constants of a type group to a program.
Syntax
TYPE-POOLS <tpool>.
After this statement, you can use all of the data types and constants defined in the type group
<tpool> in your program.
Thankyou,
Regards.