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

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

OPEN

Basic form 2

OPEN CURSOR [WITH HOLD] c FOR SELECT ... .

Effect

Opens a database cursor c in a database table or view for a SELECT command. The variable c must be of the type CURSOR . You can use any SELECT command that returns a table, but not a single record, as a result. When the cursor has been opened, the dataset specified with SELECT can be read with FETCH until the cursor is closed.

OPEN CURSOR belongs to the Open SQL command set.

If you attempt to open a cursor that has already been opened, you get a runtime error.

The following events close a cursor: The CLOSE CURSOR command. The Open SQL command. COMMIT WORK A database commit in Native SQL . In this case, a cursor opened with WITH HOLD is not closed. The Open SQL command ROLLBACK WORK A database rollback in Native SQL A screen change, in particular the commands CALL SCREEN , CALL DIALOG , CALL TRANSACTION , MESSAGE A Remote Function Call .

Example

Open the database cursor C1 in the database table SFLIGHT for the SELECT command

TABLES SFLIGHT. DATA C1 TYPE CURSOR. OPEN CURSOR C1 FOR SELECT * FROM SFLIGHT WHERE CARRID = 'LH '.

Notes

In the above example, the OPEN command contains no INTO clause . With cursor processing, you must always specify the target area for the selected data in the FETCH command.
The OPEN CURSOR command allows you to open several cursors at the same time in a table. Unlike with SELECT , you thus have several independent access paths to this table.
Since you can open only a restricted number of cursors at the same time, you should close cursors that are no longer required with CLOSE CURSOR .
Since the OPEN statement does not support authorization checks , you must program these yourself.
Related SELECT , FETCH und CLOSE .

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