Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Diff b'ween Type pools & type Groups

Former Member
0 Likes
1,504

Hi!

What is type pools & Can i know the difference between the Type pools & type Groups.

6 REPLIES 6
Read only

Former Member
0 Likes
945

Hi

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.

TYpe Groups are the dictionary Objects which we create using SE11 and use them

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
945

hi

good

TYPE-POOL

The introductory statement TYPE-POOL can only be used for type groups (type T programs). A program introduced with the TYPE-POOL statement can only contain global type definitions and constants declarations. The CLASS-POOL statement is generated automatically where required by the ABAP Dictionary - you should not insert it into programs manually.

TYPE GROUP->

This function links customizing ID types to their system landscape (including the integration server). ID types and business systems belong in the same type group if:

· the business systems exchange messages

· these messages contain the appropriate customizing ID types

· the customizing ID types are equivalent, but not harmonized in these systems

Equivalent ID types are put in the same type group, i.e. the type group defines the scope of one ID mapping

thanks

mrutyun^

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
945

Hi Rahul

Look at thread Difference between function group and function pool?

FUNCTION-POOL

The introductory statement FUNCTION-POOL declares a program in which you can define function modules. At runtime, function pool programs are loaded in to a new program group with their own user dialogs and their own shared data areas in the internal session of the calling program. For this reason, function groups (type F programs) must always begin with a FUNCTION-POOL statement. This is usually generated by the Function Builder. Type 1, M, or S programs should not begin with a FUNCTION-POOL statement, since they would then not share common data areas with the caller. However, in exceptional cases, you can introduce a type 1 or type M program with FUNCTION-POOL to ensure that externally-called subroutines can process their own screens. As in the REPORT and PROGRAM statements, you can specify the message class and standard list formatting options of the program in the FUNCTION-POOL statement.

Function Groups

Function groups are containers for function modules. You cannot execute a function group. When you call an function module, the system loads the whole of its function group into the internal session of the calling program (if it has not already been loaded). For further information, refer to Organization of External Procedure Calls.

So Most Function pools are Function Groups, and in rare case we can have type M program too.

Regards

Sree

Read only

Former Member
0 Likes
945

Hi,

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 TYPEaddition 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 that, you define data types using the statement TYPES. 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: pool_

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.

Note:

As of release 6.40, you can also define data types and constants in the public visibility area of global classes, by which type groups can be completely replaced.

Regards

Sudheer

Read only

Former Member
0 Likes
945

Can u explain in very short terms

Type-pools

Type Groups

Read only

0 Likes
945

Hi

TYPE Groups is like we declare data using TYPES statement instead of LIKE word

types: begin of tygp,

no type kunnr,

name type name1,

amnt type netwr,

end of tygp.

Type POOLS is a pool of all types declarations

example best see the SLIS structure which we use for ALV reports

it contains a lot of Type groups.

Reward points for useful Answers

Regards

Anji