Application Development 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: 

regarding work area

Former Member
0 Kudos

Hi All,

Can any one give me a simple program for how this work area was used. and also let me know if by using this work area the performance of the program will increase or not.

Thanks in advance.

Regards

Ramana Prasad.T

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Have a look at this sample code.

data it_lfa1 like lfa1 occurs 0.

data wa like lfa1.

select * from lfa1 into wa.

append wa to it_lfa1.

endselect.

loop at it_lfa1 into wa.

write:/ wa-lifnr,wa-name1,wa-land1.

endloop.

Regards

Haritha.

6 REPLIES 6

former_member588853
Active Contributor
0 Kudos

What are you talking about?

Is it about WORKAREA and there usage?

Former Member

Former Member
0 Kudos

Hi,

tables :kna1

select single * from Kna1 where kunnr = '1000'.

write: / kna1-kunne, kna1-name1.

here when I declare the table KNA1 as TABLES by default work area of KNA1 is created which will hold a single record of KNA1.

We should not use table work areas, better to use internal tables for that to increase the performance.

reward if useful

regards,

Anji

Message was edited by:

Anji Reddy Vangala

Former Member
0 Kudos

Hi,

data:itab like mara occurs 0.

data:wa like mara.

select * from mara into table itab.

loop at itab into wa.

write:/ itab-matnr.

endloop.

for more info check this link.

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb36a1358411d1829f0000e829fbfe/content.htm

wa we'll use for moving the data into or getting the data from internal tables with out header lines.

with the use of this wa's performance will increases comared to using data:itab like mara occurs 0 with header line.

rgds,

bharat.

alex_m
Active Contributor
0 Kudos

Work area used to retrieve or pass the records to the internal table, if the table without header line u have to use Work Area.

Former Member
0 Kudos

Hi

Have a look at this sample code.

data it_lfa1 like lfa1 occurs 0.

data wa like lfa1.

select * from lfa1 into wa.

append wa to it_lfa1.

endselect.

loop at it_lfa1 into wa.

write:/ wa-lifnr,wa-name1,wa-land1.

endloop.

Regards

Haritha.