‎2008 May 09 11:45 AM
‎2008 May 09 11:50 AM
How do you want to use a structure in your program .
For ex as an internal table or work area ...........
-gopi
‎2008 May 09 11:55 AM
hi check this...
data: it_table type structure occurs 0 with header line .
ex
data: it_mara type mara occurs 0 with header line .
regards,
venkat appikonda .
‎2008 May 09 11:55 AM
hi there...
Structures basically are a design of the table which get filled only on run time.
In report program, structures can be used to define an internal table. the syntax is
Data : itab like str occurs 10 with header line.
where str is the structure.
u can compare the structure with a header line or a work area which also gets filled on run time.
otherwise, there is no other use or significance or structure.
Do reward if helpful or get back if further clarification is required.
‎2008 May 09 12:03 PM
hi,
examine these codes in debug mode,
TYPES: BEGIN OF T_VBAK,
VBELN TYPE VBAK-VBELN,
ERDAT TYPE VBAK-ERDAT,
ERNAM TYPE VBAK-ERNAM,
end of t_vbak.
data : it type STANDARD TABLE OF t_vbak,
wa type t_vbak.
select VBELN
ERDAT
ERNAM
from VBAK
into table it.
select VBELN
ERDAT
ERNAM
from vbak
into wa.
endselect.
Reward points if useful..........
‎2008 May 09 12:05 PM
Hi ,
Structures are created in DD.So the DD objects are globally avaliable to all the work bench tools.
We use the Structures in programs to crete the data objects like field strings
example:
if we have a structure ZSTRUCT in DD.
in prog
data fs_data type ZSTRUCT.
We use the structures in programs to create intenal tables.
data itab_data type standard table of ZSTRUCT.
The main advantage of creating structure in DD is if there are any changes are done on structure those are reflect on all programs using this structure.