what is the difference table type and structure?

Answers were Sorted based on User's Feedback



what is the difference table type and structure?..

Answer / apun

A table type has some database attached to it, whereas the
structure is only a definition with NO DATABASE attached to
it.

Is This Answer Correct ?    47 Yes 19 No

what is the difference table type and structure?..

Answer / srikanth@bigtec

Difference between structure and table type is

Table type

The table type specifies how you can access individual table
rows via ABAP.
Generally all internal tables are treated as table types.
There are different types of table types like
standard,sorted and hashed.

Internal tables are used only during program execution i.e
data flows into internal table only during program execution.
Data manipulations in internal table during debugging will
not effect database.No memory is allocated for table types
like internal table.

structure

Structure contains data only when it is inserted in database
table using append or include.
We change the data in structure which will effect Database.
Memory is allocated to structure only when it is included in
table using append or include.

Is This Answer Correct ?    20 Yes 6 No

what is the difference table type and structure?..

Answer / sandipan banerjea

first we should know what a structure is.it is a SINGLE row.

let us consider few examples:

1) DATA struc_xyz TYPE sflight.

here, we are declaring a structure variable by the name
"struc_xyz" which can hold the values for the same fields
which are present in "sflight".
if the fields present in "sflight" are say
"carrid","connid","fldate", then the structure variable
"struc_xyz" can hold the values for the above mentioned fields.

but suppose from "sflight" we want only "carrid", and
"connid", why should we use the whole of "sflight"?its a
performance issue.

2) TYPES:BEGIN OF abc,

carrid TYPE sflight-carrid,
connid TYPE sflight-connid,

END OF abc.

DATA struc_xyz TYPE abc.

here, "struc_xyz" is the structure variable and "abc" is a
local structure type which we have created using the keyword
TYPES.

now,let us move on to TABLE TYPE.

what does the word "TABLE" in "TABLE TYPE" suggest?!

the run time table variable which is nothing but the
internal table, is to be dealt with now.

3) TYPES gty_flights TYPE STANDARD TABLE OF sflight.
DATA itab_gty_flights TYPE gty_flights.

here, "gty_flights" is the local table type.THE TYPE OF AN
INTERNAL TABLE IS CALLED AS "TABLE TYPE".
"itab_gty_flights" is the internal table.

a common begineer's error is :

DATA itab_gty_flights TYPE STANDARD TABLE OF gty_flights.

in such a case, "itab_gty_flights" will be declared as an
internal table whose rows are themselves internal tables!!!


NOTE: i have used the keyword TYPES in examples 2 and 3.

they have declared a local structure type and a local table
type respectively.

you can declare both the types globally.refer the next two
examples below and compare with examples 2 and 3.i hope, you
will notice the differences!!

4)

DATA: BEGIN OF struc_xyz,

carrid TYPE sflight-carrid,
connid TYPE sflight-connid,

END OF struc_xyz.

5)

DATA itab_gty_flights TYPE STANDARD TABLE OF sflight.



************THANK YOU***********************************

Is This Answer Correct ?    12 Yes 2 No

what is the difference table type and structure?..

Answer / i.srikanth

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.

Table types
Table types describe the structure and functions of internal
tables in the ABAP program. Their rows can have any row
type. Table types with elementary row type therefore can be
defined just the same as multi-dimensional table types
(table types with a table type as row type) or table types
using structures with table-like components.

In a simple words,
Structure is just a flat structure but Table type is an
internal table.

Sample code how to use them to create internal table:
* Create Internal table from a structure:
DATA: IT_DATA TYPE STANDART TABLE OF Structure.

* Create Internal table from a table type:
DATA: IT_DATA TYPE table_type.

Is This Answer Correct ?    9 Yes 4 No

what is the difference table type and structure?..

Answer / yallamandaiah nandigam

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.

Is This Answer Correct ?    8 Yes 4 No

what is the difference table type and structure?..

Answer / ashok

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.

Is This Answer Correct ?    0 Yes 0 No

what is the difference table type and structure?..

Answer / nag

structure means line type i.e work area of internal table






Table Type means Row type i.e body of internal table.

Is This Answer Correct ?    9 Yes 16 No

what is the difference table type and structure?..

Answer / uday

Stucture is line type which means body of internal table.
table type is row type which means workarea of IT.

Is This Answer Correct ?    18 Yes 44 No

Post New Answer

More SAP ABAP Interview Questions

hi friends, In smart form how can we convert the decimal to whole no. for ex. i have date like 5.456. now i want convert to whole no. after point value more then 5 means the no should come 6. below 5 means its come 5. any body can help me with code. its urgent. Thanks.

1 Answers  


What is the difference between open sql & native sql ?

4 Answers   DELL,


1.what aer the text modules. 2.what is function module in report. 3.what is the land scape in u r projwct.

4 Answers   Cap Gemini,


program name for displaying colors , and program name for displaying symbols in list ?

1 Answers  


What are the components in technical setting while creating a table

1 Answers   ITC Infotech,






Can I write COMMIT and ROLLBACK in user-exit?

4 Answers   GE,


what is the table to find change pointer status?

1 Answers  


You are running a report. It is taking long time for execution. What steps will you do to reduce the execution time.

1 Answers  


For particular transaction you want to upload the data using any of bdc method...if the transaction contains any of pop window functionaliy and having radio button in the window..Any one of the radio button must be selected then only the next data can be inserted how will you handle this scenario in your program

2 Answers   TATA,


What is an interactive report? What is the obvious difference of such report compared with classical type reports?

0 Answers  


What are the dis-advantages of logical databases? : abap hr

0 Answers  


How to transfer data which is coming from are report as output to another report

3 Answers   IBM,


Categories
  • SAP Basis Interview Questions SAP Basis (1262)
  • SAP ABAP Interview Questions SAP ABAP (3939)
  • SAPScript Interview Questions SAPScript (236)
  • SAP SD (Sales & Distribution) Interview Questions SAP SD (Sales & Distribution) (2716)
  • SAP MM (Material Management) Interview Questions SAP MM (Material Management) (911)
  • SAP QM (Quality Management) Interview Questions SAP QM (Quality Management) (99)
  • SAP PP (Production Planning) Interview Questions SAP PP (Production Planning) (523)
  • SAP PM (Plant Maintenance) Interview Questions SAP PM (Plant Maintenance) (252)
  • SAP PS (Project Systems) Interview Questions SAP PS (Project Systems) (138)
  • SAP FI-CO (Financial Accounting & Controlling) Interview Questions SAP FI-CO (Financial Accounting & Controlling) (2766)
  • SAP HR (Human Resource Management) Interview Questions SAP HR (Human Resource Management) (1180)
  • SAP CRM (Customer Relationship Management) Interview Questions SAP CRM (Customer Relationship Management) (432)
  • SAP SRM (Supplier Relationship Management) Interview Questions SAP SRM (Supplier Relationship Management) (132)
  • SAP APO (Advanced Planner Optimizer) Interview Questions SAP APO (Advanced Planner Optimizer) (92)
  • SAP BW (Business Warehouse) Interview Questions SAP BW (Business Warehouse) (896)
  • SAP Business Workflow Interview Questions SAP Business Workflow (72)
  • SAP Security Interview Questions SAP Security (597)
  • SAP Interfaces Interview Questions SAP Interfaces (74)
  • SAP Netweaver Interview Questions SAP Netweaver (282)
  • SAP ALE IDocs Interview Questions SAP ALE IDocs (163)
  • SAP Business One Interview Questions SAP Business One (110)
  • SAP BO BOBJ (Business Objects) Interview Questions SAP BO BOBJ (Business Objects) (388)
  • SAP CPS (Central Process Scheduling) Interview Questions SAP CPS (Central Process Scheduling) (14)
  • SAP GTS (Global Trade Services) Interview Questions SAP GTS (Global Trade Services) (21)
  • SAP Hybris Interview Questions SAP Hybris (132)
  • SAP HANA Interview Questions SAP HANA (700)
  • SAP PI (Process Integration) Interview Questions SAP PI (Process Integration) (113)
  • SAP PO (Process Orchestration) Interview Questions SAP PO (Process Orchestration) (25)
  • SAP BI (Business Intelligence) Interview Questions SAP BI (Business Intelligence) (174)
  • SAP BPC (Business Planning and Consolidation) Interview Questions SAP BPC (Business Planning and Consolidation) (38)
  • SAP BODS (Business Objects Data Services) Interview Questions SAP BODS (Business Objects Data Services) (49)
  • SAP BODI (Business Objects Data Integrator) Interview Questions SAP BODI (Business Objects Data Integrator) (26)
  • SAP Ariba Interview Questions SAP Ariba (9)
  • SAP Fiori Interview Questions SAP Fiori (45)
  • SAP EWM (Extended Warehouse Management) Interview Questions SAP EWM (Extended Warehouse Management) (58)
  • Sap R/3 Interview Questions Sap R/3 (150)
  • SAP FSCM Financial Supply Chain Management Interview Questions SAP FSCM Financial Supply Chain Management (101)
  • SAP WM (Warehouse Management) Interview Questions SAP WM (Warehouse Management) (31)
  • SAP GRC (Governance Risk and Compliance) Interview Questions SAP GRC (Governance Risk and Compliance) (64)
  • SAP MDM (Master Data Management) Interview Questions SAP MDM (Master Data Management) (0)
  • SAP MRS (Multi Resource Scheduling) Interview Questions SAP MRS (Multi Resource Scheduling) (0)
  • SAP ESS MSS (Employee Manager Self Service) Interview Questions SAP ESS MSS (Employee Manager Self Service) (13)
  • SAP CS (Customer Service) Interview Questions SAP CS (Customer Service) (0)
  • SAP TRM (Treasury and Risk Management) Interview Questions SAP TRM (Treasury and Risk Management) (0)
  • SAP Web Dynpro ABAP Interview Questions SAP Web Dynpro ABAP (198)
  • SAP IBP (Integrated Business Planning) Interview Questions SAP IBP (Integrated Business Planning) (0)
  • SAP OO-ABAP (Object Oriented ABAP) Interview Questions SAP OO-ABAP (Object Oriented ABAP) (70)
  • SAP S/4 HANA Finance (Simple Finance) Interview Questions SAP S/4 HANA Finance (Simple Finance) (143)
  • SAP FS-CD (Collections and Disbursements) Interview Questions SAP FS-CD (Collections and Disbursements) (0)
  • SAP PLM (Product Lifecycle Management) Interview Questions SAP PLM (Product Lifecycle Management) (0)
  • SAP SuccessFactors Interview Questions SAP SuccessFactors (33)
  • SAP Vistex Interview Questions SAP Vistex (0)
  • SAP ISR (IS Retail) Interview Questions SAP ISR (IS Retail) (28)
  • SAP IdM (Identity Management) Interview Questions SAP IdM (Identity Management) (0)
  • SAP IM (Investment Management) Interview Questions SAP IM (Investment Management) (0)
  • SAP UI5 Interview Questions SAP UI5 (59)
  • SAP SCM (Supply Chain Management) Interview Questions SAP SCM (Supply Chain Management) (51)
  • SAP XI (Exchange Infrastructure) Interview Questions SAP XI (Exchange Infrastructure) (49)
  • SAP Cloud Platform Interview Questions SAP Cloud Platform (34)
  • SAP Testing Interview Questions SAP Testing (89)
  • SAP SolMan (Solution Manager) Interview Questions SAP SolMan (Solution Manager) (63)
  • SAP MaxDB Interview Questions SAP MaxDB (116)
  • SAP GUI Interview Questions SAP GUI (15)
  • SAP AllOther Interview Questions SAP AllOther (329)