04-02-2008 9:57 PM
04-02-2008 10:01 PM
You include the type-pool named slis with that instruction.
Type-pools are collections of types for you to use
04-02-2008 10:01 PM
You include the type-pool named slis with that instruction.
Type-pools are collections of types for you to use
04-02-2008 10:26 PM
The TYPE-POOL statement introduces a table group.
You can only maintain type groups in the ABAP Dictionary (Transaction SE11). The name tpool must correspond to the name in the ABAP Dictionary. You may only define types and constants in a type group. The name of each type and constant must begin with the name of the type group followed by an underscore. You declare the types and constants of a type group using the TYPE-POOLS statement.
Example
TYPE-POOL ABCDE.
TYPES: ABCDE_PACKED TYPE P,
ABCDE_INT TYPE I.
Reward if helpful.
Thanks,
Imran.
04-02-2008 10:34 PM
hi reddy,
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.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = ALV_PROG_NAME
I_INTERNAL_TABNAME = ALV_ITAB_NAME
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = ALV_PROG_NAME
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = L_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ALV_PROG_NAME
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = L_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = ITAB[] "Write here the name of your internal table + []
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
TYPE-POOLS
Syntax
TYPE-POOLS tpool.
Effect
In order to use the definitions of a type group, you have to integrate the type group into the program.
The TYPE-POOLS statement integrates the type group tpool into the current context. 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.
Note
If the integrated type group tpool integrates a further type group with the TYPE-POOLS statement, this new type group is also integrated into the program.
Example
Integrating 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
karthik
reward me points if it helps you
04-03-2008 3:09 AM