Application Development 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: 

what is the differeces between tables , structures and views

Former Member
0 Kudos

hi

what is the differeces between tables , structures and views

please reply

thanks in advance

5 REPLIES 5

Former Member
0 Kudos

Hello Ashok,

Tables are:Tables can be defined independently of the database in the ABAP Dictionary. The fields of the table are defined with their (database-independent) data types and lengths.

When the table is activated, a physical table definition is created in the database for the table definition stored in the ABAP Dictionary. The table definition is translated from the ABAP Dictionary to a definition of the particular database.

Structures are:

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.

An append structure is a structure that is assigned to exactly one table. There can be more than one append structure for a table.

When a table is activated, all the append structures of the table are searched and the fields in these append structures are added to the table. If an append structure is created or changed, the table 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 in the database, adding append structures and 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 lie 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.

The new versions of the standard tables are imported after an upgrade, and the fields contained in the append structures are added to the new standard tables at activation.

and Views are:

Data about an application object is often distributed on several tables. By defining a view, you can define an application-dependent view that combines this data. The structure of such a view is defined by specifying the tables and fields used in the view. Fields that are not required can be hidden, thereby minimizing interfaces. A view can be used in ABAP programs for data selection.

Database views are implemented with an equivalent view on the database.

Projection views are used to hide fields of a table (only projection).

Help views can be used as selection method in search helps.

Maintenance views permit you to maintain the data distributed on several tables for one application object at one time.

If useful reward points.

Vasanth

Former Member
0 Kudos

Tables:

Tables can be defined independently of the database in the ABAP Dictionary. The fields of the table are defined together with their (database-independent) data types and lengths.

A table definition in the ABAP Dictionary has the following components:

Table fields: The field names and the data types of the fields contained in the table are defined here.

Foreign keys: The foreign keys define the relationships between this table and other tables.

Technical settings: The technical settings define how the table is created on the database.

Indexes: Indexes can be defined for the table to speed up data selection from the table.

There are three categories of database tables in the ABAP Dictionary.

A physical table definition is created in the database for the table definition stored in the ABAP Dictionary for transparent tables when the table is activated. The table definition is translated from the ABAP Dictionary to a definition of the particular database.

On the other hand, pooled tables and cluster tables are not created in the database. The data of these tables is stored in the corresponding table pool or table cluster. It is not necessary to create indexes and technical settings for pooled and cluster tables.

STRUCTURES :

Structures (structured types)

Structured types describe the structure and functions of any structured data objects, that is of data structures with components of any type.

A component can be a field with an elementary type or can itself be a structure. A table can also be used as a component in a structure.

A database table always has a structure and is therefore implicitly a structured type. However, the fields of a database table can only have an elementary type.

**Structures can hold data only at Runtime.

A view is a logical view on one or more tables, that is, a view is not actually physically stored, instead being derived from one or more other tables.

In the simplest case, this derivation process can involve simply suppressing the display of one or more fields from a table (projection) or transferring only certain records from a table to the view (selection). More complicated views can be assembled from several tables, with individual tables being linked using the relational join operation.

Use

Logical views for the application permitting direct access to the data can be generated with the definition of view. The structure of such a view is defined by specifying the tables and fields involved in the view.

reward if helps.

Thanks,

krishnakumar

Former Member
0 Kudos

Hi Ashok,

Tables are something like "data containers" - I mean, they actually store several data records.

Structures are just several variables put together. You can assign <b>one single record</b> of a table to a structure. They store no data themselves.

Views are "stored queries". They can reference several tables, but they store no data themselves. Instead, every time you access a view, the associated "stored query" is executed.

I hope it helps. BR,

Alvaro

Former Member
0 Kudos

hi ashok

A<b> view</b> is a logical view on one or more tables, that is, a view is not

actually physically stored, instead being derived from one or more other

tables.

<b> Tables</b> can be defined independently of the database in the ABAP Dictionary. The fields of the table are defined together with their (database-independent) data types and lengths.

A table definition in the ABAP Dictionary has the following components:

o Table fields: The field names and the data types of the fields contained in the table are defined here.

o Foreign keys: The foreign keys define the relationships between this table and other tables.

o Technical settings: The technical settings define how the table is created on the database.

<b>Structured</b> types describe the structure and functions of any structured data objects, that is of data structures with components of any type.

A component can be a field with an elementary type or can itself be a structure. A table can also be used as a component in a structure.

A database table always has a structure and is therefore implicitly a structured type. However, the fields of a database table can only have an elementary type.

Former Member
0 Kudos

hi,

Tables are defined in the ABAP Dictionary independently of the database. A table having the same structure is then created from this table definition in the underlying database.

Views are logical views on more than one table. The structure of the view is defined in the ABAP Dictionary. A view on the database can then be created from this structure.

A structure is a sequence of any other data types from the ABAP Dictionary, that is, data elements, structures, table types,or database tables. When you create a structure in the ABAP Dictionary, each component must have a name and a data type.

In an ABAP program, you can use the TYPEaddition to refer directly to a structure.

Regards,

Shalini