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

difference between structure and view

Former Member
0 Likes
1,143

Hi all

Can any one tell waht is the difference between structure and view

thanks

devi

7 REPLIES 7
Read only

anversha_s
Active Contributor
0 Likes
985

hi,

There are <u><b>4 types views</b></u> are avilable in SAP.

Database View - To club more than one table

Projection View - To hide fields in one table

Maintanance View - To maintain database records in table

Help View - To provide help for a fields (Same functionality as Search help. This is outdated)

View are improves perfromance in the following aspects

1. If you want to use more than two table in 'JOIN' condition better to use Views . It will improves performance of a program

2. If you want to use mutiple FOR ALL ENTRIES clause, better to club all SELECT statement in a view.

note:

1.Views does not contain data in it. It fetches data from the database only depending on the condition ...

2.Views are part of data dictionary. They are a window to view the data in database

3.views can be used to give security to data. users can be allowed to view only basic data only

<u><b>The structure</b></u> that we create in program are workareas where we can store the data from internal tables.

They are similar to headerline of the internalt table.

We declare structure using data statement.

data : begin of itab,

ebeln like ekpo-ebeln,

ebelp like ekpo-ebelp,

end of itab.

Or we can declare a type.

types : begin of ttab,

ebeln like ekpo-ebeln,

ebelp like ekpo-ebelp,

end of ttab.

data : itab type ttab.

Or the header lines of the table can be used as workarea which are structure which have the same type

and same name as that of table.

data : itab type ttab with header-line.

Regards

Anver

Read only

Former Member
0 Likes
985

Hi,

When you create a table, a key is assigned as required by the program. The fields contained there could be superfluous when solving a task or they might not be sufficient. In this case you can create a<b> view</b> on several tables or on parts of tables.

Views are off 4 types

Database View - To combine more than one table

Projection View - To hide fields in one table

Maintanance View - To maintain database records in table

Help View - To provide help for a fields

A structure is a complex type and consists of components that can have any type (data element, structure, table type or reference type).

Structures are used in ABAP programs or to define the type of the interface parameters of function modules.

<i>

Structured data type in ABAP:</i>

A structure is a group of internal fields that logically belong together.

In ABAP, you address an entire structure by its name. To address the individual fields within a structure, you specify the name of the structure followed by the relevant field name.

A structure contains a hierarchy of links to documents with content information (content objects) and possibly to other structures.

Structures are used as a table of contents and as a navigation instrument when displaying.

Regards,

Gunasree.

Read only

Former Member
0 Likes
985

Hi,

When you create a table, a key is assigned as required by the program. The fields contained there could be superfluous when solving a task or they might not be sufficient. In this case you can create a view on several tables or on parts of tables.

Views are off 4 types

Database View - To combine more than one table

Projection View - To hide fields in one table

Maintanance View - To maintain database records in table

Help View - To provide help for a fields

A structure is a complex type and consists of components that can have any type (data element, structure, table type or reference type).

Structures are used in ABAP programs or to define the type of the interface parameters of function modules.

Structured data type in ABAP:

A structure is a group of internal fields that logically belong together.

In ABAP, you address an entire structure by its name. To address the individual fields within a structure, you specify the name of the structure followed by the relevant field name.

A structure contains a hierarchy of links to documents with content information (content objects) and possibly to other structures.

Structures are used as a table of contents and as a navigation instrument when displaying.

Regards,

Gunasree.

Read only

Former Member
0 Likes
985

Hi rama,

structure wont hold any data(data only hold at runtime) whereas views can maintain the data.

structure is nothing but skelton of the table whereas views will be defined with the required no of fields.

Read only

Former Member
0 Likes
985
Read only

Former Member
0 Likes
985

Hi,

A structure provide the skeleton of a table without any actual data.They do not have physical storage of data.

Views do not have physical storage of data.The view is derived from one or more tables which is created only with the required fields from the database table(s). It can also be created with table inner joins and specifying conditions for data retrieval.

Regards,

Beejal

**Reward if helpful

Read only

Former Member
0 Likes
985

Basically structure and view are logical concepts.The view is derived from one or more tables which is created only with the required fields from the database table(s). A structure can be considered as a temporary work area which can hold one record at a time.We can define the structure type by manually specifying the individual fields or can declare it as type of a table.

Plz reward points if u find the above useful.