Knowledge & Trends
ABAP Cloud or classic ABAP: How do we decide on existing custom code?
Aug 2026 | Blog
Blog post
More blog posts
SAP BW Data Product Generator: When it’s the right choice, and when it isn’t
Data products in the SAP world: substance or just the next data buzzword?
Does analytics need a product owner? A pragmatic model for mid-sized companies
S/4HANA meets SAP Datasphere: CDS, ODP, or Replication Flow—the right path for your data
More from other areas
ABAP Cloud is SAP’s guideline for upgrade-stable extensions, but established system landscapes can’t be modernized by decree. This article describes how we make decisions about existing custom code: which questions come before every migration, which typical cases there are, and why the sustainable path usually lies between “rebuild everything” and “leave everything as is.”
The dilemma between guideline and landscape
On paper, the matter is clear: new development in ABAP Cloud, extensions only through released APIs, clean core as the target picture. In practice, these guidelines meet systems that have grown over two or three decades: with custom developments that are deeply intertwined with the standard and with one another, without clean decoupling, without consistent test coverage, and often without complete documentation.
These landscapes carry two kinds of complexity within them. Essential complexity: business requirements, special processes, regulatory logic. It is the result of decades of brainpower and constitutes the real value of the custom code. And accidental complexity: copies instead of reuse, dead code paths, workarounds whose original reason has long since disappeared. The problem: from the outside, the two are hard to tell apart. Anyone who simply lays ABAP Cloud over such a landscape migrates the accidental complexity along with it, only at greater cost.
The benefit of a deliberate decision strategy is correspondingly concrete: investments flow to where code lives long and breaks often, instead of being spread evenly across an inventory of which a considerable part is no longer needed at all.
Three questions before every migration decision
Before target architectures are discussed, three questions must be answered, and in this order:
1. What is actually still needed?
Usage data (for example via the ABAP Call Monitor and the usage data of SAP’s tools) is soberingly honest: a significant portion of grown custom code is rarely executed or not executed at all anymore. What is not needed is not migrated, but decommissioned.
2. What can move into the standard?
Much of what had to be custom-built fifteen years ago is covered by S/4HANA today. Or a standard Fiori app comes close enough that the delta effort no longer pays off. This check is uncomfortable because it questions custom developments that people have put their heart into. It still belongs at the very beginning.
3. Where do we deliberately invest money and rebuild?
This is the actual investment decision, and it should be made explicitly, not implicitly through the idea that “everything” will be modernized at some point. The decisive yardstick here is differentiation: where do we set ourselves apart from our competitors? And where is it worth investing to achieve or expand exactly this differentiation? Custom code that merely rebuilds what the standard can also do does not deserve this investment. Candidates are core processes that carry real competitive advantage, with a long remaining lifespan, a high frequency of change, and recurring upgrade pain.
Anyone who has answered these three questions will realize: ABAP Cloud is not a silver bullet, but a case-by-case decision. Decades of development and business requirements cannot be rebuilt in tiny projects, and the attempt to do so anyway produces half-finished parallel worlds.
Five typical cases
▷ Case 1: The unused Z report
It hasn’t run in years or delivers results that nobody reads anymore. Decision: decommission, don’t migrate. Sounds trivial, but is surprisingly rarely done consistently. Decommissioning has no lobby, but it is by far the cheapest clean core measure.
▷ Case 2: Critical custom development, released APIs available
High usage, long remaining lifespan, and the required SAP objects are released as APIs. Refactoring toward ABAP Cloud is worthwhile here: step by step, starting with the business logic, not as a big-bang rebuild of the entire application.
▷ Case 3: Missing released API
A recurring blocker in our projects: the business logic needs functionality that has not (yet) been released. How often this case occurs depends heavily on which SAP solution you are working in. In our projects, with regard to local ABAP APIs released for ABAP Cloud on S/4HANA Private Edition and on-premise, we have more frequently experienced missing releases in Treasury and Risk Management and in Commodity Risk Management in particular; in the core processes of logistics and finance, coverage is, in our experience, now significantly better. A concrete example: there is no local ABAP API released for ABAP Cloud for creating financial transactions in the Transaction Manager (checked in August 2026 against the official API overview; since this is updated depending on the release, the check should be repeated before every concrete architecture decision). The released interfaces in the treasury area are predominantly read-only (for example position flows, posting journal, or present values); creation still runs via classic BAPIs.
Missing releases are not automatically a case for a wrapper, however. A checking sequence comes first: is there a local released API? A suitable remote API? A released extension point? Can the process be cut differently? Only when these steps don’t hold up is the functionality encapsulated, and only around objects that are classified as a classic API in the Cloudification Repository maintained by SAP. Such a wrapper is not a workaround bypassing the standard, but SAP’s documented approach: the unreleased functionality is hidden in exactly one place behind an interface and released for cloud development. This keeps the dependency localized, assignable to clean core level B, documented, and replaceable later when SAP delivers the matching API.
New applications only know the interface. The important classification here: the wrapper localizes the risk, it does not eliminate it. For writing APIs, the difficult questions also belong explicitly in the design: commit control, locking behavior, the interplay with the save sequence of a calling RAP object, and the mapping of BAPI messages into the error handling of the new code. For RAP, this specifically means: transaction control does not lie with the business handler; depending on LUW behavior, a writing BAPI call belongs in the late save or unmanaged save phase, and an explicit commit in the handler is not a permissible pattern. The full embedding, from the BAPI test run in the validation phase through late numbering for the returned business number to the mapping of messages to FAILED and REPORTED, goes beyond the scope of this article. The wrapper creates a stable customer-owned contract; the underlying classic API, however, does not have a formal release contract like a released API. For it, the classification and possible successor APIs should be checked per release. Don’t confuse the two: the changelog procedure of the Cloudification Repository is the risk-mitigation instrument for level C dependencies, that is, for unclassified SAP objects; it does not replace the level B classification as a classic API. An operating framework is part of this: ATC monitoring of the exception, a named owner, regression tests after every upgrade, and a defined replacement criterion for the day SAP releases the matching API. Understood this way, the legacy dependency is a deliberate, visible compromise, not a creeping return to the old world.
▷ Case 4: Highly decoupled process
This case mainly concerns upcoming new builds and rebuilds: if an existing custom development is due for replacement anyway (or a new requirement comes up) and the process has hardly any SAP-internal dependencies, such as a portal scenario or an integration pipeline, the decisive question is whether the result belongs in the ABAP stack at all. Side-by-side on BTP (for example with SAP CAP) can be the cleaner solution here. For running, stable existing code, this explicitly does not apply: a working decoupled process is not a migration candidate just because it would be nicer somewhere else. ABAP Cloud is a tool in the portfolio, not the portfolio.
▷ Case 5: Modifications and level D dependencies
The toughest category is extensions that directly change the standard or access objects that SAP lists as noAPI: modifications, implicit enhancements in unsuitable places, direct write access to SAP tables. This is level D and therefore not clean core; the question here is not whether, but when and how it will be replaced. The sequence that has proven itself with us: first check whether the requirement can now be covered in the standard or via a released extension point (such as a BAdI); then whether encapsulation following the pattern from case 3 works as an interim step; and where neither is possible, the dependency should be documented with an owner, justification, and replacement date, so that it is deliberately reviewed at every upgrade instead of getting lost in SPAU runs. One rule applies without exception: new development does not build on level D objects; the category may only shrink.
A case from practice
▷ Deliberately against RAP
What such a case decision looks like in concrete terms is shown by a project from our consulting practice: the redesign of a front-end solution, grown over more than twenty years, for mapping financial and logistics documents, with integration into SAP MM/SD and Treasury and Risk Management. It is the most central building block of the customer’s application landscape, with a correspondingly large amount of custom code. The reason for the redesign was tangible: even adding a single field took two weeks. This refers to the lead time from development through transport and testing to acceptance, not the pure programming effort.
The obvious approach would have been a rebuild in RAP, and not just as greenfield: with unmanaged RAP and managed with unmanaged save, there are variants designed precisely for integrating existing business logic. Together with the customer, we nevertheless decided against it. First, in this specific case, no consumer would have used the RAP facade: RAP is indeed more than an OData generator (transactional business objects, local consumption via EML, business events), but the existing UI was to remain unchanged, there were no external consumers, and the established transaction semantics would only have fit into the RAP model at considerable adapter cost. Second, there was no RAP know-how in the company, and for the most central building block of the landscape, a framework that nobody in-house masters and can operate is an operational risk, not a comfort issue. Third, the business logic, matured over decades, was to be reused as much as possible, not reinvented.
Our approach instead: an object-oriented, extensible framework following the open-closed principle: new elements are created exclusively through new classes and customizing, and existing code remains untouched when extending. This was not cheap: the redesign cost around 150 person-days. All the more important is what came afterward, where we deliberately keep the metrics separate. Shortly after go-live, a first, simple field was added; the customer’s feedback: about one day from implementation to acceptance, including transport. The before and after values are thus the same metric, the lead time from development to acceptance: two weeks became one day. The larger extension that followed is easier to quantify: integrating an entirely new product into the solution cost about 70 person-days. According to the customer’s architect, the same project would have been roughly twice as expensive in the old structure.
The full picture also includes the price: the global complexity of the solution is significantly higher today than before. The old logic had high local complexity, meaning long, dense processing blocks in a few places. The framework shifts this complexity into many classes and interfaces. As a result, individual changes are small and safe, but anyone who wants to understand the big picture needs onboarding and well-maintained architecture documentation. This trade-off is not a side effect, but the deliberate decision behind the design.
We are still active at the customer’s site, currently in a different part of the solution, and we rarely get questions about the framework itself.
The punchline: the project is neither a rejection of RAP nor a plea for classic ABAP. On the contrary, the framework is conceptually modeled on RAP on purpose and offers determinations, validations, actions, and similar building blocks. Only this extension semantics was rebuilt; generic infrastructure such as draft handling or OData exposure, which the existing UI does not need, was deliberately left out. The goal of this replica: efforts that would arise anyway in a later switch to RAP, that is, thinking in determinations, validations, and actions and the corresponding cut of the business logic, are already done; the next step becomes smaller as a result. Should the customer want to take it, this makes the conversion easier, but does not replace checking language version, dependencies, and transaction behavior. Rather, the project shows that the decision criteria (criticality, available know-how, user acceptance, reuse potential) weigh more heavily than the question of which programming model is currently the guideline. The same analysis would have led to a different answer with a different level of know-how or a less central building block.
The path in between: new code clean, existing code by the boy scout rule
From our perspective, the sustainable approach for established landscapes lies between the extremes, and it is more demanding than either:
▷ New business objects are clearly defined and built clean
New business domains are created in the ABAP Cloud model from the start, with a clean data model (CDS), clear responsibilities, and test coverage. This is where the room for maneuver is greatest and compromises are rarely necessary. One prerequisite does apply, however: developer extensibility is only available in S/4HANA (on-premise and Private Edition) from release 2022. Landscapes on older releases initially build new objects following the same principles in classic ABAP: with classified APIs, a testable structure, and without modifications. This makes the later switch of the language version considerably easier; it is not a mere formality, though, because dependencies and language scope must still be checked during the switch.
▷ Interfaces to legacy code are built explicitly
Instead of quietly weaving the new and old worlds together, defined handover points are created: wrappers as described above, clearly cut interfaces, documented dependencies. The legacy code doesn’t get better as a result, but its boundaries become visible and controllable.
▷ Existing code follows the boy scout rule
Anyone who has to touch an existing component anyway leaves it better than they found it: extract logic into testable classes, resolve ATC findings in the touched objects, remove dead paths. No special projects, but a built-in habit. Over the years, this adds up to real modernization, without ever needing a big-bang budget.
This is a complex undertaking, and it demands discipline over long periods. But it respects a reality that glossy target pictures like to skip: the value lies in the grown code. The task is not to replace it, but to rebuild it in a controlled way.
Best practices: four decision rules
1. Assess existing code first, then choose the target architecture
Usage frequency, business criticality, API availability, ATC findings, test coverage, expected remaining lifespan, and the know-how available in the team are the criteria. Not the age of the code and not the current SAP roadmap slide.
2. Decommissioning before rebuilding
Every decommissioned custom development is cheaper than any migrated one. The decommissioning rate is a more honest progress metric than the number of new RAP services.
3. Encapsulate dependencies instead of hiding them
Missing released APIs are no reason to abandon the cloud model. But classic accesses should be encapsulated: one clearly cut interface per business capability, released via C1, documented, with a named owner and a replacement note.
4. Modernization as a habit, not a project
The boy scout rule in everyday development beats the “custom code cleanup project” set up every five years, because it invests where work is happening anyway and because it never has to win a business case against ongoing projects.
Conclusion
ABAP Cloud or classic ABAP” is the wrong question to ask.
The right question is: Which part of the existing code deserves which investment? Established landscapes carry both essential and accidental complexity; anyone who treats the two the same wastes budget in both directions.
Our position: new code is built clean, transitions to existing code are designed explicitly, and the existing code itself gets better step by step following the boy scout rule. Case by case, without a silver bullet and without the illusion that decades of business substance can be reinvented in a single project. This is the path we consider sustainable in established landscapes.
Author: Sebastian Nötzel | Last updated: 08/05/2026
More Posts
- SAP BW Data Product Generator: When it’s the right choice, and when it isn’t
- Data products in the SAP world: substance or just the next data buzzword?
- Does analytics need a product owner? A pragmatic model for mid-sized companies
- S/4HANA meets SAP Datasphere: CDS, ODP, or Replication Flow—the right path for your data
- From POC to partnership: personnel planning on SAP Datasphere & SAC
- Business Information Framework
- SAP Fiori Extensibility: Extending Fiori Apps in a Way That Ensures Upgrade Compatibility
- SAP Commodity Management overview: solutions, functions, and use cases
- Coaching for a strong team: on the way to BDC
- The path to Business Data Cloud, as part of the S/4 migration