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

include & append..

Former Member
0 Likes
1,388

what is the difference between include structure and append structure..?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
930

Hi Sriram,

Please refer the links,

Best Regards.

    • Reward points if it is useful.

8 REPLIES 8
Read only

Former Member
0 Likes
931

Hi Sriram,

Please refer the links,

Best Regards.

    • Reward points if it is useful.

Read only

Former Member
0 Likes
930

Hi,

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.

Include structures are used to add fields in the middle also.

where as append structures adds fields only at the end.

Reward if my answer helps you.

Regards,

Sandhya

Read only

Former Member
0 Likes
930

Hi,

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.

Include Structure:

In addition to listing the individual fields, you 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.

Structure A was included in table B. A new field is inserted in structure A. When structure A is activated, table B is adjusted to this change, that is the new field is also inserted there.

You can assign the include a group name with which the group of fields in the include can be addressed as a whole in ABAP programs.

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).

Only flat structures can be included. In a flat structure, every field either refers to a data element or is directly assigned a data type, length and possibly decimal places.

Only structures may be included in a table. Tables, structures and views may be included in a structure.

The length of the field names is more restricted in tables than in structures. In a table, a field name may not have more than 16 places, but in a structure up to 30 places are allowed for the field name. A structure therefore can only be included in a table if none of the field names of the structure are longer than 16 places.

The path of nested includes may only contain one table.

Table TAB1 includes structure STRUCT1, which in turn includes structure STRUCT2. The path of the nested includes here only contains table TAB1. It is also possible to include TAB1 in a further structure STRUCT0,

but no other table TAB2 may be included in TAB1 since in this case a path of nested includes would contain two tables (TAB1 and TAB2).

The fields of the include are added to the table in the database. If you inserted the fields of the include as key fields, the primary index of the table is built again.

You can find information about the activation flow in the activation log, which you can display with Utilities ® Activation log. The activation log is displayed immediately if errors occur when the table is activated.

I think this notes will be helpful for u in understanding.

Reward points if u found it usefull.

Regards,

Ravi Kumar

Read only

Former Member
0 Likes
930
Read only

Former Member
0 Likes
930

hi,

Include Struct:

===============

Can be used for any number of Tables / Structres.

Append Struct:

=============

1. Can be used/assigned exactly for one table or structure.

i.e., When u assign a structure to a table, in future u cannot use the same Append struct for any other tble / structure.

2.Foreign keys for the appended fields must be defined within the append structure

3. No append structures may be added to tables with long fields like data types VARC, LCHR or LRAW.

___________

APPEND structures are used to add additional fields to exactly one table

INCLUDE structure is used to include fields to several tables.

_____________

. Append structures

Append structures can only be assigned to a single table.

Append structures are created in the custome rnamespace ( ZZ or YY)

In case of new versions of the standard table during upgrade, the append structures are automatically appended to the new version of the standard table

Append structures can not be used with cluster and pool tables

Append structures are created in transaction SE11. Display the standard table fields and press the Append structure button.

When you press the button, SAP sugests a name for the new append structure. After you has accepted the name,

a screen will be shown where you can enter the new fields.

Remember to activate.

2. Customizing includes

Some of the SAP standard tables contains special include statements called Customizing includes. In contrast to Append structures,

Note that customizing includes are created by SAP, but the customer supply the fields for the include.

Customizing includes begin with CI_ and is part of the customer namespace

One Customizing include can be inserted into more than one table.

You can find Customizing includes in SE11 under structures.

Try to take a look at table RKPF which uses the Customizing include CI_COBL (In an IDES system).

Next try to add a field to CI_COBL, and activate it. If you go back to table RKPF you will se that your new field has been added.

check...

hope this helps you.

Read only

Former Member
0 Likes
930

Hi,

When upgrading to higher versions, The append structure fields will not maintained into higher version, where as Include structure fields will be uploaded to higher versions when upgrading.

Read only

Former Member
Read only

SantoshKallem
Active Contributor
0 Likes
930

append is restricted for one table

where as include can be used in multiple tables