‎2007 May 23 5:42 AM
‎2007 May 23 5:46 AM
Hi Suresh ,
Internal table do not have a standard structure , it depends upon how you declare it.
There are two ways of declaring an IT
1) Data : Begin of it_1 occurs 0 ,
matnr type matnr ,
werks type werks_d ,
End of it_1.
2) Types : Begin of ty_matnr ,
matnr type matnr ,
werks type werks_d,
End of ty_matnr.
Data : it_1 type table of ty_matnr.
The 2nd option is the prefered one.
Hope this answers your question.
Regards
Arun
‎2007 May 23 6:48 AM
Hi,
You can create internal table
1) with refernce to DB table directly with header line.
2) Defining on structure with occur statement.
3) Defining from existing TYPES as 'type stanadard table of <type name>'
Thanks
Sandeep
Reward if helpful
‎2007 May 23 7:20 AM
please go through the internal table declaration type's as follows
<b>Table declaration (old method)
DATA: BEGIN OF tab_ekpo OCCURS 0, "itab with header line
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
END OF tab_ekpo.
*Table declaration (new method) "USE THIS WAY!!!
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0, "itab
wa_ekpo TYPE t_ekpo. "work area (header line)
* Build internal table and work area from existing internal table
DATA: it_datatab LIKE tab_ekpo OCCURS 0, "old method
wa_datatab LIKE LINE OF tab_ekpo.
* Build internal table and work area from existing internal table,
* adding additional fields
TYPES: BEGIN OF t_repdata.
INCLUDE STRUCTURE tab_ekpo. "could include EKKO table itself!!
TYPES: bukrs TYPE ekpo-werks,
bstyp TYPE ekpo-bukrs.
TYPES: END OF t_repdata.
DATA: it_repdata TYPE STANDARD TABLE OF t_repdata INITIAL SIZE 0, "itab
wa_repdata TYPE t_repdata. "work area (header line)
</b> Girish
‎2007 May 23 9:27 AM
hi,
internal tables and their usage
http://www.sap-img.com/abap/what-are-different-types-of-internal-tables-and-their-usage.htm
‎2007 May 24 5:30 AM
Hi,
Please go through the following link.
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
Thanks.
‎2007 May 30 1:25 PM
‎2007 May 30 1:26 PM
‎2007 May 30 2:58 PM
use following different possibilities,
TYPES: BEGIN OF mytext,
number TYPE i,
name(10) TYPE c,
END OF mytext.
TYPES mytab TYPE STANDARD TABLE OF mytext WITH DEFAULT KEY.
DATA: BEGIN OF IT_BKPF OCCURS 0,
BELNR LIKE BKPF-BELNR,
GJAHR LIKE BKPF-GJAHR,
BUKRS LIKE BKPF-BUKRS,
END OF IT_BKPF.
DATA : BEGIN OF IT_MATNR OCCURS 0.
INCLUDE STRUCTURE MAKT.
DATA : END OF IT_MATNR.
it may help you
‎2007 May 31 8:09 AM
Hi Suresh
Internal table is the temporary table wherein you fetch all the datas from database and store it in the internal table for any modifications.
its structure can be of two types
1)with header line--->default work area will be created
2)without header line---->user wil create the work area
<u><b>With header line</b></u>
data : begin of itab occurs 0,
matnr like mara-matnr,
end of itab.
<u><b>Without header line</b></u>
data : begin of itab,
matnr type matnr,
end of itab.
REWARD IF USEFUL SURESH...!!
‎2007 Jun 01 6:41 AM
hi suresh,
internal tables are nothing but a temporary table which is used to store data temporarily...
the structure of internal can be defined in 2 ways,
1) internal table with header line
2) internal table without header line.
1) internal table with header line:
in this the internal table will be having a work area.
definition :
DATA itab like DATABASE TABLE NAME OCCURS 0 with header line.
OR
DATA : begin of itab occurs 0,
field like DBtable-field,
End of itab.
2) internal table without header line:
in this the internal table will not be having any work area. You will have to define work area for that internal table.
definition :
DATA itab like DATABASE TABLE NAME without header line.
workarea:
DATA : WA like DATABASE TABLE NAME .
OR
DATA : begin of it,
field like DBtable-field,
End of itab.
data : itab like standard table of IT.
there are many ways by which u can define an internal table.
Also by using TYPES u can define internal table.
TYPES : begin of it,
field TYPE DBtable-field,
End of itab.
TYPES : ITAB type standard table of IT.
hope this will help u out.
please reward points in case usefull...
regards,
Prashant
‎2007 Jun 15 12:13 PM