Difference Between A Structure and A Table in ABAP
Difference Between A Structure and A Table in ABAP
Difference Between a Structure and a Table in ABAP May 23, 2005 6:19 PM
Hello,
I'm new to SAP and ABAP. Could any body tell me what are the differences between a structure and a Table in
ABAP?
I used Trans se16 to view the content of what I thought to be a table but I got the Message that it was a
structure and not a table. Is there any transaction I could use to view the content of the structure?
Thank you.
Tags: abap
Regards,
Narinder Hartala
Welcome to SAP
Curious to know how you got the name that you wanted to browse through SE16. Sometimes what happens
is that the field or the collection of fields that you are viewing on the screen - to get details about where these
fields are stored in the database, you try to get more info on those fields by pressing F1 on that field. The name
that you retrieve from the additional info screen - looks like a table name but sometimes it is not (and I think in
your case it turned out to be a structure).
Structure are nothing but record definition. Data that gets stored using the record definition goes in SAP table.
For example:
data: begin of emp_info,
emp_name(20) type c,
emp_age(3) type n,
end of emp_info.
Above is a record definition (which could also be thought of as a structure). When you want to store the
data, you would move name to emp_name and age to emp_age and finally insert the emp_info information
to the table. The fields in table may be named as EMPLOYEE_NAME and EMPLOYEE_AGE, but the type
specification should be consistent with the record/structure specification.
I hope now you can make out why you don't see data in the structure - and the difference between the
structure and the table.
Hope it helps - and good lukc!
Regards,
Chetan Singh
Hi,
In this link, you can find some useful coding samples.
http://www.sapdevelopment.co.uk/java/jco/jcohome.htm
http://www.henrikfrank.dk/abapexamples/Java/sapjava_getcompanycode_list.htm
3. I saved the infoset & asked for generation, but it gave an error saying 'Commentary <Query_head> or
<Query_body> is missing'. I am not able to figure out what to do.
My requirement - To join the table MARD with Structure MDPS, so that i can have a query where i can enter
the material number & plant number & view if a purchase requisition has been firmed or not (Field - FIX01).
I hope my problem is clear, await your inputs.
Vivek
Praveen.