2008 Feb 20 8:38 AM
URGENT
2008 Feb 20 8:41 AM
Creating structure and the refering internal table to that is the good programming practice.
To remove hard coding we use structures.
Ex: you have created structure and refered 10 internal tables to that.
if u want to add new field or u want to change any thing . changing in the structure is enough to all itabs
else u need to change in all the itabs.
Regards,
Ajay
2008 Feb 20 8:43 AM
hi,
Structures are used to define any user-defined types in the ABAP Dictionary. A structure has components that can themselves be structured, that is they can obtain their type from a structure or a table type.
for more details:
http://help.sap.com/saphelp_nw04/helpdata/en/ac/3547360f2ea61fe10000009b38f839/frameset.htm
2008 Feb 20 8:45 AM
Structure: The object structure refers to the defination of object that does not have any contents. It is like table or view . but it never has entriues i.e it is only a structure. the basic difference between structure and table is tht the structure doesnot exist in the underlying database whereas table data exist in the underlying database..
Structure : If you want the data type with combination of any data types we can create structure in the it can not occupy any memory, it create memory when we creare any variable by using this structure, we can create the structure by using Type .
Structures:
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.
Eg.
TYPES :BEGIN OF x_item,
shinum(17) TYPE c,
inponum(20) TYPE c,
scode(1) TYPE c,
rdate(8) TYPE c ,
End of x_item.
structure is just another data type. We have data types i, p, n, c etc which specify the format in which a single data item can be stored. Similarly, a structure is a complex type, built based on the basic types like i, p etc so that it is suitable for storing multiple data items.
Now using these complex types (structures), we can declare variables which are called work areas and internal tables
Regards,
Chandru
2008 Feb 20 8:46 AM
hi,
if you have created a structure, it can be included anywhere in any tables so that u neednot create the table with fields in the structure.
just goto table where u need to include it and write .include
structure name.
the whole structure gets included in table.
regards,
sreelakshmi.
2008 Feb 20 8:47 AM
hI
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.
2008 Feb 20 10:11 AM
Hi Dear,
Structure is mainly responsible for creating the
Userdefined data types.
After you create the structure you create the
workarea and internal table for tht structure.
It means you can store the data temporarily.
By using tht structure you can create more than
one workarea n internal tables.
You are gng to save the lot of memory space in the
ABAB memory area.
If it helps reward me points.
Regards
Ashok
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |