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

STRUCTURES

prasanth_kasturi
Active Contributor
0 Likes
860

Hi....

Is there any difference between normal structure we create in DDIC and Include & Append structure ??

As we know tables hold persistent data and structures contain only at run time

how the Include & Append structure( we create to enhance the tables) hold persistent data.?

(or)

How the include and append structures contain persistent data when they are in databasetable

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
826

Hi prasanth,

when you add structure to table it means

those filds from structure are actually created in underlaying data base as the table filds. so it can definately hold the persisten data.

we add the structures to database tabel for our undersatnding and reuasbility.

if we want to add logical group of filds to already present table instawed of adding one by one we include them in a structure and then add the structure.

but when it is added to structure it does create the database table filds actually and hence it can hold data in databse.

hope ot removed your confusion.

5 REPLIES 5
Read only

Former Member
0 Likes
826

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.

Regards

Read only

Former Member
0 Likes
826

INCLUDE STRUCTURE:

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

Regards

Read only

prasanth_kasturi
Active Contributor
0 Likes
826

Hi...Sravan... I know these difference....

but my main doubt was how a structure hold persistent data when used in a database table in contrast to its property of having data only at run time.

Read only

Former Member
0 Likes
827

Hi prasanth,

when you add structure to table it means

those filds from structure are actually created in underlaying data base as the table filds. so it can definately hold the persisten data.

we add the structures to database tabel for our undersatnding and reuasbility.

if we want to add logical group of filds to already present table instawed of adding one by one we include them in a structure and then add the structure.

but when it is added to structure it does create the database table filds actually and hence it can hold data in databse.

hope ot removed your confusion.