Reputation: 23800
And which one should be preferred / why?
So I have a TYPE defined locally:
TYPES:
BEGIN OF CUSTOMER_STRU_TYPE,
KUNNR TYPE KNA1-KUNNR,
NAME1 TYPE KNA1-NAME1,
END OF CUSTOMER_STRU_TYPE.
and I think these 2 statements seen below will both do the same thing:
DATA:
CUSTOMER_TAB TYPE CUSTOMER_STRU_TYPE OCCURS 5.
DATA:
CUSTOMER_TAB TYPE STANDARD TABLE OF CUSTOMER_STRU_TYPE.
Are there any differences between the 2 statements seen above and which one should be preferred?
Upvotes: 1
Views: 1611
Reputation: 86
The main difference between the two statements is that, in the first one you're reserving memory space for storing 5 lines of customer_tab table. In terms of performance, the best statement is the second one.
Upvotes: 3