‎2008 Mar 14 5:18 AM
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
‎2008 Mar 14 8:51 AM
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.
‎2008 Mar 14 5:26 AM
‎2008 Mar 14 5:34 AM
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
‎2008 Mar 14 5:35 AM
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
‎2008 Mar 14 6:37 AM
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.
‎2008 Mar 14 8:51 AM
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.