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

what is the actual use of a structure?

what is the actual use of a structure? is there any situation where structure is unavoidable?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jan 31, 2008 at 06:30 AM


    A structure if created in DDIC(Data Dictionary) is a global DATA STRUCTURE which is used to group related information, for example you would group all the details of your bank account into a structure BANK_ACCOUNT that contains fields like account_Id, account_holder_name etc.

    If you create a structure in your program then it is local to your program. So you use this structure to create data holders of this DATA TYPE to hold data in your program.

    STRUCTURE is similar to structure in any other programming language like "C".

    Hope its clear now.



    Add a comment
    10|10000 characters needed characters exceeded

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


    May be this ll help u.


    A structure is a sequence of any elementary types, reference types, or complex data types.

    You use structures in ABAP programs to group work areas that logically belong together. Since the elements of a structure can have any data type, structures can have a large range of uses. For example, you can use a structure with elementary data types to display lines from a database table within a program. You can also use structures containing aggregated elements to include all of the attributes of a screen or control in a single data object.

    The following terms are important when we talk about structures:

    Nested and non-nested structures

    Flat and deep structures

    A nested structure is a structure that contains one or more other structures as components. Flat structures contain only elementary data types with a fixed length (no internal tables, reference types, or strings). The term deep structure can apply regardless of whether the structure is nested or not. Nested structures are flat so long as none of the above types is contained in any nesting level.

    Any structure that contains at least one internal table, reference type, or string as a component (regardless of nesting) is a deep structure. Accordingly, internal tables, references, and strings are also known as deep data types. The technical difference between deep structures and all others is as follows. When you create a deep structure, the system creates a pointer in memory that points to the real field contents or other administrative information. When you create a flat data type, the actual field contents are stored with the type in memory. Since the field contents are not stored with the field descriptions in the case of deep structures, assignments, offset and length specifications and other operations are handled differently from flat structures.

    Internal Tables

    Internal tables consists of a series of lines that all have the same data type. Internal tables are characterized by:

    The line type, which can be any elementary type, reference type, or complex data type.

    The key identifies table rows. It is made up of the elementary fields in the line. The key can be unique or non-unique.

    The access method determines how ABAP will access individual table entries. There are three access types, namely unsorted tables, sorted index tables and hash tables. For index tables, the system maintains a linear index, so you can access the table either by specifying the index or the key.

    Hashed tables have no linear index. You can only access hashed tables by specifying the key. The system has its own hash algorithm for managing the table.

    You should use internal tables whenever you need to use structured data within a program. One imprint use is to store data from the database within a program.

    And also go through this link:

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 31, 2008 at 06:36 AM


    Structure is used when different types of data has to be collected under one common types to map the real world entity. For example 'address' is the real world entity which involved many different data types to be combined and represented as the single structure.

    Address - structure

    - Name - string field

    - Street name - string field

    - house number - string / number depending on the data

    - city - string field

    - pincode - integer field

    For many situation like these structures are inevitable.



    Add a comment
    10|10000 characters needed characters exceeded

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

    Structures globally define the data structure occurring in program calculations or when data is passed between programs.

    Structures are used in particular to define the data at the interface of module pools and screens and to define the types of the parameters of reusable forms or function modules.

    Structures are defined (almost) exactly like tables, but no database tables are generated from them. The same data elements and domains can be used in structures as in tables. Tables can also be included.

    A structure (structured type) consists of components (fields) whose types are defined.

    A component can have an elementary type, a structured type, a table type or a reference type.

    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.

    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.