0% found this document useful (0 votes)
173 views7 pages

Difference Between A Structure and A Table in ABAP

A user asked about the difference between a structure and a table in ABAP. Respondents explained that: 1) A structure is a list of fields defined under a name, while a table is stored in the database and can contain multiple records. 2) There is no data content to view for a structure, unlike a table which can be viewed in SE16. 3) Structures are useful for formatting screen fields, while tables store persistent data in the database. 4) To find where data is stored, one needs to look beyond screens to database tables using tools like SQL trace, function module code, and SE11/SE84.

Uploaded by

Sandeep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
173 views7 pages

Difference Between A Structure and A Table in ABAP

A user asked about the difference between a structure and a table in ABAP. Respondents explained that: 1) A structure is a list of fields defined under a name, while a table is stored in the database and can contain multiple records. 2) There is no data content to view for a structure, unlike a table which can be viewed in SE16. 3) Structures are useful for formatting screen fields, while tables store persistent data in the database. 4) To find where data is stored, one needs to look beyond screens to database tables using tools like SQL trace, function module code, and SE11/SE84.

Uploaded by

Sandeep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Difference Between a Structure and a...

This discussion is locked

Rudolph Emange 31 posts since Feb 21, 2005

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

Brad Williams 632 posts since Apr 1, 2005


Re: Difference Between a Structure and a Table in ABAP May 23, 2005 6:29 PM
Hi Rudolph,
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.
Cheers,
Brad

Narinder Hartala 210 posts since Dec 16, 2004


Re: Difference Between a Structure and a Table in ABAP May 23, 2005 6:32 PM
Hi Rudolph,
Structure in ABAP can not store data.
at DDIC level both are same but a table in SAP has mapping
to a table in the underlying database.
In se16 you can see data only from a table.

Generated by Jive on 2016-03-23+01:00


1

Difference Between a Structure and a...

Regards,
Narinder Hartala

Brad Williams 632 posts since Apr 1, 2005


Re: Difference Between a Structure and a Table in ABAP May 23, 2005 6:34 PM
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
- experience
- I'm sure there are others...
Hope that helps.
Brad

Chetanpal Singh 39 posts since Mar 9, 2004


Re: Difference Between a Structure and a Table in ABAP May 23, 2005 6:39 PM
Hello:

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).

Generated by Jive on 2016-03-23+01:00


2

Difference Between a Structure and a...

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

Rudolph Emange 31 posts since Feb 21, 2005


Re: Difference Between a Structure and a Table in ABAP May 23, 2005 6:57 PM
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.

Brad Williams 632 posts since Apr 1, 2005


Re: Difference Between a Structure and a Table in ABAP May 23, 2005 7:04 PM
Hi Rudolph,
How are you sending data to an SAP <b>structure</b> using JCO/JDBC?

Generated by Jive on 2016-03-23+01:00


3

Difference Between a Structure and a...

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.
Cheers,
Brad

Rudolph Emange 31 posts since Feb 21, 2005


Re: Difference Between a Structure and a Table in ABAP May 23, 2005 7:19 PM
Hi Brad,
I'm sending data to SAP structure using jco calling a RFC.
I'm using an array to send data from jdbc application to jco application. I might be wrong here. Could I send you
the code to an email for you to see what I'm trying to do?
Thanks

Brad Williams 632 posts since Apr 1, 2005


Re: Difference Between a Structure and a Table in ABAP May 23, 2005 8:17 PM
Hi Rudolph,
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.
Brad

Jayanthi Jayaraman 4,128 posts since Jan 18, 2005


Re: Difference Between a Structure and a Table in ABAP May 24, 2005 5:42 AM

Generated by Jive on 2016-03-23+01:00


4

Difference Between a Structure and a...

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

Following are the weblogs about JCO


/people/gregor.wolf3/blog/2004/09/23/from-function-module-to-jco-application--part-1-of-3
/people/gregor.wolf3/blog/2004/09/24/from-function-module-to-jco-application--part-2-of-3
/people/gregor.wolf3/blog/2004/09/25/from-function-module-to-jco-application--part-3-of-3
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
For Tables and Structures refer this.
http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
For RFC related information,check this.
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://www.sap-img.com/abap-function.htm

Vivek Seelin 6,245 posts since Jun 12, 2007


Re: Difference Between a Structure and a Table in ABAP Jul 19, 2007 12:07 PM
Hi All,
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.

Generated by Jive on 2016-03-23+01:00


5

Difference Between a Structure and a...

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

Sapna Agarwal 174 posts since Nov 15, 2006


Re: Difference Between a Structure and a Table in ABAP Jul 19, 2007 12:13 PM
Hi,
In simple words we can say a table has an underlying database in it, while a structure has no underlying
database.
Thanks:
Sapna

praveen parasiya 705 posts since May 12, 2006


Re: Difference Between a Structure and a Table in ABAP Jul 19, 2007 12:39 PM
HI

Structure can have only single record at run time..


whereas table can have multiple records ..

Praveen.

srivishnu Kanakala 1 posts since Aug 13, 2014


Re: Difference Between a Structure and a Table in ABAP Aug 13, 2014 8:44 AM
Structure in ABAP can not store data.

Siva prasad Ramani 26 posts since Dec 12, 2014


Re: Difference Between a Structure and a Table in ABAP Dec 19, 2014 6:29 AM
Hi all,

Generated by Jive on 2016-03-23+01:00


6

Difference Between a Structure and a...

How to find storage table by using particular field value...???

Generated by Jive on 2016-03-23+01:00


7

You might also like