Skip to Content
author's profile photo Former Member
Former Member

what is the purpose of the type-pools and

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2007 at 01: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2007 at 01: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2007 at 12: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 18, 2007 at 01: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.