Customers can add new fields to transparent tables and structures using ‘Append Structure’ technique without needing modification. Append Structure acts almost similar to a normal structure included in the original table / structure, which contain customer fields.
Let’s see how Append Structure technique of enhancing tables / structures works?
Process followed at SAP
Developers at SAP create standard tables and structure and set one among the following enhancement categories for each table or structure.
Possible Enhancement Categories:
- Cannot be enhanced : No customer enhancements would be possible.
- Can be enhanced (character-type) : Only character type fields (data type C, N, D, or T) can be added.
- Can be enhanced (character-type or numeric) : Fields of all data types except deep data types (tables, references, strings) are allowed to be added.
- Can be enhanced (deep) : Fields of all data types are allowed to be added.
You can check the enhancement category of a table / structure as followed:
- Go to transaction SE11 & display the specific table / structure.
- Navigate in the menu bar to ‘Extras -> Enhancement Category’ to find assigned enhancement category.
Enhancement Process followed at Customer site
Below mentioned steps are followed for adding new fields to a table or structure using ‘Append Structure’ technique:
- Go to transaction SE11 and display the table / structure to be enhanced.
- Press the button ‘Append Structure’ in the application toolbar.
- Enter the name of the ‘Append Structure’.
- Add the customer fields.
Save & activate the append structure and go back to original table / structure to find the newly added fields.
Append Structures & their fields are named in customer namespace in order to avoid conflicts e.g. SAP adding new fields with the same name in future releases, during SAP upgrades.
Append Structures follow the naming pattern as Z* or Y*. (Note: Underscores ‘_’ are not allowed in the name at 2nd & 3rd character.)
Fields of append structures follow the naming pattern as ZZ* or YY*.
- The table to be enhanced should not be a pool or cluster table.
- The enhancement category of the table / structure should allow adding customer fields i.e. Enhancement category should not be set to ‘Cannot be enhanced’. Moreover, even if the enhancements are allowed, the newly added customer fields should be in accordance with the enhancement category of table / structure.
- In case of tables, it’s not allowed to create append structure if the table contains long fields (i.e. fields with data type VARC, LCHR, LRAW). However, it’s allowed in case of structures.
- Append structures appear in original table / structure with .APPEND key word.
- An append structure can be used exactly for one table or structure. However, it’s possible to add more than one append structures to one table or structure.
- When an append structure is changed and activated, the original table / structure also gets activated automatically.
- The append structure can be used in programs exactly similar to the way fields of a normal structure is used.
- When a table / structure containing append structure is copied, the target table / structure contains the fields in append structures as normal fields.