在 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.