sy-tfill:返回当前内表(Internal Table)内的记录数。 但是要小心,那些字段随各自的内表(Internal Table)改变。例:如果你循环(Loop at)(读取)itab,sy-tfill返回itab的记录数。 如 果你在循环(Loop at)(读取)内表(Internal Table)itab的内部嵌套循环(Loop at)(读取)内表(Internal Table)jtab,sy-tfill返...
select* intoCORRESPONDINGFIELDSOFtable it_spfli from spfli for all entries in it_main where carrid= it_main-carridandconnid= it_main-connid. endif. loop at it_main into wa_main. INDXLOOP= SY-tabix. if wa_main-connid ='0017'. delete it_main index indxloop. continue. endif. clear...
wa_ekpo like line of it_ekpo.*Select directly into an internal table* Please note the order of these field are not different but you can still see the code* that would perform this functionality if they were!SELECT * "all fieldsFROM ekko INTO TABLE it_ekko. write:/ 'SELECT directly int...
以下是SELECT SEVERAL LINE语句的语法: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 SELECT <fields> FROM <table> [WHERE <condition>] [ORDER BY <fields> [ASC|DESC]] [GROUP BY <fields> [HAVING <condition>]] [INTO <internal table>] [FOR ALL ENTRIES IN <internal table>] [...
The user first creates an internal table, selects the relevant data from customer tables and then places the data in the internal table. Other users can access and use this internal table directly to retrieve the desired information, instead of writing database queries to perform each operation ...
5, 使用SQL语句里面的JOIN时候, 应该避免JOIN的表不要超过3个, 否则严重影响效率. 如果真的要JOIN表3个以上的话, 正确的方法不是用视图VIEW, 而是使用SELECT … INTO TABLE … FOR ALL ENTRIES IN 以及 READ TABLE WITH KEY BINARY SEARCH.例如我们要提高读取BSEG表的性能,首先我们会根据GJAHR主键从BKPF表取出...
⑤ 使用二分查找法。READ TABLE的之前使用SORT TABLE BY对内表进行排序, 然后使用READ TABLE WITH KEY ...BINARY SEARCH. ⑥ 避免使用SELECT DISTINCT语句。在抽取数据到内表后用DELETE ADJACENT DUPLICATES语句来消除重复行。 ⑦ 尽量多指定WHERE语句条件。
SELECT dmbtr waers belnr menge budat FROM ekbe INTO CORRESPONDING FIELDS OF TABLE itab WHERE ebeln IN ebeln AND matnr IN matnr AND bwart IN bwart. SORT itab BY budat. LOOP AT itab. tdate = itab-budat. COLLECT tdate. ENDLOOP. FIELD-SYMBOLS: <dy_table> TYPE table, <dyn_wa> TYPE ...
SELECT SINGLE * FROM TADIR WHERE PGMID = 'R3TR' AND OBJECT = 'FUGR' AND OBJ_NAME EQ ENLFDIR-AREA. MOVE : TADIR-DEVCLASS TO V_DEVCLASS. ENDIF. ENDIF. SELECT * FROM TADIR INTO TABLE JTAB WHERE PGMID = 'R3TR' AND OBJECT IN ('SMOD', 'SXSD') AND DEVCLASS = V_DEVCLASS. ...
A classic example where SELECT offers new features for ABAP developers is the following: select * from @itab as i order by substring( column, 2, 2 ) into @data(result). ... endselect. This loops over an internal table with a custom sorting criterion. Neither sorted looping nor a cus...