Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference table type and structure?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between sap script and report?

1154


What should be the approach for writing a bdc program? : abap bdc

1061


if while coding power goes off , how to retrieve the codes?

2034


Explain what is sap script? What is the purpose of sap script? Difference between sap script and report?

1009


Can we create a gui status in a program from the object browser?

1099


What are data classes? What are the various data classes available for selection? : abap data dictionary

958


What is a multiple line field?

984


What is the significance of technical settings (specified while creating a table in the data dictionary) ?

975


In Table Field when display the Name, whose first charecter should be capital letter and rest will be small letter.

1999


Select up to 1 row and select single difference ?

1071


What are client dependent objects in abap/sap?

1022


Does sap handle multiple languages?

957


What are the types of subroutines? : abap modularization

985


What is meant by hide area?

1075


what are the various types of parameters and how are they distinguished from one another?

1145