09-21-2017 9:38 AM
Hi,
When I want to declare an internal table of a data base table, I first create a table type structure of this db table. Is there a way to do this only using abap, without using any 'Z' table type object?
09-21-2017 9:56 AM
09-21-2017 9:55 AM
Ibrahim,
data: it_mara type standard table of mara,
wa_mara type mara.
it_mara type standard table of mara => Internal table has the complete structure of Mara with all the fields, holds a number of records
wa_mara type mara => Work area has the complete structure of Mara with all the fields, holds a single record (not a table)
You need table type and line type only when you are working with deep structures ie.
For ex say itab has fields => field1,field2,field3.
field1 single value
field2 single value
field3 deep structure which can hold a set of records.
Here for field3 you need a deep structure only if it has to hold a set of records.
Ex of a deep structure.........
Just declare this in a test program,and put a break point and check the internal table and workarea,you will get an idea.
K.Kiran.
09-21-2017 9:56 AM
09-21-2017 10:10 AM
Hi,
Types: Begin of struct_user,
user type usr01-user,
useradres type adres01-useradres,
End of struct_user.
DATA: inttab_user type table of struct_user.
somewhat more complex if you have to user different tables