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: 

Work table definition nomenclature

Former Member
0 Kudos
219

I have a simple question regarding table work area definition. I'm not totally sure (thus the post), but doesn't a statement like *vbap or *mara define a temporary table with the structure of the named table? I seem to remember reading this somewhere, but I can't find it in the doc anywhere.

Thanks!

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
66

Not quite. the definition of *VBAP or *MARA does create a work area of the same structure as VBAP or MARA, not an internal table. This is the old style of create work areas. DATA statements are more widely used now.

DATA: WA_VBAP type VBAP.

Regards,

Rich Heilman

2 REPLIES 2

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
67

Not quite. the definition of *VBAP or *MARA does create a work area of the same structure as VBAP or MARA, not an internal table. This is the old style of create work areas. DATA statements are more widely used now.

DATA: WA_VBAP type VBAP.

Regards,

Rich Heilman

Former Member
0 Kudos
66

HI

GOOD

While adding or retrieving records to / from internal table we have to keep the record temporarily.

The area where this record is kept is called as work area for the internal table. The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.

Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.

e.g.

data: begin of itab occurs 10,

ab type c,

cd type i,

end of itab. " this table will have the header line.

data: wa_itab like itab. " explicit work area for itab

data: itab1 like itab occurs 10. " table is without header line.

The header line is a field string with the same structure as a row of the body, but it can only hold a single row.

It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table. It is the default work area for the internal table.

THANKS

MRUTYUN