```abap READ TABLE lt_table WITH KEY your_key_field = your_key_value INTO ls_table. ``` 在上述代码中,“your_key_field”是作为搜索条件的字段,而“your_key_value”是该字段对应的值。读取成功后的数据将会保存在ls_table中。 ### 步骤3:处理读取到的数据 当我们成功地使用“READ TABLE WITH KE...
READ TABLE itab INDEX idx INTO wa. After: wa = itab[ idx ]. 1. 2. 3. 4. 5. 2.1.3 Read Table using key Before: READ TABLE itab INDEX idx USING KEY key INTO wa. After: wa = itab[ KEY key INDEX idx ]. 1. 2. 3. 4. 5. 6. 2.1.4 Read Table index Before: DATA idx...
DATA gt_mara_sort TYPE SORTED TABLE OF mara WITH UNIQUE KEY primary_key COMPONENTS matnr. "旧语法 DATA LV_MATKL TYPE MARA-MATKL. READ TABLE GT_MARA INDEX 1 INTO DATA(LS_MARA). READ TABLE gt_mara_sort INTO DATA(ls_mara_sort1) INDEX 1 USING KEY primary_key. READ TABLE gt_mara_sor...
key,sorted key,hashed key效能比较示例:DEMO_READ_TABLE_USING_KEY。 示例1:READ "内表FORMf_character_process_itab1."读取内表:1.READ TABLE;2.LOOP AT;3.AT"添加数据:1.INSERT;2.COLLECT;3.APPEND"修改删除排序:1.MODIFY;2.DELETE;3.SORT"查找,替换操作:1.FIND IN TABLE;2.REPLACE IN TABLE"间隔...
2. Table Expressions If a table line is not found, the exception CX_SY_ITAB_LINE_NOT_FOUND is raised. No sy-subrc. Before 7.40 With 7.40 Read Table index READ TABLE itab INDEX idx INTO wa. wa = itab[ idx ]. Read Table using key READ TABLE itab INDEX idx USING KEY key INTO ...
If theprimary table keyis used to access astandard tableand the key isempty, the first row of the internal table is read. If this is known statically, the syntax check produces a warning. Notes When using the primary table key, note that this key can be thestandard key, which can also...
... INDEX idx[USING KEYkeyname]... Addition: Effect If the additionINDEXis used, the statementREADreads the row of the row number specified inidxwith respect to a table index.idxis anumeric expression positionof the operand typei. If the value ofidxis less than or equal to 0 or great...
[USING KEY keyname ]*WHERE c1 op f1 [AND c2 op f2 [...] ] ) ...*note: WHERE对应过滤的条件,是必须要指定的,注意有些操作符是不能在WHERE中使用的,如:OR , NOT 等*EXCEPT如果不指定则表示满足条件的找出来,如果指定则表示不满足条件的找出来*4. 內表缩减*语法: ... REDUCE type(*[let_...
ABAP READ TABLE使用BINARY SEARCH如题,read table使用binary search,with key有多个字段的时候,寻找数据的内部逻辑是怎样的比如有内表(按A,B已排好序)T_DATAA B C1 1 11 2 22 1 32 2 42 3 53 1 63 2 73 3 8现在用如下语句查找READ TABLE T_DATA INTO W_DATA WITH KEY A='2' B = '3' BINA...
READ TABLE * WITH KEY * = * And it works like a charm: So if you would not like to spend time to prepare the complex regular search string for RS_ABAP_SOURCE_SCAN, you can try this approach. Extension if the current functionalities provided by existing check variant could not fulfill ...