把内表 itab1 的 n1 到 n2 行内容附加到 itab2 内表中去.
語法:append lines of itab1 [ from n1 ] [ to n2 ] to itab2.
?前提應該是要兩個結構是一樣的內表吧。
DATA:BEGIN?OF?gt_00?OCCURS?0,
????????l_01???TYPE?i,
????????l_02???TYPE?i,
????????l_03???TYPE?i,
??????END?OF?gt_00.
DATA:gw_00?LIKE?LINE?OF?gt_00.
DATA:BEGIN?OF?gt_01?OCCURS?0,
????????l_01???TYPE?i,
????????l_02???TYPE?i,
????????l_03???TYPE?i,
??????END?OF?gt_01.
DATA:gw_01?LIKE?LINE?OF?gt_01.
gw_00-l_01?=?1.
gw_00-l_02?=?1.
gw_00-l_03?=?1.
APPEND?gw_00?TO?gt_00.
gw_00-l_01?=?2.
gw_00-l_02?=?2.
gw_00-l_03?=?2.
APPEND?gw_00?TO?gt_00.
gw_00-l_01?=?3.
gw_00-l_02?=?3.
gw_00-l_03?=?3.
APPEND?gw_00?TO?gt_00.
gw_01-l_01?=?4.
gw_01-l_02?=?4.
gw_01-l_03?=?4.
APPEND?gw_01?TO?gt_01.
gw_01-l_01?=?5.
gw_01-l_02?=?5.
gw_01-l_03?=?5.
APPEND?gw_01?TO?gt_01.
gw_01-l_01?=?6.
gw_01-l_02?=?6.
gw_01-l_03?=?6.
APPEND?gw_01?TO?gt_01.
APPEND?LINES?OF?gt_01?FROM?2?TO?3?TO?gt_00.
LOOP?AT?gt_00?INTO?gw_00.
??write:/?gw_00-l_01,
??????????gw_00-l_02,
??????????gw_00-l_03.
ENDLOOP.
選擇屏幕的完整實例
???????? 1?????????? 1?????????? 1
???????? 2?????????? 2?????????? 2
???????? 3?????????? 3?????????? 3
???????? 5?????????? 5?????????? 5
???????? 6?????????? 6?????????? 6
總結
以上是生活随笔為你收集整理的把内表 itab1 的 n1 到 n2 行内容附加到 itab2 内表中去.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: sap中用函数增加断点(break po
- 下一篇: SAP登录IP绑定校验