Basically, "Append or Include Structure" is used to add more fields into a table. The main difference of them is the Include Structure is reusable objects and can be linked to many other tables, programs and structure. One thing you may keep in mind is Include Structure is flat structure and cannot include any other structure within them. Let's go into more details of each technique.
Append Structure
Use
Include Structure
Append v.s Include Structure
Append structures are used for enhancements that are not included in the standard. An append structure is a structure that is assigned to exactly one table or structure. There can be more than one append structure for a table or structure.
Append Structure
Use
You use append structures for enhancements that are not included in the standard. This is because of special developments, country versions that require to add custom fields to any tables or structures.
An append structure is a structure that is assigned to exactly one table or structure. There can be more than one append structure for a table or structure.
Features
Features
You can make the following enhancements to a table or structure TAB with an append structure:
- Insert new fields in TAB
- Define foreign keys for fields of TAB that already exist
- Attach search helps to fields of TAB that already exist
These enhancements are part of the append structure, that is, they must always be changed and transported with the append structure.
When a table or structure is activated, the system searches all the append structures of the table and the fields of these append structures are added to the table or structure. Foreign keys and search help attachments added using the append structure are also added to the table. If you create or change an append structure, the table or structure assigned to it is also adjusted to these changes when you activate the append structure.
The customer creates append structures in the customer namespace. The append structure is thus protected against overwriting during an upgrade. The fields in the append structure must also reside in the customer namespace, that is, the field names must begin with ZZ or YY. This prevents name conflicts with fields inserted in the table by SAP.
If you create an append structure for a table or structure, only those enhancements are allowed that are consistent with the enhancement category of the enhanced table or structure. For more information, see Structure Enhancements .
The new versions of the standard tables are imported after an upgrade, and the fields, foreign key definitions and search help attachments contained in the append structures are added to the new standard tables at activation.
Further Remarks:
- An append structure can be assigned to exactly one table or structure. If you want to append the same fields to several tables or structures, you can store these fields in an include structure. In this case you must create an append structure for each of these tables or structures and include the include structure there.
- Adding an append structure to an SAP standard table is supported by the Modification Assistant .
- And append structure is always staying at the last of the table.
- No append structures can be added to tables with long fields (data types VARC, LCHR or LRAW). This is because a long field must always be the last field in the table. Structures with long fields can be enhanced with append structures.
- If you copy a table or structure with an append structure, the fields of the append structure become fields of the target table. Foreign key definitions and search help attachments appended with the append structure are copied to the target table.
- Foreign keys for the appended fields must be defined within the append structure. Fields of the table or structure assigned to the append structure must be defined when assigning the key field and foreign key field.
- Indexes on the appended fields must be defined in the original table.
- Using an append structure, a table or structure TAB can be enhanced only with new foreign keys or search help attachments. You cannot change an existing foreign key definition or search help attachment for a field of TAB with the append structure.
Include Structure
Append v.s Include Structure
Append structures are used for enhancements that are not included in the standard. An append structure is a structure that is assigned to exactly one table or structure. There can be more than one append structure for a table or structure.
Includes are used to group fields, an include structure can be assigned to many tables. If you add a fields to an include structure, all tables/structures, which contain that include structure, will be updated too.
Basically APPEND structures are used to add additional fields to exactly one table, while INCLUDE may be used to include fields to several tables.
As far as I know there is no difference at the DB-level; as soon as either one is used the fields will be added at the end of the file (although an INCLUDE could be at any place in the Data Dictionary); of course with an exception in case one of the fields in de CI has been marked as Key-field.
No comments:
Post a Comment