Type pools VS Top Include.

Hi all,
Is there any difference between a top include and Type pools.
As both are used for data declaration purpose, i would like to know any differences between these two.
Please kindly clarify me on this.
Thanks in advance.

It might come as a surprise to some, but this is all information that can be easily derived from the online SAP documentation. Here we go...
A type group (which can be defined via the [TYPE-POOL|http://help.sap.com/abapdocu_70/en/ABAPTYPE-POOL.htm] statement) is more or less a historical artifact, which allowed you since release 3.0 to define any type globally in the data dictionary (and at that time the data dictionary was limited and didn't allow for example types for internal tables). For further reading I recommend the online help on [data types in the ABAP dictionary|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/fc/eb3138358411d1829f0000e829fbfe/frameset.htm].
Now, a type group is not like any include, because it only allows certain statements (see [TYPE-POOL|http://help.sap.com/abapdocu_70/en/ABAPTYPE-POOL.htm] in the online ABAP help) and is designed as a global object for re-use. E.g. in TOP includes you would also define your global data (e.g. if you have a module pool for a dialog program), whereas in type groups you cannot do that. And obviously a TOP include is not necessarily a global object that should be shared across programs (though of course you can do that).
As Clemens already pointed out, type groups are nowadays considered obsolete, because you have different alternatives  (see comments in [data types in the ABAP dictionary|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/fc/eb3138358411d1829f0000e829fbfe/frameset.htm]). Note also that with 7.0 EhP2 the ABAP compiler automatically loads type groups on demand (which also shows you their global nature) and thus making the statement [TYPE-POOLS|http://help.sap.com/abapdocu_70/en/ABAPTYPE-POOLS.htm] obsolete (see the comments there).
Cheers, harald

Similar Messages

  • How to create a top include for module pool program

    hi all..
      I want to add my global declarations in one top inlcude.. There are so many other includes in my pgm. But how can i create top include explicitly. Also I have one normal report pgm attached with this module pool.

    hi Cynthia ,
       there are two ways of creating a top include at your situation  ,
    1) Insert an include <Prog name >TOP  in your mpool program and cut n paste your declarations there .. check if this works ...
    2)else .. create another m pool program in SE80 , while creating a pop up will ask for with TOP include ... check mark that and then proceed ..
       anything of these two will work ...
    Reward if helpful !!
    Regards,
    Ranjita

  • Top Include in Module Pool

    Hi Experts,
    Can anybody will suggest me how I can create TOP include in module pool program?
    Actually wanted to create select option in module pool.
    Please suggest.
    Regards,
    Neha

    Hi Neha,
    Please find the below code for creating a select-options in Module pool
    Note: dont create a Screen first.
    TABLES VBAP.
    SELECTION-SCREEN BEGIN OF SCREEN 100 .
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS S_VBELN FOR VBAP-VBELN.
    PARAMETER P_WERKS LIKE VBAP-WERKS.
    SELECT-OPTIONS S_ERDAT FOR VBAP-ERDAT.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN END OF SCREEN 100.
    Thanks
    Surendra P

  • Function Module for RSAP001 requires Type Pool

    Hi
    I am not an ABAP Freak:
    I want to set up a Function Module for RSAP0001.
    Setting Import and / or Tables Parameters give an Activation error:
    Type pool SBIWA has not been declared
    Message no. FL031
    Diagnosis:
    You used a type from type pool & in the interface of a function module.
    Procedure:
    For the program to be syntactically correct, you must
    declare the type pool in the global data declaration of the
    function group using the 'TYPE-POOLS: &.' statement.
    Where do I  find the global data declaration of the
    function group ?
    Thank You
    Best Wishes
    Martin

    Hi Martin,
    When you click on the function group you will find many includes declared in it.
    Some of them will be Include L<fgrp>UXX and there will be one include,
    INCLUDE L<fgrp>TOP, this is the include in which you will have to make declarations, and here you will have to declare type pool.
    Simply goto transaction SE38 and the the program name as L<functionfroupname>TOP and you can directly change this include. 
    Regards,
    Durgesh.

  • What types of samples are included with the EXSP?

    I'm considering purchasing Logic Express, but wanted to know what types of samples (orchestral, synth, drum, keyboard, etc) are included with the EXSP player. Can anyone owning Logic Express tell me what types of samples are included?
    Mac G5   Mac OS X (10.3)  

    Hello, Jeb247.
    This is merely a matter of personal opinion, but I believe that the included samples for EXSP are among the better features of the program. Granted, there are some cases where you have several instruments loosely based on the same samples run through different filters, but you are likely to find a decent array of what you need.
    You get all the Garageband instruments, as well as the ability to load the Jam Packs into EXSP. While the following list probably contains some overlap with those samples, it will still give you an idea of what's out there:
    The top-level hierarchy lists 41 different groups of sounds. After each listing, I'll note the approximate number of 'instruments' in each group:
    Piano (10)
    Guitars (11)
    Bass (5)
    Strings (9)
    Horns & Winds (9)
    Ethnic Instruments (2)
    Voices & Choir (3)
    Drum Kits (12)
    Effects(~50)
    Percussion & Specials (2)
    Analog: Bass (45), Leads (20), Pads (17), Percussive Waves (44), SpectrumSQ (25), Sweeps (30), Synthcomp (33), Waveforms (50+)
    Digital Chromatic Kits (12), Initial Waveforms (60+), Motion & FX (36), Pad Synths (46), Percussive Waves (23), Synths (31)
    FM Bass (17)
    Synth Atmospheres Layers (31), Singles (40)
    Synth Bass (45), Brass (12), Chords (21), Leads & Hooks (30), LFO Synths (21), Multi Sequence (6), Pads (44), Percussive Synths (44), Poly (28), Sidechain Chords (14), Spacious Effects (40), Strings (16), Sweeps & Swells (32), Vocalish (25)
    Now, as to the quality of the sounds... your mileage may vary. For orchestral stuff, nothing appeals to my ears like the Kurzweil -- largely because of those smooooooooooth output filters. That's not to say that the EXSP stuff isn't worth checking out; I just happen to use it for electronic textures and percussion rather than acoustic emulations. The drums simply don't cut it for me -- not nearly enough punch. But -- as I've mentioned before, you ears may report different pleasure levels.
    Suffice it to say that the EXSP comes with a substantial array of music-making potential. For the money (a freebie w/ Logic Express) it's a really good deal. Shortcomings in its sound set can be overcome by the careful purchase of additional material where your ears report unsatisfactory sounds. If you don't like the drums, iDrum or Battery might be a good idea (or my personal favorite: an outboard drum machine with dead-short latency...); if the orchestra stuff is weak, there are alternatives there, too.
    And your options for synth textures are beyond counting -- though I can specifically recommend the utterly astounding (and free!) Alphakanal "Automat". And you can have a pile of fun with the (equally free) NUSofting daHornet. And... and... the list goes on.
    Cheers,
    Michael

  • Where to set up a TYPE-POOL Declaration in a Function Group ?

    Hi,
    I ve got a Function Group.
    I set up a Function Module in the Function Group.
    I must use  TABLES I_T_SELECT TYPE SBIWA_T_SELECT.
    I get the error:
    Type pool SBIWA has not been declared
    Message no. FL031
    Diagnosis
    You used a type from type pool & in the interface of a function module.
    Procedure
    For the program to be syntactically correct, you must
    declare the type pool in the global data declaration of the
    function group using the 'TYPE-POOLS: &.' statement.
    Where / How do I set up a Type Pool in the global data declaration of the
    function group ?
    Where / what is the global data Declaration of the Function Group ?
    Thank You
    Best Wishes
    Martin

    Hello Martin,
    First off:
    TABLES I_T_SELECT TYPE SBIWA_T_SELECT.
    Correct me if I'm mistaken here, but tables is expecting a name of a DDIC structure. It is then creating a work area using that structure.
    If you have to declare an internal table, the correct code would be:
    DATA i_t_select TYPE TABLE OF sbiwa_t_select.
    Or:
    TABLES sbiwa_t_select.
    Regarding your questions:
    A global data declaration of a function group is just what it says, a point where you can declare your data usable for the whole function group.
    This is usually an Include.
    That said, you can fix your issue by creating an Include in your function group.
    Within that include you have to write:
    TYPE-POOLS: pool1, pool2, pool3.
    or, in case you only have one type pool:
    TYPE-POOLsbiwa
    After creating the include, you have to point your function module to that file.
    INCLUDE include_name.
    Kind regards,
    Michael

  • Program with Top includes

    Hallo,
    I hope someone can help me.
    I would like to know if is it allowed this program under ?
    Program with Top Includes.
    Type 1 Exucutable Program.
    Developement class $TMP - Temporary Objects.
    Logical Database ABS. ABAP Book: Customer and bookings.
    (DB Selection Screen 1000)
    If it is allowed where can I use Events GET in flow logic ?
    Thank in advance.
    Kindest regardes.
    Claudia

    Hi Claudia,
    Welcome to SDN Forum. Don't forget to read the [rules of engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement].
    Take a look at Report "EXAMPLE_PNP_GET_PAYROLL" it demonstrate how to use Logical database and GET events.
    Logical database      PNP                   HR Master Data
    Selection screen      900                   Selection screen on payroll results
    * These three tables need to be declared for the selection screen-.
    * Currently, the declarations of  pyorgscreen, pytimescreen HAS to
    * be done in addition to setting selection screen = 900 .
    TABLES: pernr.
    * Declare the country specific structure:
    * payXX_result with  XX = country code, e.g. payDE_result for Germany
    * Country = 99 is an exception: If this structure is used, the
    * international part of every payroll result is returned regardless
    * of country code. In the other case, pernr's whose country code do
    * not fit the structure are skipped.
    NODES: payroll TYPE pay99_result.
    DATA: wa_wpbp LIKE LINE OF payroll-inter-wpbp.
    GET pernr.
    WRITE: / 'Currently working on:'(021), pernr-pernr.
    GET payroll.
      LOOP AT payroll-inter-wpbp INTO wa_wpbp.
        WRITE:   / 'Personal Area ='(018),  wa_wpbp-werks,
                   'Sub Area ='(019),  wa_wpbp-btrtl.
      ENDLOOP.
    Don't forget to close this thread and all yours previous when your question be answered !
    Best Regards.
    Marcelo Ramos

  • Using the same top include of a function group inside a report

    I have a function group .
    I want my report to use the top include of the function group.
    Is this possible.How?
    I tried the use the include statement inside report it didnt work...

    TOP INCLUDE of FG starts with FUNCTION-POOL statement, hence you ge the error.
    Solution: create new include to encapsulate your definitions there, then include it in TOP INCLUDE of FG + your program.
    Regards
    Marcin

  • Table prmter E_T_DATA for extract missing & TYPE-POOL "RSAZT" is unknown

    Hi
    I have created generic extraction, the name of the FM is ZRSAX_BIW_GET_DATA_CRASS.
    I have set parameter table E_T_DATA like this in Tables tab
    E_T_DATA LIKE ZRPS_CRASS
    Then I set transaction data extraction using tcode RSO2 using FM ZRSAX_BIW_GET_DATA_CRASS and structure ZRPS_CRASS, name the datasource : Z_COPA_CRASS
    I have run rsa3 and get 563 data using this datasource (Z_COPA_CRASS) at the development system
    But why when I transport this into QA and Production, I get these following error on transport log:
    1 Table parameter E_T_DATA for extractor missing
    2 TYPE-POOL 'RSAZT' is unknown (check using tcode se38, program name : SAPLZRSAX, include : LZRSAXTOP)
    For no 1:
    Why this error happen?I have set E_T_DATA to extraction structure correctly...I think...
    For no 2:
    When i check my development system, this type pool exist but when i check in production system, the type pool doesn't exist.
    Anyone can solve my problem?Thank you.
    Regards,
    Satria

    Hi Satria,
                   Go to SE37 -> give the FM name (dont click on display/change) -> on the menu bar -> Click on Go To -> Function groups -> Change Groups -> Get the Function group name. -> Just edit the Function Group description so that the Function group get collected in the TR. Also in the same window go to MAin program -> just reactivate and collect them in the TR.
    The whole function group will be collected. Apart from these, also collect the Structure, Datasource and  import it again.
    This problem arised many times for me, i have re transported the function group and things used to work properly once the Trasnporting the Function group is successful
    Regards
    Sunil

  • ERROR in TYPE-POOLS cihal - Global definitions. Sentence not permitted...

    Hi guys,
    My ERROR is: "Global definitions. Sentence not permitted in context" in transaction SMARTFORMS.
    My code is:
    TYPE-POOLS cihal. " error here
    TYPES:
    typ_rcgstdrecn TYPE TABLE OF rcgstdrecn,
    typ_ccihs_ialhiot TYPE TABLE OF ccihs_ialhiot,
    typ_cihal_resltapi_tab_type TYPE TABLE OF cihal_resltapi_tab_type,
    typ_ccihs_ihvaliot TYPE TABLE OF ccihs_ihvaliot,
    typ_ccihs_ipiot TYPE TABLE OF ccihs_ipiot,
    typ_ccihs_ipevaiot TYPE TABLE OF ccihs_ipevaiot,
    typ_ccihs_ipevinjiot TYPE TABLE OF ccihs_ipevinjiot,
    typ_cih01_ihprapi_tab_type TYPE TABLE OF ccihs_prapi,
    typ_ccihs_ipabsiot TYPE TABLE OF ccihs_ipabsiot,
    typ_ccihs_iprestriot TYPE TABLE OF ccihs_iprestriot,
    type_ccihs_ipevinjiot TYPE TABLE OF ccihs_ipevinjiot,
    typ_tline TYPE TABLE OF tline.
    TYPES: BEGIN OF typ_datos_acc,
            nachn TYPE pad_nachn,
            name2 TYPE pad_name2,
            vorna TYPE pad_vorna,
            years TYPE i,
            werks TYPE persa,
            berkt TYPE berkt,
      END OF typ_datos_acc.
    " end code
    This code is in the tab "types" belonging to the definitions of global smartform.
    Anybody can help me with this error?
    Where can include the "TYPE-POOLS cihal." in my smartform without giving me this error?
    Thanks for your help.

    Hi Anup Verma,
    What you say is correct, to include the TYPE-POOLS in the initialization tab.
    What was happening is that the Line:
    typ_cihal_resltapi_tab_type TYPE OF TABLE cihal_resltapi_tab_type,
    declared in the types tab was obsolete and I had to comment to activate correctly.
    Thank you very much for your help.

  • WHY TYPE-POOLS

    hi all,
    i wana know that why we use type-pools when we have data dictionary
    and what i study accord to that type pool and data dictionary are same
    please help with the same.
    thanks in advance
    anuj

    Hi anuj,
    it is only "old" stuff.
    Type Groups
    Before Release 4.5A, it was not possible to define standalone types in the ABAP Dictionary to which you could refer using a TYPE addition in an ABAP program. It was only possible to refer to flat structures. Structures in programs corresponded to the structures of database tables or structures in the ABAP Dictionary. In ABAP programs, you could only refer to database tables and structures in the ABAP Dictionary using LIKE. It was, however, possible to refer to individual components of the Dictionary type. Complex local data types such as internal tables or deep structures had no equivalent in the ABAP Dictionary. The solution to this from Release 3.0 onwards was to use type groups. Type groups were based on the include technique, and allowed you to store any type definitions globally in the Dictionary by defining them using TYPES statements.
    Regards
    Bernd

  • Create TYPE-POOlS

    how to create our own Type-pools?for using alv?

    hi,
    This is taken directly from the HELP.
    Type Groups
    Before Release 4.5A, it was not possible to define standalone types in the ABAP Dictionary to which you could refer using a TYPE addition in an ABAP program. It was only possible to refer to flat structures. Structures in programs corresponded to the structures of database tables or structures in the ABAP Dictionary. In ABAP programs, you could only refer to database tables and structures in the ABAP Dictionary using LIKE. It was, however, possible to refer to individual components of the Dictionary type. Complex local data types such as internal tables or deep structures had no equivalent in the ABAP Dictionary. The solution to this from Release 3.0 onwards was to use type groups. Type groups were based on the include technique, and allowed you to store any type definitions globally in the Dictionary by defining them using TYPES statements.
    The definition of a type group is a fragment of ABAP code which you enter in the ABAP Editor. The first statement for the type group <pool> is always:
    TYPE-POOL <pool>.
    After this came the definitions of data types using the TYPES statement, as described in Local Data Types in Programs. It was also possible to define global constants using the CONSTANTS statement. All the names of these data types and constants must begin with the name of the type group and an underscore:
    In an ABAP program, you must declare a type group as follows before you can use it:
    TYPE-POOLS <pool>.
    This statement allows you to use all the data types and constants defined in the type group <pool> in your program. You can use several type groups in the same program.
    Let the type group HKTST be created as follows in the ABAP Dictionary:
    TYPE-POOL hktst.
    TYPES: BEGIN OF hktst_typ1,
    col1(10) TYPE c,
    col2 TYPE i,
    END OF hktst_typ1.
    TYPES hktst_typ2 TYPE p DECIMALS 2.
    CONSTANTS hktst_eleven TYPE i VALUE 11.
    This type group defines two data types HKTST_TYP1 and HKTST_TYP2, as well as a constant HKTST_ELEVEN with the value 11.
    Any ABAP program can use this definition with the TYPE-POOLS statement:
    TYPE-POOLS hktst.
    DATA: dat1 TYPE hktst_typ1,
    dat2 TYPE hktst_typ2 VALUE '1.23'.
    WRITE: dat2, / hktst_eleven.
    The output is:
    1,23
    11
    The data types defined in the type group are used to declare data objects with the DATA statement and the value of the constant is, as the output shows, known in the program.
    ~~Guduri

  • How to create type pools

    Hi Experts,
    I have a query like can we create custom "type pools". if yes, then what are the steps to create it.
    Thank you in advance.
    Samad.

    hi..
    Pls check the f1 help in ur system.
    It gives u  simple examples. Anyway,
    Typepool falls under - Data types.
    Data Types
    You can define program-local data types in ABAP programs that can be used for typing or declaring additional data types and data objects according to validity and visibility.
    The corresponding statements are:
    1. TYPE-POOLS
    2.  TYPES
    3.  INCLUDE TYPE
    TYPE-POOLS
    Syntax
    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,
    Padma
    Edited by: Padmashree RamMaghenthar on Oct 13, 2008 11:18 AM

  • Type-Pools in SE11 used on Class Parameter

    I have a strange one.  In 46C have parameter on a method of a class that uses a data type from a type pool.  Specific the parameter is a range type that is defined in the Type Pool.  In 46C this syntax checks fine.  But now we have upgraded our test system to 6.00 this no longer syntax checks.  It Syntax checks ok in SE24, but in SE11 it errors out.  In SE11 I get the error message The type "ZVMPL_TYRG_IDNFL" is unknown.  I am on Basis Stack 13.  Any insight on the problem would be appreciated. 
    Thanks.
    Matthew
    Here is the type pool
    TYPE-POOL zvmpl .
    TYPES:
      BEGIN OF zvmpl_tyst_lifnr_vmpl,
        lifnr TYPE lifnr,
        name1 TYPE name1_gp,
        name_short TYPE name1_gp,
        bahns TYPE bahns,
        obj_vmpl  TYPE REF TO zcl_masterpricelist,
      END OF zvmpl_tyst_lifnr_vmpl,
      zvmpl_tyit_lifnr_vmpl TYPE HASHED TABLE OF zvmpl_tyst_lifnr_vmpl
        WITH UNIQUE KEY lifnr,
      zvmpl_tyrg_idnlf TYPE RANGE OF idnlf.
    SE24 Definition of Class
    class ZCL_MASTERPRICELIST definition
      public
      create public .
    " public components of class ZCL_MASTERPRICELIST
    " do not include other source files here!!!
    public section.
      type-pools ZVMPL .
      methods PL_GET_ZVMPL_WHERE
        returning
          value(RE_RG_IDNLF) type ZVMPL_TYRG_IDNLF .

    everything seems to be fine for the type grp in se11. just goto the the change mode in se11 for the type group and click on "Display object list" (CTRLSHIFTF5). Then activate teh object name u find in the repo.browser
    Edited by: Prabhu  S on Mar 11, 2008 8:16 AM

  • Type Pool/Type Group Question

    We are moving Some tax Scheduling reporting into an SEm system that sirs o top of BW. The issue is there were type-pools in the R3 sending system (SAP delivered) that are not in the SEM system. 1)Can I copy and create the type-pool?2)How would I creta a typr pool?
    Or is a type-pool/group created automatically when some other deveopment is being created?
                         Thank-You

    Hi,
    You can use transaction SE11 to create type group.
    SE11 -> Enter Type Group name -> Click on Create button -> ...
    Regards,
    Ferry Lianto

Maybe you are looking for