Entering content frameProcedure documentation Adding Update-Task Calls to a Subroutine Locate the document in its SAP Library structure

You can also put the CALL FUNCTION IN UPDATE TASK into a subroutine and call the subroutine with:

PERFORM SUBROUT ON COMMIT.

If you choose this method, the subroutine is executed at the commit. Thus the request to run the function in the update task is also logged during commit processing. As a result, the parameter values logged with the request are those current at the time of the commit.

Note

a = 1.
PERFORM F ON COMMIT.
a = 2.
PERFORM F ON COMMIT.
a = 3.
COMMIT WORK.

FORM f.
CALL FUNCTION 'UPD_FM' IN UPDATE TASK EXPORTING PAR = A.
ENDFORM.

In this example, the function module UPD_FM is carried out with the value 3 in PAR. The update task executes the function module only once, despite the two PERFORM ON COMMIT statements. This is because a repeatedly registered one can only be executed once in the case of COMMIT WORK. The subroutine itself, containing the function module call, may not have parameters.

Note 

The method described here is not suitable for use inside dialog module code.

 

 

Leaving content frame