在 SAP ABAP 中添加带有标题行内部表的行


请注意,你不应该在内部表中使用标题。因为你在使用它,in_table2 的标题是空的。使用循环来打印它,如下所示 -

LOOP AT in_table2.   "here in_table2 means table (an internal table)
  WRITE / in_table2. "here in_table2 means the header of the table (a structure)
ENDLOOP.

在内部表中包含标题时,你不应该以相同的方式使用它。你应该使用字段符号进行循环和追加,如下所示 -

FIELD-SYMBOLS: <fs_for_loop> LIKE LINE OF in_table2[].
LOOP AT in_table2[] ASSIGNING <fs_for_loop>.
  WRITE / <fs_for_loop>.
ENDLOOP.

更新于: 2020 年 3 月 13 日

1 千+ 浏览

开始你的 职业

完成课程获得认证

立即开始
广告
© . All rights reserved.