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: 

Whether this itab definition has header line

Former Member
0 Kudos

Hi,

when said: clear prices. the prices itab is not cleared. it is still full of data, but I am not sure whether it has header line. It is not specified explicitly.

Does this prices itab has header line?

Thanks.

DATA: BEGIN OF PRICES OCCURS 0,

MATNR LIKE MBEW-MATNR,

BWKEY LIKE MBEW-BWKEY,

VPRSV LIKE MBEW-VPRSV,

STPRS LIKE MBEW-STPRS,

VERPR LIKE MBEW-VERPR,

END OF PRICES.

6 REPLIES 6

Former Member
0 Kudos

this itab has header line...

when you use occurs 0... the itab has header line for it...

former_member186746
Active Contributor
0 Kudos

If you had checked the sap help about the occurs addition on the data statement you would have found out that it has indeed a header line.

Regards, Rob.

0 Kudos

Thanks.

I know it but not remembered now.

I have learned it at the beginning of abap but forgot.

Thanks again.

Deniz.

Former Member
0 Kudos

this itab has body as well as work area.

if u want to delete the whole data then use REFRESH ITAB statement.

reward if useful.

Former Member
0 Kudos

Hi

The itab is having header line. If u want to clear the header line of the internal table then use clear statement, it u want to clear the whole contents of the header line use refresh itab.

Regards

Haritha.

Former Member
0 Kudos

Hi Deniz,

Whenever you use

DATA: BEGIN OF PRICES <b>OCCURS 0,</b>

MATNR LIKE MBEW-MATNR,

BWKEY LIKE MBEW-BWKEY,

VPRSV LIKE MBEW-VPRSV,

STPRS LIKE MBEW-STPRS,

VERPR LIKE MBEW-VERPR,

END OF PRICES.

that table is with header line.

This is another eg.

DATA: BEGIN OF PRICES <b>OCCURS 0 with header line ,</b>

MATNR LIKE MBEW-MATNR,

BWKEY LIKE MBEW-BWKEY,

VPRSV LIKE MBEW-VPRSV,

STPRS LIKE MBEW-STPRS,

VERPR LIKE MBEW-VERPR,

END OF PRICES.

It is advisable to use tables without header line.

To do that, You can create types like

Types : BEGIN OF ty_PRICES ,

MATNR LIKE MBEW-MATNR,

BWKEY LIKE MBEW-BWKEY,

VPRSV LIKE MBEW-VPRSV,

STPRS LIKE MBEW-STPRS,

VERPR LIKE MBEW-VERPR,

END OF ty_PRICES.

data : i_itab like standard table of ty_prices.

Reward if useful.

Regards,

Chitra