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

What are indexes? : sap abap data dictionary

1133


What is sequence of event triggered in report?

1013


hi experts,,, what is meant by documentation? test casr preparation? documentation and preparation and Tcode for this? quality and releasing? test case scenario?

2187


What is the difference between call transaction method and the session method? : abap bdc

966


Can i Have Some Realtime Examples on Badi ?

8786


What is bdc? : abap bdc

1016


A subroutine can contain nested form and endform blocks. State true or false. : abap modularization

1313


Kindly help me to Know the process of mapping in EDI from R/3 to a convertor(third party which translates IDoc flatfile to EDIFACT /XML / FTP /HTTP ) ?

2025


how to see the table output?

2206


What is netweaver???what is the relationship with ABAP?

2173


How do you save data in bdc tables? : abap bdc

1082


What is a data dictionary? : sap abap data dictionary

950


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

1143


Explain what are the problems in processing batch input sessions? How is batch input process different from processing on line?

1070


What work you have done in HR module

1357