使用 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.
廣告