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

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

CALL FUNCTION

Variant 2

CALL FUNCTION func ...STARTING NEW TASK

Additions

1. ... DESTINATION dest
2. ... PERFORMING form ON END OF TASK
3. ... EXPORTING p1 = f1 ... pn = fn
4. ... TABLES p1 = itab1 ... pn = itabn
5. ... EXCEPTIONS syst_except = rc MESSAGE mess

Effect

Starts the function module func asynchronously in a new mode. In contrast to normal function module calls, the calling program resumes processing as soon as the function module is started in the target system. It does not wait until the function module has finished. Through CALL SCREEN , the called function module can, for example, display a screen and thus interact with the user.

Notes

This variant applies only from R/3 Release 3.0. Both partner systems (the client and the server systems) must have a Release 3.0 version of the R/3 System.
With this variant, the called function module must also be flagged in the Function Library as externally callable, even if it is executed locally (without the addition DESTINATION).

Addition 1

... DESTINATION dest

Effect

Executes the function module externally as a Remote Function Call ( RFC ); dest can be a literal or a variable. The R/3 System where the function module is executed depends on the specified destination. Externally callable function modules must be flagged as such in the Function Library (of the target system).

Addition 2

... PERFORMING form ON END OF TASK
Whereas the parameters for receiving results (i.e. IMPORTING and TABLES parameters) are specified directly as additions in the case of "conventional" function modules (see variant 2), these are logged in the FORM routine form when making an asynchronous call (see RECEIVE ).

Note

If a function module returns no result, this addition ( ... PERFORMING form ON END OF TASK ) can be omitted.

Addition 3

... EXPORTING p1 = f1 ... pn = fn

Effect

EXPORTING passes values of fields and field strings from the calling program to the function module. In the function module, the formal parameters are defined as import parameters.

Addition 4

... TABLES p1 = itab1 ... pn = itabn

Effect

TABLES passes references to internal tables. All table parameters of the function module must contain values.

Addition 5

... EXCEPTIONS syst_except = rc MESSAGE mess

Effect

While any exceptions arising in the called function module are handled by the second addition (in the FORM routine), this addition can handle two special system exceptions, as with function module calls with the addition DESTINATION :
SYSTEM_FAILURE

is triggered, if a system crash occurs on the receiving side.
COMMUNICATION_FAILURE

is triggered if there is a connection or communication problem.
In both cases, you can get a description of the error with the optional addition

... MESSAGE mess

Example

DATA: MSG_TEXT(80). "Message text ... * Asynchronous call to Transaction SM59 --> * Create a new session CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST' DESTINATION 'NONE' EXPORTING TCODE = 'SM59' EXCEPTIONS COMMUNICATION_FAILURE MESSAGE MSG_TEXT. IF SY-SUBRC NE 0. WRITE: MSG_TEXT. ELSE. WRITE: 'O.K.'. ENDIF.

Note

Runtime errors


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