DATA X TYPE TABLE Y=> structure data를 선언
DATA X TYPE TABLE OF Y => table data선언
SORT 키워드 => ORDER BY와 달리 DB가 아니라 ABAP 어플리케이션이 수행
TYPES: BEGIN OF gty_s_flightocc,
connid TYPE sflight-connid,
fldate TYPE sflight-fldate,
seatsocc TYPE sflight-seatsocc,
END OF gty_s_flightocc.
gty_s_flightocc => 명칭: 타입변수
error: the type of database table and work area are not unicode convertible
Ans => 인터널 테이블과 전체 테이블간의 컬럼 차이로 인해 발생함.
INTO CORRESPONDING FIELDS OF 쓰면 the type of database table and work area are not unicode convertible 오류 생기지 않음
SELECT *
FROM spfli
INTO TABLE gt_sflight (기존내용 삭제) <=> APPENDING TABLE (기존 테이블에 이어서 붙임)
WHERE carrid = 'LH'.
error : If the new OpenSQL syntax is used, it must be used throughout. This includes using @ to escape host variables.
Ans => The error you are getting is because in ABAP 7.4 if you write a select and use commas in field list, then you have to escape ABAP variables with @
SELECT 문에 콤마(,)로 구분할 시 INTO( TABLE) 문에 @gt_itab과 같이 변수 앞에 @넣어야 함
ex)SELECT SINGLE cityfrom, arrtime
into ( @gv_fcf, @gv_fat )
Ans => WORKAREA is a structure that can hold only one record at a time. It is a collection of fields.
뷰
테이블들의 조합을 볼 수 있는 조회 조건. 물리적으로 존재하지 않음.
structure: table type, data element, view, db table의 조합.
LOOP AT wa_person-phone INTO wa_phone.
WRITE: AT 20 wa_phone-p_type,
wa_phone-p_number.
NEW-LINE.
ENDLOOP.
화면 생성 시 해당 데이터가 출력될 위치 지정.