목록SAP/ABAP (44)
쌓고 쌓다

Internal table에 CRUD를 하기위해서똑같은 형태의 Structure Variable이 있어야 한다. CRUD를 위한 이 Structure Variable를 "Work Area"라고 한다. INSERTinternal table인 gt_flightinfo를 정의하고LIKE LINE OF 구문으로 위의 테이블에 사용될 work area를 정의한다.이렇게 internal table 정의와 work area 정의를 많이하는 것 같다. "Structure변수명-컴포넌트 = 값" 으로 Structure 타입에 값을 채우고INSERT (Structure) INTO TABLE (Internal table) 로ROW를 INSERT 할 수 있다. INSERT 라인에 디버깅을 해보면 값이 Internal Ta..

Internal TableInternal Table Type은 행과 열로 이루어져 있다. Structure Type이 위과 같이 열(Column)만 가졌다면 Internal Table Type은 행과 열로 이루어져 있다. Structure 타입인 BC400_S_FLIGHT로 Internal Table를 설명하자면 Structure 컴포넌트로 CARRID, CONNID,... 가Table Type의 열 이름이다. CARRID, CONNID, FLDATE, ... 는 Structure 타입이다.따라서 Table에서 Line Type이라는 것은 Structure이며 Table 타입인 BC400_T_FLIGHTS를 보면Line Type으로 Structure인BC400_S_FLIGHT라고 나와 있다. 즉, ..

ABAP Dictionary (SE11)Database table, Data Type을 조회할 수 있다. Structure NamingPurposePrefixProgram global* or local** structured typets_Program global structured varialesgs_Local** structured variablels_Global이냐 Local이냐와 Structure을 결합하여 gs_, ls_ 네이밍 규칙을 사용한다.type structure는 ts_로 시작한다. Structure Typeelemetary Type은 값 하나를 갖는 다음과 같은 모양이라면 structure type은 다음과 같이 여러개의 컬럼을 갖는 모양이다.각 컬럼을 "컴포넌트"라고 한다. Str..

Class Builder (SE24)클래스 생성 및 검색이 가능한 T-Code는 SE24이다.클래스는 Attribute와 Method를 포함한다. CL_BC400_COMPUTE를 입력하고 Display를 눌러보자. CL_BC400_COMPUTE 클래스에 포함된Method 목록과 그 메소드의 Parameter, Exception, Sorcecode를 확인 가능하다. Level에 Static Method와 Instance Method가 있다.Static Method는 클래스가 하나만 가지는 메소드를 뜻하며Instance Method는 클래스에서 생성된 각각의 오브젝트가 갖는 메소드를 뜻한다. Method의 Exceptions를 누르면 Exception Classes 버튼이 생긴다. Exception Cl..