ABAP/4   ОКМ   ДМ   экономическая информатика   4GL   Теория и практика обработки информации

Компьютерный язык ABAP/4 - ключевые слова

TABLES

Basic form

TABLES dbtab.

Effect

Makes the database table , view or structure dbtab known to the program. These objects are created by selecting Development -> ABAP/4 Dictionary . This transaction automatically defines an identical field string - the table work area - in the program. The names and the sequence of the fields of the table work area dbtab correspond exactly to the names and the sequence of the fields when declaring the database table or view in the ABAP/4 Dictionary . The ABAP/4 data type (see DATA ) and the length of the fields are derived from the data types in the ABAP/4 Dictionary as follows:
Dict. data typeABAP/4 data type
ACCP-> N(6)
CHAR n-> C(n)
CLNT-> C(3)
CUKY-> C(5)
CURR n, m, s -> P((n + 2) / 2) DECIMALS m [NO-SIGN]
DEC n, m, s-> P((n + 2) / 2) DECIMALS m [NO-SIGN]
DATS -> D
FLTP -> F
INT1 -> No correspondence
INT2 -> No correspondence
INT4 -> I
LCHR n -> C(n)
LRAW n -> X(n)
LANG -> C(1)
NUMC n -> N(n)
PREC -> X(2)
QUAN n, m, s -> P((n + 2) / 2) DECIMALS m [NO-SIGN]
RAW n -> X(n)
TIMS -> T
UNIT n -> C(n)
VARC n -> C(n)

The fields of the table work area are set to the initial values for their ABAP/4 data types (see DATA ). For the ABAP/4 Dictionary data types INT1 and INT2 , whole number fields of length 1 or 2 are created with the initial value 0 in the table work area.
The length of the table work area is not just the sum of the lengths of the individual fields. Depending on how different fields have to be aligned (Alignment ), the structure can contain nameless "holes".

Example

TABLES SPFLI. SELECT * FROM SPFLI. WRITE: / SPFLI-CARRID, SPFLI-CONNID. ENDSELECT.

Notes

You can display the structure of the table work area in the ABAP/4 Editor by double-clicking on the table name.
The divisions for determining ABAP/4 field lengths are whole number divisions without rounding. The field of the table work area can accept numbers which contain one digit more than the ABAP/4 Dictionary data type allows. Such a situation results in a runtime error when writing to the database.
The table work area always has a global validity area. Even if the TABLES statement is specified in a FORM or FUNCTION , the work area is known when the subroutine has been defined. However, changes to the work area in a subroutine remain local to the FORM or FUNCTION . Therefore, it is advisable to specify the TABLES statement globally. You can keep changes to the table work area local to the subroutine with LOCAL .
Related DATA , TYPES

Index
© SAP AG 1996
ABAP/4   ОКМ   ДМ   экономическая информатика   4GL   Теория и практика обработки информации

НОВОСТИ ФОРУМА

Форум Рыцари теории эфира


Рыцари теории эфира
 10.11.2021 - 12:37: ПЕРСОНАЛИИ - Personalias -> WHO IS WHO - КТО ЕСТЬ КТО - Карим_Хайдаров.
10.11.2021 - 12:36: СОВЕСТЬ - Conscience -> РАСЧЕЛОВЕЧИВАНИЕ ЧЕЛОВЕКА. КОМУ ЭТО НАДО? - Карим_Хайдаров.
10.11.2021 - 12:36: ВОСПИТАНИЕ, ПРОСВЕЩЕНИЕ, ОБРАЗОВАНИЕ - Upbringing, Inlightening, Education -> Просвещение от д.м.н. Александра Алексеевича Редько - Карим_Хайдаров.
10.11.2021 - 12:35: ЭКОЛОГИЯ - Ecology -> Биологическая безопасность населения - Карим_Хайдаров.
10.11.2021 - 12:34: ВОЙНА, ПОЛИТИКА И НАУКА - War, Politics and Science -> Проблема государственного терроризма - Карим_Хайдаров.
10.11.2021 - 12:34: ВОЙНА, ПОЛИТИКА И НАУКА - War, Politics and Science -> ПРАВОСУДИЯ.НЕТ - Карим_Хайдаров.
10.11.2021 - 12:34: ВОСПИТАНИЕ, ПРОСВЕЩЕНИЕ, ОБРАЗОВАНИЕ - Upbringing, Inlightening, Education -> Просвещение от Вадима Глогера, США - Карим_Хайдаров.
10.11.2021 - 09:18: НОВЫЕ ТЕХНОЛОГИИ - New Technologies -> Волновая генетика Петра Гаряева, 5G-контроль и управление - Карим_Хайдаров.
10.11.2021 - 09:18: ЭКОЛОГИЯ - Ecology -> ЭКОЛОГИЯ ДЛЯ ВСЕХ - Карим_Хайдаров.
10.11.2021 - 09:16: ЭКОЛОГИЯ - Ecology -> ПРОБЛЕМЫ МЕДИЦИНЫ - Карим_Хайдаров.
10.11.2021 - 09:15: ВОСПИТАНИЕ, ПРОСВЕЩЕНИЕ, ОБРАЗОВАНИЕ - Upbringing, Inlightening, Education -> Просвещение от Екатерины Коваленко - Карим_Хайдаров.
10.11.2021 - 09:13: ВОСПИТАНИЕ, ПРОСВЕЩЕНИЕ, ОБРАЗОВАНИЕ - Upbringing, Inlightening, Education -> Просвещение от Вильгельма Варкентина - Карим_Хайдаров.
Bourabai Research - Технологии XXI века Bourabai Research Institution