cancel
Showing results for 
Search instead for 
Did you mean: 

Structures and tables

Former Member
0 Kudos

Hi all,

This question was asked at IBM for SD interview

I doubt if this is an SD question but your inputs will be appreciated.

Given 10 differences between table and structure

thanks

Vikrant

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

Dear Vikranth,

To start with it's definitely not an SD question or any functional module for that matter.

It is a technical one which belongs to ABAP. Both can be created using transaction SE11 (Data Dictionary).

The differences between a STRUCTURE and a DATABASE TABLE:

1. Structure does not store data whereas Tables can store data.

2. You will have to specify technical settings when you create a table in SE11 Where as you wont while creating a structure.

Technical settings basically contains data class, size category, and buffering type.

3. You can indexes for a table where as there will no indexes for a structure.

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

Structure does not exist at the underlying data base level. Structure exists as Definition in the Dictionary.

5. In a database table, you can only include flat structures as substructures

The differences between a STRUCTURE defined in a program and an INTERNAL TABLE:

1. Structure can hold only one value at a time whereas internal table can hold multiple records.

2. You can specify table type while defining an internal table but not for a structure.

3. You can use loop statement for an internal table but nor for a structure.

The difference between internal tables and database tables:

  • The basic difference is database tables are stored in DB server and the internal tables are virtual tables these are created run time only

  • Internal tables are created dynamically, the memory of internal tables is not

permant memory, for internal tables the memory will be created in the application server and it is external memory and terminates after the program termination.

There are there types of structure:-

1. Flat structure( elementary fields)

2. Nested structure ( type reference to other structure)

3. deep structure ( type reference to database tables)

Reward points if this is helpful.

Regards,

Naveen.

Former Member
0 Kudos

Hi,

Table is used to store data with multiple records and exists in Database.

Structure basically doesn't store data , stores a record at run time, acting as a Work area

see the doc about different types of Tables

The following are the table types used in SAP :

I. Transparent tables (BKPF, VBAK, VBAP, KNA1, COEP)

Allows secondary indexes (SE11->Display Table->Indexes)

Can be buffered (SE11->Display Table->technical settings) Heavily updated tables should not be buffered.

II. Pool Tables (match codes, look up tables)

Should be accessed via primary key or

Should be buffered (SE11->Display Table->technical settings)

No secondary indexes

Select * is Ok because all columns retrieved anyway

III. Cluster Tables (BSEG,BSEC)

Should be accessed via primary key - very fast retrieval otherwise very slow

No secondary indexes

Select * is Ok because all columns retrieved anyway. Performing an operation on multiple rows is more efficient than single row operations. Therefore you still want to select into an internal table. If many rows are being selected into the internal table, you might still like to retrieve specific columns to cut down on the memory required.

Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported

Can not be buffered

IV. Buffered Tables (includes both Transparent & Pool Tables)

While buffering database tables in program memory (SELECT into internal table) is generally a good idea for performance, it is not always necessary. Some tables are already buffered in memory. These are mostly configuration tables. If a table is already buffered, then a select statement against it is very fast. To determine if a table is buffered, choose the 'technical settings' soft button from the data dictionary display of a table (SE12). Pool tables should all be buffered.

Pl reward if useful.

Thanks

Sadhu Kishore

Former Member
0 Kudos

HI Vikrant,

Go thr below link:

Regards

Srini

Former Member
0 Kudos

HI Vikrant,

you should have told him that I am SD consultant and not a ABAPer.

Regards

Srini

Former Member
0 Kudos

Tables actually store Data, till it is archived, but structure stores the data temporarily.

Tables data can be accessed through Se16 / Se11, but structure data cannot be accessed.

Reagrds,

Rajesh Banka

Former Member
0 Kudos

Link: http://www.sap-img.com/

Topic: Free ABAP eBook Download

SAP MM, SD, FI, PS, PP, PM, HR, System Tables

Regards,

Rajesh Banka

Reward Points if helpful.

Former Member
0 Kudos

Hello Vikrant,

Structure and table both are 2/2 matrices but there are many differences between table and structure..........like for example -

1. Table can store the data physically but a structure dose not store.

2. Table can have primary key but a structure dose not have.

3. Table can have the technical attribute but a structure dose not have.

Structure doesn't contain technical attributes.

Structure doesn't contain primary key.

structure doesn't stores underline database level.

<b>Reward if helpful</b>

Regards

Sai

alex_m
Active Contributor
0 Kudos

Certainely this is not SD question.

I dont know 10 diference, but this is main.

1. Structure will hold only one record at a time but table will hold n no of records.

2. When u activate the table, this will created in undeylying data base but this not in structure.