‎2007 Jun 27 10:03 AM
‎2007 Jun 27 10:06 AM
Hi Sonti,
You will have to use a work area for this, which is a structure having a single row of the type of the internal table.
Now this structure can be used to read an internal table, and also to modify and update it.
<b>Reward points, if helpful.</b>
Regards,
Atin
‎2007 Jun 27 10:06 AM
If a table does not have a header line, you MUST provide a work area as a separate record to hold the content of the current entry for most commands used in processing tables.
‎2007 Jun 27 10:06 AM
Hi Sonti,
You will have to use a work area for this, which is a structure having a single row of the type of the internal table.
Now this structure can be used to read an internal table, and also to modify and update it.
<b>Reward points, if helpful.</b>
Regards,
Atin
‎2007 Jun 27 10:07 AM
TYPES <t> TYPE|LIKE <tabkind> OF <linetype> [WITH <key>] [INITIAL SIZE <n>].
I hope u are asking about the declaration. Hope this solves.
Thanks,
Max
‎2007 Jun 27 10:07 AM
Hi sonti,
1. One way is this :
<b>data : ITAB TYPE TABLE OF T001.
DATA :WA_ITAB TYPE T001.</b>
select * from t001
into table itab.
loop at itab into wa_itab.
write : / wa_itab-bukrs.
endloop.
regards,
amit m.
‎2007 Jun 27 10:08 AM
Hi,
For this you have to declare an internal table(without header line) and a workarea.
types : begin of t_tab, "Type Declaration
matnr type matnr,
maktx type maktx,
end of t_tab.
data : x_tab type t_tab. "Work Area
data : it_tab type standard table of t_tab. "Internal table
Start-of-selection. "Get Data
select matnr maktx
from makt
into table it_tab
where matnr in s_matnr.
end-of-selection.
loop at it_tab into x_tab. " loop the table to get the data in workarea.
"Inside the loop you can access the data using workarea.
write :/ x_tab-matnr.
write : x_tab-maktx.
endloop.Hope this helps.
Regards,
Richa.
‎2007 Jun 27 10:09 AM
Hi,
Data : itab like standard table of mara,
wa like itab.
select * from mara into wa.
append itab.
Regards,
Priyanka.
‎2007 Jun 27 10:09 AM
Hi Welcome to Sdn,
Go to the link and you will find all the details about internal table.
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3660358411d1829f0000e829fbfe/frameset.htm
Reward if usefull.
Thanks,
Ramya.R
Message was edited by:
RAMYA RAVIKUMAR
‎2007 Jun 27 10:10 AM
HI,
use like this.
data:i_mara like mara occurs o,
wa like mara.
select * from mara into table i_mara up to 20 rows.
loop at i_mara into wa.
write:/ wa-matnr,wa-mtart,wa-ernam,wa-ersda.
endloop.
<b>reward all helpful answers.</b>
rgds,
bharat.
‎2007 Jun 27 10:11 AM
HI.
Two way to create internal table
first way:
data:begin of itab occurs 0.
fildes1 type char,
end of itab.
second way:
dataLitab like table of <table name like EKKO>.
Reward all helpfull answers.
Regards.
Jay
‎2007 Jun 27 10:12 AM
Hi,
You can declare internal table without header line as
data: itab type standard table of table_name.
thanks,
Muthu.
‎2007 Jun 27 10:12 AM
Example:
<b>Create a type:</b>
TYPES: BEGIN OF t_contactaddress.
INCLUDE STRUCTURE bapicontact_addressdata.
TYPES: END OF t_contactaddress.<b>Create a workarea:</b>
DATA: wa_contactaddress TYPE bapicontact_addressdata.<b>Process the data like:</b>
LOOP AT t_contactaddress INTO wa_contactaddress.
* processing logic
ENDLOOPRemember that using a CLEAR statement on a table without header line will refresh the table!