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 and append structure.

Former Member
0 Likes
6,165

What is the difference b/w include and append structure ?

1 ACCEPTED SOLUTION
Read only

Former Member
3,425

hi sir,

INCLUDE:

Includes are used to group fields and insert them together in a table or structure.

An include program has two main functions:

It contains code which can be used by several different programs.

It helps you to modularize programs, which consist of many different logically related parts. Each of these parts is stored as a separate include program.

Include programs improve the readability of programs and make maintenance easier.

Include reports contain rolled out parts of reports. They are called by the main report, and can only be run in conjunction with the main report.

APPEND:

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

11 REPLIES 11
Read only

Former Member
3,425

hi,

Enhancement using Append structures

Append structures allow you to attach fields to a table without actually having to modify the table itself. You can use the fields in append structures in ABAP programs just as you would any other field in the table.

Click on the append structure tab and opt to create new

structure.

Append structures allow you to enhance tables by adding fields to them that are not part of the standard. With append structures; customers can add their own fields to any table or structure they want.

Append structures are created for use with a specific table. However, a table can have multiple append structures assigned to it

Customers can add their own fields to any table or structure they want.

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

Enh. using Customizing includes

Some of the tables and structures delivered with the R/3 standard contain special include statements. These are often inserted in those standard tables that need to have customer-specific fields added to them. Such includes are Customizing includes. (CI).

A Customizing include is a structure that satisfies a special naming convention. (name begins with CI_).

A Customizing include is a structure that satisfies a special naming convention. The name of a Customizing include begins with ‘CI_’ and the include is in the customer namespace .

If enhancements are already planned in the R/3 standard using customer-specific fields, such Customizing includes are included. in the corresponding standard table or standard structure. The Customizing include (that is the definition of the structure itself) is usually first created in the customer system and filled with fields by special Customizing transactions.

Customers can add their own fields to any table or structure they want.

The Customizing include field names must lie in the customer namespace just like field names in append structures. These names must all begin with either YY or ZZ.

Append structures v/s Customizing includes

In contrast to append structures, Customizing includes can be inserted into more than one table.

As an example the customizing include that we created (CI_DEMO) could be a part of multiple tables in the database whereas the append structure (ZDEMO_APPEND) can only be assigned to one table. (here MARA).

This provides for data consistency throughout the tables and structures affected whenever the include is altered.

Reward i fusefull

pankaj

Read only

Former Member
0 Likes
3,425

Ignore my answer

Read only

Former Member
0 Likes
3,425

Hi,

Include structures are reusable, i.e when u craete a include staructure IS1, then this satructure can be used for any other database tables too.

we can add upto maximum of 8 different include structures to a single database table.

Append structures are local to particular DB table , i.e they are not reusable.

we can add any number of Append staructures to Db table. There is no restriction in case of append structures.

Revrt back if any issues,

Regards,

Naveen

Read only

Former Member
0 Likes
3,425

>

> What is the difference b/w include and append structure ?

Hi,

suppose you created one structure.

now you want to add that structure to your table.

if you go for .include then the same structure can be reusable to other tables also.

if you go for .append then the structure is restricted for that particular table only.

regards,

swami.

Read only

Former Member
0 Likes
3,425

To explain in a simple way

Include structrues can be reused to more than one table

Append structures are specific to one table and cannot reused

During the upgradation or copying the table which has append structures , after the process the append structures field

will become normal fields of copied table and upgraded table.

Regards,

priya

Read only

Former Member
0 Likes
3,425

hI,

Include is used in tables and programs..

append is used for internal tables

Regards,

V.Balaji

Reward if usefull

Read only

Former Member
0 Likes
3,425

Hi

include structure: u can include the structure any where in between the feilds.

and u can delete the include structure also

whereas for append structure..u can only append a structure at the end of the table feilds..

and if u want to delete the append structure u need to delete the entire table..

Read only

Former Member
0 Likes
3,425

To explain in a simple way

Include structrues can be reused to more than one table

Append structures are specific to one table and cannot reused

During the upgradation or copying the table which has append structures , after the process the append structures field

will become normal fields of copied table and upgraded table.

Regards,

priya

Read only

Former Member
0 Likes
3,425

you can include a structure between any two fields of a table but you can apend a structure only at the end of last field.include structure is reusable but append structure is not.

Read only

Former Member
0 Likes
3,425

We use INCLUDE STRUCTURE Statement when we define a new structure using DATA or TYPES to include the component of the structured data object in the new structure that we are defining .

Where as APPEND statement is used when we add an record to an internal table

Example FOR INCLUDE STRUCTURE STATEMENT.

DATA: BEGIN OF new_struc.

INCLUDE STRUCTURE old_struc.

DATA: END OF new_struc.

Here Structure new_struc is new structure which contains the components of old_struc which is already defined .

Example FOR APPNED STATEMENT.

Here we have an internal table suppose i_tab with work area wa_tab.

Append wa_tab to i_tab.

By this statement we are adding an record in wa_tab to internal table i_tab.

Read only

Former Member
3,426

hi sir,

INCLUDE:

Includes are used to group fields and insert them together in a table or structure.

An include program has two main functions:

It contains code which can be used by several different programs.

It helps you to modularize programs, which consist of many different logically related parts. Each of these parts is stored as a separate include program.

Include programs improve the readability of programs and make maintenance easier.

Include reports contain rolled out parts of reports. They are called by the main report, and can only be run in conjunction with the main report.

APPEND:

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