10-18-2007 11:50 AM
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.
10-18-2007 11:52 AM
this itab has header line...
when you use occurs 0... the itab has header line for it...
10-18-2007 11:53 AM
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.
10-18-2007 11:56 AM
Thanks.
I know it but not remembered now.
I have learned it at the beginning of abap but forgot.
Thanks again.
Deniz.
10-18-2007 11:54 AM
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.
10-18-2007 11:54 AM
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.
10-18-2007 12:18 PM
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