Entering content frameBackground documentation Named Includes Locate the document in its SAP Library structure

If an include is used to define a database table or structure, a name can be assigned to the included substructure. The group of fields in the include can be addressed as a whole in ABAP programs with this name.

In ABAP programs, you can either access the fields directly with <Table/structure name>-<Field name> or analogously with <Table/structure name>-<Group name>-<Field name>. You can access the fields of the group as a whole with <Table/structure name>-<Group name>.

Example

Structure PERSON includes structure ADDRESS with the name ADR. ADDRESS has a field CITY. With PERSON-ADR you can address all the fields in structure ADDRESS. The included field CITY can also be addressed with PERSON-CITY or PERSON-ADR-CITY.

You can include a structure more than once (e.g. in a period group). Since direct access by field name should be permitted here, the included field names must be renamed to ensure that they are unique.

A suffix can be assigned to each group, extending the names of the group fields. The fields can then be addressed in ABAP programs with <Table/structure name>-<Field name (with suffix)> or <Table/structure name>-<Group name>-<Field name (with suffix)>.

Example

Structure PERSON includes structure ADDRESS twice. An address is the private address with suffix H and name ADRH. The other address is the business address with suffix W and name ADRW. You can access field CITY in the private address with PERSON-CITYH or PERSON-ADRH-CITY.

The functionality of the named includes in the ABAP Dictionary corresponds to the ABAP construction INCLUDE TYPE ... AS ... RENAMING ... .

 

 

Leaving content frame