Skip to Content
author's profile photo Former Member
Former Member

Structure & Internal Tables

What is the difference between Structure & Internal Tables,

Regards.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

13 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 06:32 AM

    both are contains information at run time only.

    only one difference is that at run time sturcture contains only one record, internal table can contain more than one record (many no of records)

    Madhavi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 06:33 AM

    Structure can store only one record. Itself can be considered as workarea.

    Internal Table can contain many records. Contains Header Line as workarea.

    awrd points if helpful

    Bhupal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 06:34 AM

    Hi,

    Structure meant for GLOBAL EXISTANCE(these could be used by any other program without creating it again).

    Structures are used especially to define the data at the interface of module pools and screens and to define the types of function module parameters.

    Structures that are used more than once can be changed centrally because they were defined centrall. The active ABAP Dictionary makes this change at all relevant locations. ABAP programs or screen templates that use a

    structure are automatically adjusted when the structure changes.

    It can hold only one record.

    tables: There is a physical table on the database for each transparent table.

    The names of the physical tables and the logical table definition in the ABAP/4 Dictionary correspond.

    All business data and application data are stored in transparent tables.

    It can hold lot of records.

    Pls. reward if useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 06:34 AM

    hi,

    Structure during runtime contails only one record

    but internal table during runtime contails no of records

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 06:35 AM

    Internal Table :

    is a structure which is defined with a 'OCCURS 0' extension with the definition of the structure and can hold data.

    Structure:

    is a definition with the field details and which can not hold any data in it.

    in the case given by you:

    1) Data: lt_filetable TYPE filetable, (Table type)

    The 'filetable' is a table declaration with 'OCCURS 0' parameter.

    2) ls_file TYPE file_table. (Structure).

    the 'file_table' is a structure definition.

    Rewards if useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 06:36 AM

    Hi

    internel tables are created in the programming itself and the data are read from the application level. Internel tables of one program cant be used in other programs. But structures once you create you can use it again and again.

    There are theree types of structure:-

    1. Flat structure( elementry fields)

    2. Nested structure ( type reference to other structure)

    3. deep structure ( type reference to database tables)

    with regards,

    sowjanya.gosala

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 06:37 AM

    hi chidambar,

    these are some differneces ---

    internel tables are created in the programming itself and the data are read from the application level. Internel tables of one program cant be used in other programs. But structures once you create you can use it again and again.

    There are theree types of structure:-

    1. Flat structure( elementry fields)

    2. Nested structure ( type reference to other structure)

    3. deep structure ( type reference to database tables)

    Internal Table can have multiple records where as strcuture can only have a single record.

    Structure is used to see the what are the records are available in database.

    But internal table is used to store the records from database.It stored in temporary storage. We can work with intenal table records instead of database.

    if we declare structure with TYPE then it is only a definition.

    if we declare structure with DATA then it creates objet and contains one record.

    it we declare structure with TABLE OF then it creates internall table of initial size.

    internall table must create through standard tables or structures only

    Structure is does not exit at the underlaying data base system level , it is exit only data dictionary level.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 06:39 AM

    hi Chindambar,

    Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.

    Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects A data type is the abstract description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The data type is also an attribute of an existing data object.

    Structures are freely-definable reports that consist of combinations of characteristics and basic key figures (for example, as calculated or restricted key figures) of the InfoCube. A structure can be a plan / actual comparison or a contribution margin schema, for example.

    You can use structures in several different queries. To do this, you have to save the InfoCube that you want to use again. These structures are then called reusable structures.

    So it is easier to tell the difference, structures that are not saved as reusable structures are called local structures. Local structures are only used in one query.

    Reward if helpful.

    Thankyou,

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 01:57 PM

    hi,

    Structure or work area contains only one record.

    Internal table contains more than one record.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 02:25 PM

    HI,

    Structure can hold only one record if u want to hold multiple records then u should go for internal table

    data:

    it_tab like standard table of splfi.

    this statement creates the internal table which holds multiple lines

    data:

    fs_stru like standard line of spfli.

    this statement creates structure which holds single line

    plzz reward if it is usefull to u..

    plzz dont forget to reward....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.