ARTICLE
Includes with Group Names
By redefining structures using
INCLUDES , you can select
components of these structures symbolically - either in an ABAP program
or by assigning group names in the ABAP Dictionary.
The statement takes one of the following two forms:
ABAP_VARIANTS:
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.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved