ABAPCALL_FUNCTION_UPDATE - CALL FUNCTION UPDATE

BAL_S_LOG - Application Log: Log header data   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

CALL FUNCTION - IN UPDATE TASK

Short Reference



Syntax

CALL FUNCTION update_function IN UPDATE TASK
                             [EXPORTING p1 = a1 p2 = a2 ...]
                             [TABLES t1 = itab1 t2 = itab2 ...].

Additions

1. ... EXPORTING p1 = a1 p2 = a2 ...

2. ... TABLES t1 = itab1 t2 = itab2 ...

Effect

This statement registers the update function module specified in update_function. update_function must be a character-like field, which contains the name of anupdate function module in uppercase letters during execution of the statement.

An update function module is a function module for which the property update module is flagged inFunction Builder. The registration of an update function module is an essential part of theupdate task.

The function module is not executed immediately, but is scheduled for execution in a special work process (update work process). To do this, the name of the function module and the actual parameters passed are saved to the database tablesVBMOD andVBDATA, which are managed byVBHDR. If the statement is executed during the update task, the addition IN UPDATE TASK is ignored.

If the statement SET UPDATE TASK LOCAL is executed before registration of an update function module in the currentSAP LUW, registration takes place in theABAP memory rather than on the database, and for the current work process.

The actual execution is triggered by the statement COMMITWORK. The formal parameters of the function module receive the values of the actual parametersfrom the database table VBLOG. A function module that is registered more than once is also executedmore than once with the associated parameter values. If, during the execution of the current program,the statement COMMIT WORK is not executed after the registration of a function module, then thefunction module is not executed and the associated entries are deleted from the corresponding databasetables when the program ends. The statement ROLLBACK WORK deletes all previous registrations for the current SAP LUW.

System Fields

The sy-subrc system field is undefined after the statement CALL FUNCTION ... IN UPDATE TASK is executed.

Notes

  • During the processing of an update function module in the update work process, the statements SUBMIT,CALL DIALOG,CALL SCREEN, CALL TRANSACTION,COMMIT WORK,and ROLLBACK WORK, as well as all other statements that create adatabase commit, must not be executed.
  • Any database commits or database rollbacks that occur within the update cancel the update.
  • If an error occurs during the update, the update work process executes adatabaserollback, logs this in the corresponding database tables, and notifies the user whose entries created the entries by SAPMail. After the cause of the error has been resolved, the canceled entries can be updated again.
  • When handling the registration entries in the database tables, note that they are subject to the regular administration rules for adatabase LUW. For example, the database LUW is ended by adatabase rollback, then all registration entries of the current database LUW are deleted.
  • When an update function modules is registered using CALL FUNCTION ... IN UPDATE TASK, the relevantdata is exported internally to a data cluster using EXPORTand is imported again when executing the function module with IMPORT.If the data types of the exported actual parameters do not match the typing of the formal parameterof the function module, the exceptions documented in IMPORT may be raised.


Addition 1

... EXPORTING p1 = a1 p2 = a2 ...

Addition 2

... TABLES t1 = itab1 t2 = itab2 ...

Effect

The additions EXPORTING and TABLES have the same syntax and meaning as in the parameter_list of the general function module call, except that for EXPORTING, noreferencevariables or data objects that contain reference variables can be specified as actual parameters.

When passing internal tables with non-unique tablekeys, the order of the duplicate rows in relation to these keys is not retained.

Note

The additions IMPORTING, CHANGING and EXCEPTIONS of the general function modulecall may be specified, but they are ignored during the execution. The additions for dynamic parameter passing are not allowed.


SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   CPI1466 during Backup  
This documentation is copyright by SAP AG.


Length: 8584 Date: 20120518 Time: 200716     triton ( 270 ms )