ECC에서 HANA로 넘어오면서 table과 wa의 변수를 분리해서 선언하는것을 추천하고, OCCURS 0과 같이 함께 선언하는 것을 비추천한다.
코드참고.
REPORT ZQREPORT NO STANDARD PAGE HEADING LINE-SIZE 98 LINE-COUNT 65 MESSAGE-ID pp.
* Table을 선언하는 것 같지만 structure
TABLES : zhmstr, zhdet.
* Structure
DATA : itab1 TYPE zhmstr.
DATA : BEGIN OF itab2.
INCLUDE STRUCTURE zhdet.
DATA : name TYPE zhmstr-name,
gender TYPE zhmstr-gender,
END OF itab2.
* Table
DATA : itab3 TYPE zhmstr OCCURS 0.
DATA : itab4 TYPE TABLE OF zhmstr.
* Structure + Table
DATA : itab5 TYPE TABLE OF zhmstr WITH HEADER LINE.
DATA : itab9 TYPE zhmstr OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF itab6 OCCURS 0.
INCLUDE STRUCTURE zhdet.
DATA : name TYPE zhmstr-name,
gender TYPE zhmstr-gender,
END OF itab6.
DATA : BEGIN OF itab10 OCCURS 0,
name TYPE zhmstr-name,
gender TYPE zhmstr-gender,
END OF itab10.
* HANA
DATA itab7 TYPE STANDARD TABLE OF zhdet WITH NON-UNIQUE KEY idno.
DATA istr7 LIKE LINE OF itab7.
INSERT istr7 INTO itab7 INDEX 0.
DELETE TABLE itab7 FROM istr7.
READ TABLE itab7 INTO istr7 INDEX 0.
* ECC
DATA itab8 TYPE STANDARD TABLE OF zhdet WITH NON-UNIQUE KEY idno WITH HEADER LINE.
INSERT itab8 INDEX 0.
DELETE TABLE itab8.
READ TABLE itab8 INDEX 0.
디버그 걸어서 확인해보면 Structure, Table , Structure+Table 각각 형태를 확인할 수 있다.