1. TYPE 문
Types : begin of line,
column1 type I,
column2 type I,
end of line.
Data itab type line occurs 10.
TYPES 문을 사용해 정의한 대로 structure 를 생성한 후, Data 문으로 internal table 을 선언한다.
2. 기존 table 참조
기존 테이블을 참조하여 internal table을 생성할 수 있다.
기존 테이블은 standard SAP table, 사용자가 정의한 table 또는 다른 internal table 도 가능하다.
Syntax
Data <f> <type> [with header line].
Example
DATA gt_sflight TYPE SFLIGHT.
3. 기존 structure 참조
테이블과 마찬가지로 기존 structure 를 참조할 수 있다.
Syntax
Data <f> LIKE <struct> occurs n [with header line].
Example
DATA gt_sflight LIKE sflight.
sflight과 동일한 구조의 internal table 을 생성한다.
728x90
'Programming > ABAP' 카테고리의 다른 글
Internal Table 데이터 읽기 (0) | 2023.08.04 |
---|---|
Internal Table 데이터 채우기 (0) | 2023.08.03 |
Internal Table, Work area (0) | 2023.08.01 |
Call by Value /Call by Reference /Call by Value and Reference (0) | 2023.07.31 |
Modularization - Function Module/ Function Groups (0) | 2023.07.28 |