abap append 用法


【轉自http://blog.chinaunix.net/uid-7982817-id-91999.html】
Append用法總結
 2008-11-14 11:42:19

分類:

 

Syntax

APPEND { wa 
       | {INITIAL LINE} 
       | {LINES OF jtab [FROM idx1] [TO idx2]} } 
   TO itab [SORTED BY comp] 
   [ {ASSIGNING <fs> [CASTING]} | {REFERENCE INTO dref} ].
 
Effect

Appends rows to an internal table itab.
 
Additions
wa 
Appends a workarea wa.

INITIAL LINE 
Appends an initial row. 
附加初始化行
 
LINES OF jtab [FROM idx1] [TO idx2] 
Appends the rows from idx1 to idx2 of the internal table jtab.
this statement alike:
附加內表行
要將部分或 全部內表附 加到另一個 內表中,請 使用 APPEND 語句,用法 如下:
語法
APPEND LINES OF <itab1> [FROM <n1>] [TO <n2>] TO <itab2>.
如果沒有 FROM 和 TO 選項,該語 句將整個表 格 ITAB1 附加到 ITAB2 中。如果使 用這些選項 ,則可通過 索引 <n1> 
或 <n2> 指定 ITAB1 中要附加的 第一或最后 一行。
notice:
用該方式將 表格行附加 到另一個表 格中的速度 比在循環中 逐行進行附 加快3到4倍 。
在 APPEND 語句之后, 系統字段 SY-TABIX 包含附加的 最后一行的 索引。
 
SORTED BY comp 
Creates a ranking, which is sorted by the row component comp in descending order. 
創建一個隊列,按降序排列
 
ASSIGNING <fs> [CASTING] 
Assigns an appended row to a field symbol <fs> and a casting can thus be carried out.

REFERENCE INTO dref 
Sets a data reference dref to an appended row.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM