Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

internal table

Former Member
0 Likes
373

Hi Friends,

Anybody will give me the introduction of internal table i.e. what is work area, its functionality, body, how to move data from wa to body, how to declare wa & body. how to use wa in select statement & also body etc...

thanks in advance.

4 REPLIES 4
Read only

Former Member
Read only

Former Member
0 Likes
349

Hi Salil,

Types : begin of t_data,

matnr type mara-matnr,

maktx type makt-maktx,

end of t_data.

<b>* Declaration</b>

data : wa_tab type t_data. <b>" WOrk area</b>

Data : itab type standard table of t_data. <b>"Internal table.</b>

Itab[] = it_matnr[]. <b>"Refers copy of body i.e. all data from it_matnr to itab</b>.

<b>* Move data from work area</b>

loop at itab into wa_tab.

wa_final = wa_tab.

<b>* wa_final-matnr = wa_tab-matnr.

  • wa_final-maktx = wa_tab-maktx. <i>"Individual assigmnt</i></b>

append wa_final to it_final.

Endloop.

Best regards,

Prashant

Read only

0 Likes
349

hi salil,

declarations

***********

1.

Tables : sflight. "structure

data : itab like sflight occurs 0 with header line."itab with work area.

2.

data : begin of itab. "itab with out work area.

fields...

endof itab.

data : begin of itab occurs 0. "itab with work area.

fields...

endof itab.

copying

***********

itab1[] = itab2[].

fetching data from internal table

*****************************************

1. loop at itab.

write itab-field1,

itab-field2,

..........

endloop.

2.for fetching single data

sort itab by key_field

read table itab with key = field.

regrds,

anver

if helped mark points whn the point system get activates

Read only

Former Member
0 Likes
349

hi,

internal table store data temporarily . Work area is just work as a header for that IT table .That mean if we r filling IT table first work area will fill by that data then data will transfer to body of IT table.

when we use IT table for some operation ( Insertion or Deletion) first its WA will fill by one record then operation will perform on IT table.

Body- is the part of It table where whole data of IT table store temporarily.

There r different type to declare a IT table or WA as-

<b>data : begin of it occurs n ,

a1 type c,

a2 type c,

end of it.</b>

this will create IT table with WA & body, if we do not maintain with occurs it will create only body of IT table.

<b>data it1 type table of DDIC with header line.</b>

this will create IT table with WA & body, if we do not maintain with header line it will create only body of IT table.