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?
A table is a table that has been created in the database.
A structure is just a list of fields defined under a name. Structures are useful for painting screen fields, and for manipulating data that has a consistent format defined by a discrete number of fields.
There is no content to view in a structure. You can, however, view the definition of a structure in SE11.
I guess you have looked at a standard SAP transaction and fit F1 help, followed by F9 technical information on a field?
You were hoping to find where the data was stored for a given transaction?
Unfortunately its not so easy. SAP often selects data from the database and then formats it before presenting it on the screen. Often it creates structures with specific fields (which may span many tables) to paint onto the screen.
To find where the data is actually stored you need to dig deeper than just the screen.
Ways to find the tables include:
- use SQL trace ST05 (and a display transaction)
- look at the code of the transaction
- search in SE11 and repository info system SE84
- I'm sure there are others...
Hope that helps.
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!
Thank you all very much.If a structure is just a list of fields defined under a name(which I presume can reference an underlying table or the field could be used in SAP for internal calculation), can one pass values to a named strucuture? After SAP has done the internal calculations with the data passed to it using the structure, can the same data be returned by SAP to the same structure?
"From the previous answers it should be possible to return the data using the same structure because a structure is just a list of fields defined under a name."
My problem here is that I have passed some data to an SAP structure using jdbc and jco. And I want to retrieve the result sent back to me by SAP using the same structure but the result seems ambiguous. The result does not reflect what I intend to receive back from the structure.
I hope very much on your feed backs. Thank you.
How are you sending data to an SAP <b>structure</b> using JCO/JDBC?
Are you calling a BAPI or an RFC? (JCO)
Or are you accessing the SAP database directly with JDBC?
Either way, you can't be sending data to an SAP structure.
Please elaborate more on what you are doing.
So you are having problems loading the RFC parameters/structures from java.
Sorry, thats getting a bit beyond my expertise.
Its clear now, however, that you should be posting this question in the Java forum.
Jump into Java Development and post it there.
I'm sure you'll get a quick response.
In this link, you can find some useful coding samples.
Following are the weblogs about JCO
For Tables and Structures refer this.
For RFC related information,check this.
I read all your posts & have some understanding of what Structure is. I would like to know can i join a structure & a table? Find below the steps followed by me
1. Created an infoset, in the initial dialog box, the data source tab section, i selected 'data retrieval by program' & in the Data stucture field, entered the structure name.
2. I then added the table into my infoset, through the Extras tab. The system automatically proposed the join conditions between the table & structure.
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.