一、定义一个结构体
sql
DATA:BEGIN OF LS_MATNR,
MATNR TYPE MATNR,
MAKTX TYPE MAKTX,
END OF LS_MATNR.
二、定义一个包含表头的内表
sql
DATA:BEGIN OF LT_MAT OCCURS 0,
MATNR TYPE MATNR,
MAKTX TYPE MAKTX,
END OF LT_MAT.
三、参考数据结构来定义内表
sql
DATA:LT_MAT LIKE TABLE OF LS_MATNR WITH HEADER LINE.
四、参考数据结构来创建内表
sql
DATA:BEGIN OF LT_MATNR OCCURS 0.
INCLUDE STRUCTURE LS_MATNR.
END OF LT_MATNR.