1, 可以不指定KEY,但只能指定 NON-UNIQUEKEY 2, 可以使用INDEX和KEY来查询 注:NON-UNIQUE KEY代表内表里该字段可以重复,如果是UNIQUE KEY则代表该字段不能重复,不然程序会发生运行时错误。 举例:DATA IT_YM TYPE STANDARD TABLE OF VBAP WITH NON-UNIQUE KEY VBELN. SORTED TABLE是排序表,特点如下: 1, 必...
1, 必须指定KEY(作为排序参考字段),可以指定UNIQUE KEY或者是NON-UNIQUE KEY 2, 可以使用INDEX和KEY来查询 3, 已经按照KEY排序,不可以再排序 举例:DATA IT_YM TYPE SORTED TABLE OF VBAP WITH NON-UNIQUE KEY VBELN. 在记录条数多时,SORTED TABLE查询效率明显比STANDARD TABLE高,因为对已经排序的表可以进行二...
DATA:EMPTAB4 LIKE SORTED TABLE OF EMPTAB WITH UNIQUE KEY NAME INITIAL SIZE 10 WITH HEADER LINE. *定义一个初始化大小为0的哈希表 DATA:EMPTAB5 LIKE HASHED TABLE OF EMPTAB WITH UNIQYE KEY NAME WITH HEADER LINE. 通过第三种方式定义的内表可指定具体字段及初始化大小,默认内表存在HEADER LINE。 T...
WITHNON-UNIQUESORTEDKEYcarr_cityCOMPONENTScarrid,lt_lhTYPETABLEOFspfli.SELECT*INTOTABLElt_spfliFROMspfli."data(lt) = FILTER #( lt_spfli using key carrid where carrid = '1' ).lt_lh=FILTER#(lt_spfliusingkeycarr_citywherecarrid=conv#('LH')).BREAK-POINT.filter 之前:filter 之后:第二个...
reportz.TYPES:BEGINOFty_person,nametypestring,agetypeint4,endofty_person.data:lt_persontypeSTANDARDTABLEOFty_personwithNON-UNIQUESORTEDKEYperson_keyCOMPONENTSage,lt_old1likelt_person,lt_old2likelt_person,ls_persontypety_person.ls_person-name='Tom'.ls_person-age='21'.INSERTls_personintotablelt...
KEYWITHNON-UNIQUESORTEDKEYcarr_cityCOMPONENTScarridcityfrom.SELECT*FROMspfliINTOTABLE@spfli_tab.DATA(extract)=FILTER#(spfli_tabUSINGKEYcarr_cityWHEREcarrid=CONV#(to_upper(carrid))ANDcityfrom=CONV#(to_upper(cityfrom))).cl_demo_output=>display(extract).DATA(rest)=FILTER#(spfli_tabEXCEPTUSINGKEY...
TYPES:t_itab TYPE [STANDARD|SORTED|HASHED] TABLE OF <t_str> WITH {UNIQUE|NON-UNIQUE} KEY <keys>[INTIAL SIZE <n>]. [STANDARD|SORTED|HASHED]为可选参数,从左到右分别对应标准表,排序表和哈希表;若不指定该参数则默认为标准表 [INTIAL SIZE ]为可选参数,可以指定定义的内表的大小 ...
with non-unique sorted key k_city components ORT01, **Get a specific customer (if no key is specified, the default key is used, in this case the hashed key) assign lt_kunnr[ kunnr = '1000023653' ] to field-symbol(<ls_kunnr>). **Get the first customer of a city, using the so...
WITH NON-UNIQUE SORTED KEY carr_city COMPONENTS carrid, lt_lh TYPE TABLE OF spfli.SELECT * INTO TABLE lt_spfli FROM spfli."data(lt) = FILTER #( lt_spfli using key carrid where carrid = '1' ).lt_lh = FILTER #( lt_spfli using key carr_city where carrid = conv #( 'LH' ) ...
23、 9.with non-unique sorted key second_key 10.components b c. 11.12.aa = value #( 13.( a = 11 b = 32 c = 13 ) 14.( a = 21 b = 22 c = 23 ) 15.( a = 31 b = 42 c = 33 ) ). 16.*wa = it2 1 . 17.wa = aa key second_key index 1 . 18.cl_demo_output...