본문 바로가기

abap open cursor with hold 구문

반응형

data: lv_cursor type cursor,
lt_tmp type table of sflight,
lt_sflight type tavle of sflight.

open cursor with hold @lv_cursor for
select *
from sflight.

do.
clear lt_tmp.

try.
fetch next cursor lv_curosr
into corresponding fields of table lt_tmp
package size 10.
catch cx_root.
endtry.

it sy-subrc ne 0.
exit.
endif.

move-corresponding lt_tmp[] to lt_sflight[].

if lines( lt_tmp[] ) < 10.
exit.
endif.

enddo.

반응형

'SAP > ABAP Basics' 카테고리의 다른 글

abap insert update try,catch commit 처리  (0) 2022.11.10
abap split  (0) 2022.11.09
abap function 사용 시 others 기준  (0) 2022.11.09
abap se16n_interface 펑션  (0) 2022.11.04
abap 파일 한줄씩 읽기(Read dataset)  (0) 2022.11.02
댓글