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

WHAT IS TYPE GROUPS

Former Member
1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,656

Type group

If you want to define global constants, you have to use a type group. The name of

the type group can only contain a maximum of five characters. In the type group,

you can define constants using the CONSTANTS statement. As types, you are

provided with the integrated ABAP types or the global types of the Dictionary.

In order to be able to use the types of a type group in a program, make the type

group known using the TYPE POOL statement. From these lines on, you can use

all constants of the type group.

The definition of a type group is a piece of ABAP code that is either maintained

via the Dictionary (SE11) or via the ABAP Editor (SE38).

Realization:

The first statement for the type group zmytp is always:

TYPE-POOL zmytp.This is followed by the definition of data types with the statement TYPES, as

described under local program data types. Furthermore, cross-program constants

can be declared using the CONSTANTS statement. All names of this data type

and constants must begin with the name of the type group and an underline:

zmytp_

In an ABAP program, type groups must be made known with the following

statements before they are used:

TYPE-POOLS zmytp.

When using this statement, all data types ansd constants, which are defined in the

zmytp type group can be used in the program. Several type groups can be used

in a program.

Reward if found helpfull,

Cheers,

Chaitanya.

Edited by: Chaitanya Raju on Feb 6, 2008 7:41 AM

5 REPLIES 5
Read only

Former Member
0 Likes
1,656

Type Groups in the ABAP/4 Dictionary

You can define data types in a type group in the ABAP/4 Dictionary instead of defining them within an ABAP/4 program.

The type group name in the ABAP/4 Dictionary has a maximum of 5 characters. Type names within type group <typepool> must begin with <typepool> followed by an underscore.

The types in a type group must be declared in ABAP/4 programs with the TYPE-POOLS command.

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

Check this link for more details with eg

http://help.sap.com/saphelp_46c/helpdata/en/fc/eb3138358411d1829f0000e829fbfe/content.htm

Read only

Former Member
0 Likes
1,656

Group for storing user-defined data types or constants in the ABAP Dictionary so that they can be accessed by any program.

The ABAP statement used for this purpose is TYPE-POOLS.

Read only

Former Member
0 Likes
1,656

hi,

Basic form

TYPE-POOL typepool.

Effect

Introduces a type group. You can only maintain a type group via the ABAP/4 Dictionary (using Transaction SE11 ). The name typepool must match the name in the ABAP/4 Dictionary . You can only define types and constants in type groups. The names of all these types and constants must begin with the name of the type group and an underscore.

Example

TYPE-POOL ABCDE.

TYPES: ABCDE_PACKED TYPE P,

ABCDE_INT TYPE I.

Hope this is helpful, Do reward.

Read only

Former Member
0 Likes
1,657

Type group

If you want to define global constants, you have to use a type group. The name of

the type group can only contain a maximum of five characters. In the type group,

you can define constants using the CONSTANTS statement. As types, you are

provided with the integrated ABAP types or the global types of the Dictionary.

In order to be able to use the types of a type group in a program, make the type

group known using the TYPE POOL statement. From these lines on, you can use

all constants of the type group.

The definition of a type group is a piece of ABAP code that is either maintained

via the Dictionary (SE11) or via the ABAP Editor (SE38).

Realization:

The first statement for the type group zmytp is always:

TYPE-POOL zmytp.This is followed by the definition of data types with the statement TYPES, as

described under local program data types. Furthermore, cross-program constants

can be declared using the CONSTANTS statement. All names of this data type

and constants must begin with the name of the type group and an underline:

zmytp_

In an ABAP program, type groups must be made known with the following

statements before they are used:

TYPE-POOLS zmytp.

When using this statement, all data types ansd constants, which are defined in the

zmytp type group can be used in the program. Several type groups can be used

in a program.

Reward if found helpfull,

Cheers,

Chaitanya.

Edited by: Chaitanya Raju on Feb 6, 2008 7:41 AM

Read only

Pavan_Golesar
Active Participant
0 Likes
1,656

Hello Kiran,

Type Group allows us to define non-predefined types. Combination of all such non-predefined types is knows as type-pool or type-group.


Please Refer Document for detail:

Hope its helpful to everyone in need.

Thanks,

Pavan Golesar.

Message was edited by: Pavan Golesar