Entering content frameProcedure documentation Ensuring Data Consistency Locate the document in its SAP Library structure

In order to ensure data consistency when a database error occurs, the application tables must be posted in the same logical unit of work as the IDoc status table. Otherwise a database error, such as "no tablespace", could lead to the following:

 

Example

Example: the IDoc contains financial postings; processing the IDoc twice would result in two FI documents being created for the same data.

 

 

To ensure that only one logical unit of work is used, the application function module must not commit the data to the database. The data is committed by the ALE layer after the function has been called and the IDoc’s status records have been updated.

This is not possible when the application data is updated via a Call Transaction, since a Commit Work is automatically set at the end of every Call Transaction. In this case the transaction itself needs to be modified, as shown later.

A Call Dialog instead of a Call Transaction avoids the Commit Work, but can only be used if the dialog step contains no PERFORM ON COMMIT statements - since the commit is set via ALE after the dialog has ended, all global variables set during the dialog are lost. Hence a Call dialog should be used with extreme caution!

When the IDocs contain master data (e.g. customer data) the problem is not so acute, since missing data can always be sent again if need be, and processing an IDoc twice does not lead to duplicate documents being created.

 

 

 

Leaving content frame