Includes with Group Names Locate the document in its SAP Library structure

By redefining structures using INCLUDES with group names, you can select groups of fields symbolically beyond the boundaries of individual components. You can assign group names either in the ABAP Dictionary or in an ABAP program. The statement takes one of the following two forms:

INCLUDE TYPE      t1 AS grpname[RENAMING WITH SUFFIX suffix].

INCLUDE STRUCTURE s1 AS grpname[RENAMING WITH SUFFIX suffix].

By adding a group name in an Include (in the ABAP Dictionary) or with the AS grpname addition in an ABAP program, you can then address the area of the structure defined in the Include symbolically (using the group name). The following example groups together parts of an ABAP structure, which is then passed to a subprogram:

Example

*Using Includes with Group Names

TYPES: BEGIN OF name,
vorname(20) TYPE C,
nachname(30) TYPE C,
END OF name.

TYPES: BEGIN OF person,
         geschlecht(1) TYPE X.
         INCLUDE TYPE name AS pname.
TYPES:   alter         TYPE I,
         gewicht       TYPE P,
       END OF person.

DATA:  s2 TYPE person.

PERFORM use_name USING s2-pname.

 

 

 

Leaving content frame