ABAP 0714

CinnamonTree·2022년 7월 14일
0

ABAP

목록 보기
1/6

0.

DATA X TYPE TABLE Y=> structure data를 선언
DATA X TYPE TABLE OF Y => table data선언

1. SORT

SORT 키워드 => ORDER BY와 달리 DB가 아니라 ABAP 어플리케이션이 수행

2. 타입변수

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 => 명칭: 타입변수

3. The type of database table and work area are not unicode convertible

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 오류 생기지 않음

4. APPENDING TABLE

SELECT *
  FROM spfli
  INTO TABLE gt_sflight (기존내용 삭제) <=> APPENDING TABLE (기존 테이블에 이어서 붙임)
  WHERE carrid = 'LH'.

5. If the new OpenSQL syntax is used, it must be used throughout. This includes using @ to escape host variables.

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 )

6. Work area 단어 뜻

Ans => WORKAREA is a structure that can hold only one record at a time. It is a collection of fields.

7. Dictionary

역할

  1. type definitions,
  2. db테이블들을 abap에서 쓰려면 dictionary에 db objects로 등록이 되어 있어야 함.
  • dictionary에 타입을 저장하여 abap 프로그램이 type 구조를 읽어올 수 있도록 함(데이터x).
  1. 도움말 지원 (f4) 서비스


테이블들의 조합을 볼 수 있는 조회 조건. 물리적으로 존재하지 않음.

structure: table type, data element, view, db table의 조합.

8. START-OF-SELECTION.

  • 실행(F8)시 SELECTION SCREEN을 구동하기 위해 사용하는 구문.
  • START-OF-SELECTION is the first event for generating a list. It is called by the ABAP runtime system as soon as you have pressed the execute button.

9. write at

LOOP AT wa_person-phone INTO wa_phone.
  WRITE: AT 20 wa_phone-p_type,
  wa_phone-p_number.
  NEW-LINE.
ENDLOOP.

화면 생성 시 해당 데이터가 출력될 위치 지정.

0개의 댓글