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

Report without HEADER LINE

Former Member
0 Likes
595

how to create a report with out the HEADER LINE concept....because I want the output as only some of the fields from the table.....

And this type of programming consumes much processing than the normal one.....

NOTE: In normal process I am facing memory problem. It's giving error like "the WORKAREA <internal table> is not enough"

Regards

Suresh

3 REPLIES 3
Read only

Former Member
0 Likes
511

As u have HEADER LINE concept there is much better concept of using WORK AREA..

It never gives such error as u r saying, if u r following correct convention..

U always declare a work area corresponding to some specific internal table..

like

if u have internal table : itab and work area : wa

then u declare them as..

data: itab type standard table of MARA initial size 0.

data: wa like line of MARA.

when u use LOOP ... ENDLOOP..

u always use...

LOOP AT itab INTO wa.

..

ENDLOOP.

u never face any problem...

If u will use work area of different type or length then it gives such errors as u described here..

Regards

Prax

Read only

Former Member
0 Likes
511

Check the below example ,it has both header line and withou header line:

Internal table with header line

here i am using get time field command ,so use both program and see comparision time

report zxyz.

  • Internal table with header line.

DATA:BEGIN OF itab OCCURS 0,

lifnr LIKE lfa1-lifnr,

name1 LIKE lfa1-name1,

END OF itab.

data : f1 type i,

f2 type i,

f3 type i.

start-of-selection.

get run time field f1.

SELECT lifnr name1 FROM lfa1 INTO TABLE itab up to 200 rows.

loop at itab.

endloop.

get run time field f2.

f3 = f2 - f1 .

write 😕 'Time taken by query in Micro seconds', f3.

Internal table without header line

report zxyz1.

  • Internal table without header line.

types : begin of ty_itab ,

lifnr LIKE lfa1-lifnr,

name1 LIKE lfa1-name1,

end of ty_itab.

data itab type standard table of ty_itab.

data wa_itab like line of itab.

data : f1 type i,

f2 type i,

f3 type i.

start-of-selection.

get run time field f1.

SELECT lifnr name1 FROM lfa1 INTO TABLE itab up to 200 rows.

loop at itab into wa_itab.

endloop.

get run time field f2.

f3 = f2 - f1 .

write 😕 'Time taken by query in Micro seconds', f3.

I would suggest use always internal table without header line.

Thanks

Seshu

Read only

Former Member
0 Likes
511

The reason why you get that error is when you are selecting more fields from a table than your internal table can accommodate. For your select to work properly, you have to have your internal table at least of same length as that of the fields that you are selecting from the table.