1、DATA(ls_data) = gt_data[ index ]. 使用此语法,可以省去read,直接读取指定行号的数据,但需要判断gt_data不是否有指定index行,需要catch 异常CX_SY_ITAB_LINE_NOT_FOUND异常,会直接dump. 2、Line_exists IFline_exists( gt_data[ field1=' ' field2='
Example DATA flight_tab TYPE HASHED TABLE OF spfli WITH UNIQUE KEY carrid connid. SELECT * FROM spfli INTO TABLE @flight_tab. IF line_exists( flight_tab[ carrid = 'LH' connid = '0400' ] ). ... ENDIF.
ABAP Development hi, pls check the documentation. it's not possible without a table. rel_exp - line_exists, Predicate Function The predicate function line_exists can be considered as a short form of the statement READ TABLE with the addition TRANSPORTING NO FIELDS following by sy-subrc being ...
SAP Managed Tags: ABAP Development Hi all, we got a strange syntax error while using the function line_exists() inside the COND-operator. Here is the generalized coding therefore (rf_result is of type ABAP_BOOL): rf_result = COND #( WHEN iv_id IS INITIAL THEN abap_false ELSE line_...
[abap_code slider="X" title=""] * New function lv_value = 15. WRITE: / '>>>New', lv_value. IF NOT line_exists( t_data[ table_line = lv_value ] ). WRITE: /(20) 'NotFound', lv_value. ELSE. WRITE: /(20) 'Found', lv_value. ...