Start of Content Area

COMMIT_TEXT   Locate the document in its SAP Library structure

The system keeps all text modules for which you defined 'storage in update task' in the corresponding text object in the text memory. As soon as it updates the corresponding application object, it must also place the text modules into the log file.

The function module COMMIT_TEXT generates for the text modules in the text object a CALL FUNCTION... IN UPDATE TASK statement in accordance with the action to be executed (delete, create, change).


No COMMIT WORK is created. This must be executed by the application program.


If you do not specify OBJECT, NAME, ID, and LANGUAGE, the system transfers all texts from the text memory. To limit the function to certain texts, enter values (fully or generically) in the above fields. The system then selects all texts that match the selections in the fields up to the first ' * '.

By default, the system deletes texts from the text memory as soon as they are written to the log file. If you want to keep updated texts in the text memory, call the function module with the parameter KEEP = 'X'. The system then keeps the texts in the text memory and flags them as updated. When calling COMMIT_TEXT again, the system ignores these texts. If you change such a text again during the transaction (for example, using SAVE_TEXT or DELETE_TEXT), the system deletes the flag. However, you need another COMMIT_TEXT to update the text.


Function call:




NAME = '*'

ID = '*'






Export parameters:


Enter the name of the text object. The system then transfers only texts with this text object to the log file. You can enter a generic value. If you omit this parameter, the system uses texts of all objects.

Reference field: THEAD-TDOBJECT

Default value: ' * '


Enter the name of the text modules you want to update. You can enter a generic value. If you omit the parameter, the system uses all texts that match any other selections.

Reference field: THEAD-TDNAME

Default value: ' * '


Enter the text ID of the text modules. You can enter a generic value. If you omit this parameter, the system uses all IDs.

Reference field: THEAD-TDID

Default value: ' * '


Enter the language key of the text modules. You can enter a generic value. If you omit this parameter, the system uses all languages.

Reference field: THEAD-TDSPRAS

Default value: ' * '


You determine the storage mode of a text module (direct, in update task) via the text object in table TTXOB. However, it may be necessary to replace storage in update task with direct storage of a text (for example, for background processing).

Possible values:

' ' Storage mode according to text object

'X' Save text module directly

Default value: SPACE


Use the parameter KEEP to indicate whether to keep updated texts in the text memory. This allows you to access these texts during the current transaction even though no COMMIT WORK was executed.

If another COMMIT_TEXT occurs within the transaction, the texts kept with KEEP are ignored, unless you changed them again using function modules such as SAVE_TEXT or DELETE_TEXT.

Default value: SPACE


Import parameters:


The parameter returns the number of text modules transferred to the update task.

Reference field: SY-INDEX