Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

diff b/w .include and .append

Former Member
0 Likes
921

Hi all,

I just wanted to know the difference between <b>.include</b> and <b>.append</b> structure in se11.

P.S .Good anwsers will be rewarded with points.

8 REPLIES 8
Read only

former_member188829
Active Contributor
0 Likes
810

1. .INCLUDE

(which appears in se11 in many tables.)

2. Well,

thats nothing but a technique

of BUNCHING / GROUPING fields

(for ease of re-use)

(instead of again and again

specifying those SET of FIELDS,

in more than 1 table)

(we can as well give each field, field-by-field,

it won't make any difference in database table)

3. However,

Append structure

is FACILITY PROVIDED BY SAP

for customer enhancment of tables.

It behaves differently when

some upgrade is done in that table

by sap itself.

In such case,

when the upgrade occurs,

first the SAP fields (which are added in the standard table)

are first included in the sequence of fields,

AFTER THAT,

our APPEND structure fields,

are appended !!!

Read only

0 Likes
810

Append Structure->Append structures are used for enhancements that are not included in the standard. This includes special developments, country versions and adding customer 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.

The following enhancements can be made 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, i.e. they must always be changed and transported with the append structure.

Include Structure ->In addition to listing the individual fields, we can also include the fields of another structure in tables and structures. Individual fields and includes can be mixed as required.

When an include is changed, all the tables and structures that include it are automatically adjusted.

Includes can also be nested, that is structure A includes structure B which in turn includes another structure C, etc. The maximum nesting depth is limited to nine. The maximum length of a path of nested includes in a table or structure is therefore nine (the table/structure itself not included).

Reward if helpful

Read only

Former Member
0 Likes
810

Hi Asha,

<b>.INCLUDE</b>: you can reuse in other tables also.where as in

<b>.STRUCTURE</b> it is for that particular table and this cannot be reuse.

Thanks

Vikranth khimavath

Message was edited by:

Khimavath Vikranth

Read only

Former Member
0 Likes
810

chk this thread with the same discussion

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
810

Hi,

Include structure can be inserted anywhere.Append structures only at the end.

Same append cannot be used in another table.But it is possible to have more than one append structure.

Check this.

http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eb54446011d189700000e8322d00/content.htm

http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eb61446011d189700000e8322d00/content.htm

Read only

Former Member
0 Likes
810

Hi Asha,

Please refer the below links,

/thread/126956 [original link is broken]

Regards,

Hema.

    • Reward points if it is useful.

Read only

Former Member
0 Likes
810

Hi Asha,

· An append structure can only 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.

But there is no such restriction on Inclue. You can include the same structure in several tables.

Check the following...

Append Structures

Append structures are used for enhancements that are not included in the standard. This includes special developments, country versions and adding customer 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.

The following enhancements can be made 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, i.e. they must always be changed and transported with the append structure.

When a table or structure is activated, all the append structures of the table are searched 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 an append structure is created or changed, the table or structure assigned to it is also adjusted to these changes when the append structure is activated.

Since the order of the fields in the ABAP Dictionary can differ from the order of the fields on the database, adding append structures or inserting fields in such append structures does not result in a table conversion.

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 should also reside in the customer namespace, that is the field names should 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.

A standard table contains the fields Field 1, Field 2 and Field 3. An append structure containing the fields ZZA and ZZB is defined for this table. After activating the table, the corresponding database table contains fields Field 1, Field 2, Field 3, ZZA and ZZB.

Further Remarks:

· An append structure can only 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.

· If you want to insert a field that is to be delivered with the standard in the next Release in the customer system in advance, you must include it in the table itself as a repair. If you include such a field in an append structure for the table, it will occur twice when the new standard table is imported. This will result in an activation error.

· No append structures may 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. However, structures with long fields can be enhanced with append structures.

· If a table or structure with an append structure is copied, 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 may be defined when assigning the key field and foreign key field.

· Indexes on the appended fields must be defined in the original table.

· A table or structure TAB can only be enhanced with new foreign keys or search help attachments using an append structure. You therefore cannot change an existing foreign key definition or search help attachment for a field of TAB with the append structure.

Read only

Former Member
0 Likes
810

hi

with .include technique you extend a structure/table with the included structure/table structure, the included structure being one which exists independently of the str/table you want to extend. This is useful if you want to reuse a certain structure.

the .append structure is a technique for extending a structure/table with other custom structure which everytime is a customer defined. the append structure is not maintainable separately but it belongs exclusively to the extended structure/table. This technique is used to enhance standard structures/tables with customer defined fields.

please ask if additional questions

br