0% found this document useful (0 votes)
22 views

Controlled SAP LUW

The document discusses the SAP LUW (logical unit of work) concept, which ensures data consistency during transactions in ABAP applications. It highlights the introduction of controlled SAP LUW, which provides a checking mechanism to prevent violations of transactional contracts, enhancing application robustness. Additionally, it outlines the two transactional phases, modify and save, that form a logical unit within a transaction.

Uploaded by

guilhermedm1986
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Controlled SAP LUW

The document discusses the SAP LUW (logical unit of work) concept, which ensures data consistency during transactions in ABAP applications. It highlights the introduction of controlled SAP LUW, which provides a checking mechanism to prevent violations of transactional contracts, enhancing application robustness. Additionally, it outlines the two transactional phases, modify and save, that form a logical unit within a transaction.

Uploaded by

guilhermedm1986
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

2/4/25, 12:19 AM

Controlled SAP LUW


In typical business applications, data is read, created, updated, and deleted in a transaction. This data may be distributed across
multiple database tables. It is critical that the data is stored in these tables in a consistent state. When an application runs, the
data is often modified and is temporarily in an inconsistent state. It must be ensured that the data is in a consistent state after the
changes are made.

In ABAP applications, the SAP LUW (logical unit of work) concept helps developers address the risks of inconsistent data in the
database by providing techniques and statements. However, especially in classic ABAP programming, it was up to the developers
to make their code comply with the SAP LUW rules without any technical checks. Although done unintentionally, it is fairly easy to
create implementations that violate these rules. In newer ABAP technologies, the SAP LUW concept is enhanced by the controlled
SAP LUW. The controlled SAP LUW introduces a checking mechanism to detect violations of transactional contracts, thus making
applications more robust and the SAP LUW tangible.

The controlled SAP LUW is relevant in the following contexts:

It is always implicitly supported by the ABAP RESTful Application Programming Model (in short RAP), background
Processing Framework (bgPF), and local consumption of RAP business events.

The controlled SAP LUW can be used by explicitly activating transactional phases with the static methods of the class
CL_ABAP_TX.

In addition, transactional contracts define where (i. e. in which transactional phase) a classified API can be used. It is
checked which operations and statements are allowed in the implementation.

LUW and Transactional Phases


In business applications, a transaction describes a sequence of related and/or interdependent actions, such as retrieving or
modifying data. The result of the transaction is a consistent state of data.

The time interval in which one consistent state of the database is transferred to another consistent state is called a logical unit of
work (LUW). The LUW concept follows an all-or-nothing approach: it ends either with a single and final commit, which persists the
changed data in the database, or with a rollback (for example, in the case of an error during the LUW), which undoes all changes
and restores the consistent state before the changes.

Either all data changes are committed, or none at all. When a new consistent state is reached after a commit, or when an original
state is restored, a new LUW can be opened.

There are two transactional phases in a transaction, which together form a logical unit:

modify

save

In a simplified way, the two transactional phases can be realized in a one-shot scenario as follows. A one-shot scenario may be an
HTTP request using a web API without any user interaction.

One-shot scenario:

This is custom documentation. For more information, please visit SAP Help Portal. 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy