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

Type Groups?????? SLIS??

Former Member
0 Likes
1,098

Hai All,

Can U plzz let me know <b>"what is Type Group" & all about it???? </b> Y that should be used, when should be used, where can that be used, & all.??????????

I have come across <i><b>2716 Type Groups</b></i> in our server & <b>"SLIS"</b> of ALV is one of them, whats this??? I do not know its use in ALV. Explain this as an example.

Thanks in advance.

Regards.

Farooq

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
725

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.

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 DATAstatement and the value of the constant is, as the output shows, known in the program.

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

3 REPLIES 3
Read only

Former Member
0 Likes
726

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.

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 DATAstatement and the value of the constant is, as the output shows, known in the program.

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

Read only

0 Likes
725

Hayy........ <b>Thanks a lot.</b> ur explanation is exceptional..... I got to know well abt Type-group..

Regards.

Farooq

Read only

Former Member
0 Likes
725

HI FAROOQ,

TYPE-POOLS

Basic form

TYPE-POOLS tpool.

Effect

Includes the types and constants of a type group. If the type group tpool has already been included, the statement is ignored. You can only maintain a type group via the ABAP Dictionary (using Transaction SE11). You introduce a type group with the TYPE-POOL statement. Since the types and constants specified in a type group have global validity, you cannot use the statement within a FORM or FUNCTION.

Example

TYPE-POOLS VERI1.

DATA X TYPE VERI1_TYP1.

Regards,

Santosh