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

Types group?

Former Member
0 Likes
2,838

What is type group and where it is used?

1 ACCEPTED SOLUTION
Read only

Former Member
1,874

Hi,

Type group

A type group is a Global Declaration area, where you can define the types which will be accessible across all the program.

Type group creation

goto transaction SE11.

Select type group radio button.

Enter the name of the type group u want to copy.

then select the copy button on the application toolbar enter the name of the ztype group u want to create. Activate it.

That's it!!

Information on TYpe group:

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.

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.

Regards,

Raj.

4 REPLIES 4
Read only

Former Member
0 Likes
1,874

Hi,

TYPE-POOLS tp

Type-pools are used to declare a type pool to be used in the program.The specified type pool should already exists in the ABAP DICTONARY(SE11) .Once the type pool has been declared we can use any of the constants and types declared in that type pool.

TYPE-POOL tp

Type-pool statement is used to create a type group in the ABAP dictionary.It is the first statement in the definition.The type group is used to declare constants and types and these must begin with the name of the type pool and underscore.

e.g. TYPE-POOL owntypes.

TYPES num TYPE P DECIMALS 2.

TYPES name(14) TYPE C.

To use these types in the abap program we have to use the statement

TYPE-POOLS .

e.g. TYPE-POOLS owntypes.

DATA customer TYPE owntypes_num.

DATA name TYPE owntypes_name.

Regards,

Kumar(Reward if helpful).

Read only

Former Member
1,875

Hi,

Type group

A type group is a Global Declaration area, where you can define the types which will be accessible across all the program.

Type group creation

goto transaction SE11.

Select type group radio button.

Enter the name of the type group u want to copy.

then select the copy button on the application toolbar enter the name of the ztype group u want to create. Activate it.

That's it!!

Information on TYpe group:

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.

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.

Regards,

Raj.

Read only

Former Member
0 Likes
1,874

hi they r used in the

type groups will contains the definition of variables,constants that we use most of the time.for example see the type pools SLIS in se11.this will be useful to work with ALv concept.

for more info check this link

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

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

regards,

venkat

Edited by: venkat appikonda on Apr 16, 2008 12:55 PM

Read only

Former Member
0 Likes
1,874

Hi,

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.

Ex : We will use type-pools for building ALV reports and etc.

Thanks,

Sriram Ponna.