02-25-2006 12:25 PM
Hi all,
What is the difference between internal table and structure and structure ?
P0001 is an internal table or structure ?
In se11 it showing as a structure.
Is there any way to see the internal table (expect in debugging )
Thanks
charan
02-25-2006 12:39 PM
Hi Ravi,
Internal tables are basically used to deal with the data either pushing into the database or pulling out of the application tables for the output purpose to show on the screen.
Internal tables are defined in ABAP programs, you can not define them in SE11 whereas structures are defined in SE11 and they work as a table itself.
Another difference is internal tables can be with or without header line however this is not the case with Structures.
P0001 is an structure, you are right. It's defined as structure in data dictionary. You can define an internaltable on the basis of an application table or a structure.
There is no other way out except Debuging to see the internal tables.
Hope it helps!!!!
Pls do not forget to assign points, if helpful.
Amit
02-25-2006 12:30 PM
HI ravicharan,
1. Both are tables,
but the difference is
2. Internal table : its defined and used
in abap program and is part of run time memory
structure : its defined first in data dictionary.
3. P0001 is an internal table or structure ?
In se11 it showing as a structure
P0001 is DEFINED AS STRUCTURE in data dictionary.
Hence its a strcutrue.
when we use it in program like :
data : itab like table of p0001 with header line.
or
data : P0001 like table of p0001 with header line.
then here itab/ p0001 becomes internal table.
regards,
amit m.
Message was edited by: Amit Mittal
02-25-2006 12:35 PM
Adding onto what Amit mentioned..
IN an ABAP Program, when you put the statement
INFOTYPES:0001
The system declares an internal table p0001 with ref to Dic Struc P0001 with a header line. This itab is available with the employee's 0001 info during each loop pass of the GET PERNR event of the Program..
Regards,
Suresh Datti.
02-25-2006 12:39 PM
Hi Ravi,
Internal tables are basically used to deal with the data either pushing into the database or pulling out of the application tables for the output purpose to show on the screen.
Internal tables are defined in ABAP programs, you can not define them in SE11 whereas structures are defined in SE11 and they work as a table itself.
Another difference is internal tables can be with or without header line however this is not the case with Structures.
P0001 is an structure, you are right. It's defined as structure in data dictionary. You can define an internaltable on the basis of an application table or a structure.
There is no other way out except Debuging to see the internal tables.
Hope it helps!!!!
Pls do not forget to assign points, if helpful.
Amit
02-25-2006 12:49 PM
IN SIMPLE TERMS
WHAT A STRUCTURE IS TO DDIC ..INTERNAL TABLE IS TO ABAP...
02-25-2006 12:50 PM
Hi,
I heard that internal tables and structure are filled at runtime only. If both are them then why should i go for structure, because i can desin internal table as i like but not a structure ?
So is there any fundamental difference and can u explain with a scenario plz?
Thanks
charan
02-25-2006 12:51 PM
was that a typo??
shouldn't it be
WHAT A TABLE IS TO DDIC ..INTERNAL TABLE IS TO ABAP PROGRAM during runtime...
02-25-2006 12:56 PM
Hi Ravi,
>>>>> then why should i go for structure, because i can desin internal table as i like but not a structure ?
A structure when used in a Program provides you with a work area that enables you to hold one record at a time.
An internal table can hold more than one record during the runtime of the Program. When you loop AT an itab, one record is moved into its HEADER in every loop pass.
Hope this helps..
Regards,
Suresh Datti