为了实现我的smartform,我应该在结构中声明一个表。我尝试了这个,但它不起作用:
TYPES: t_qase2 TYPE TABLE OF qase.
TYPES:
BEGIN OF ty_itab.
pruefer type qase-pruefer.
zeiterstl type qase-zeiterstl.
* ......(other fields)
ty_qase2 type t_qase2.
INCLUDE STRUCTURE s_f800komp.
TYPES END OF ty_itab.
答案 0 :(得分:3)
要在结构中声明一个表,只需为其中一个字段提供一个非唯一键的表类型:
TYPES: myTableType TYPE TABLE OF string WITH NON-UNIQUE DEFAULT KEY.
TYPES: BEGIN OF ty_itab,
pruefer type qase-pruefer,
zeiterstl type qase-zeiterstl,
myTable type myTableType, "Table is here
ty_qase2 type t_qase2.
INCLUDE STRUCTURE s_f800komp.
TYPES: END OF ty_itab.
另请注意,您使用点结束每一行。在这种情况下,您必须使用,
答案 1 :(得分:1)
除了前面的回答者提出的变体之外,结构中的表声明的变体有明确的方式:
TYPES: BEGIN OF ty_itab,
pruefer TYPE qase-pruefer,
zeiterstl TYPE qase-zeiterstl,
myTable TYPE TABLE OF string WITH NON-UNIQUE DEFAULT KEY,
ty_qase2 TYPE t_qase2.
INCLUDE STRUCTURE s_f800komp.
TYPES: END OF ty_itab.