Mon – Sat: 9:00 AM – 7:00 PM IST
SAP

What is ABAP?

The language SAP is written in, what gets built with it, and why your custom code is the biggest variable in a migration.

In short

ABAP (Advanced Business Application Programming) is the language SAP's applications are written in, and the language customers use to extend them. Reports, interfaces, data conversions, enhancements and forms are all ABAP. On HANA the emphasis shifted to pushing logic down into the database through CDS views rather than looping in application code.

Why It Matters

Why this matters in practice

Custom ABAP is where a migration budget is actually decided. Every customer accumulates code: reports someone needed in 2012, interfaces to systems since retired, enhancements written around a process that changed. At migration each one has to be assessed, and the proportion that is still used is almost always far lower than anyone expects.

All SAP customisation and most integration is ABAP
Code that reads removed tables fails on S/4HANA
CDS views push logic to HANA instead of looping in ABAP
RAP is the current model for building Fiori-ready services
How It Works

How it works in practice

Reports

Custom reporting where standard output does not fit. Historically the largest category, and the one most reducible.

Enhancements

User exits, BAdIs and enhancement points that alter standard behaviour at defined places.

Interfaces

IDoc processing, file handling and API calls to and from surrounding systems.

Forms and output

Invoices, purchase orders and statements through SmartForms or Adobe Forms.

CDS and RAP

Core Data Services define the model close to the database; RAP builds OData services for Fiori on top of it.

Worked example

A worked example: three ways to add one field

A business needs an extra field on the sales order to carry a customer's internal reference. There are three ways to deliver it, and the choice determines the cost of every upgrade for the next decade.

The worst is to modify the standard include directly. It works immediately, and at every upgrade the modification is flagged and someone has to reconcile it by hand — forever, by a person who was probably not there when it was written. The middle option is an append structure plus a sanctioned enhancement point: still in the core, but using interfaces SAP commits to keeping, so upgrades pass through cleanly. The best, where the requirement allows, is to hold the extension outside the core entirely and read it through an API, which leaves the core untouched.

The three take roughly similar effort to build. They differ by an order of magnitude in what they cost to own. This is why the useful question to ask a developer is not whether they can do it but which of the three they are proposing — and why a custom code inventory for a migration is largely an exercise in finding out how many times the first option was chosen.

Key terms

The vocabulary, briefly

Term What it means
Report / program A standalone executable, historically the most common form of custom ABAP.
Enhancement point A sanctioned place to add logic without modifying SAP's code, so upgrades stay clean.
Modification A direct change to SAP-delivered code. Flagged at upgrade and requires manual adjustment every time.
ABAP Dictionary Where tables, structures and data elements are defined. Changes here ripple widely.
Clean core The principle of keeping custom logic out of the core, with extensions side-by-side instead.
What Goes Wrong

Common mistakes worth avoiding

No custom code inventory

You cannot scope a migration without knowing what exists and what actually runs. Usage statistics usually surprise people.

Modifying standard objects

Modification rather than enhancement makes every upgrade an adjustment exercise. Use the extension points.

Looping where the database could aggregate

Classic ABAP patterns that pull data and loop are slow on HANA. Push the work down.

Keeping code because it exists

Retirement is a legitimate outcome. Code with no execution history in a year rarely needs migrating.

What to measure

Numbers worth tracking

Metric What it tells you What distorts it
Modifications vs enhancements How much custom logic sits in the upgrade path. Modifications should be near zero.
Dead custom objects Programs never executed in the last year. Typically a large share, and free to retire.
Objects with no documentation Maintenance risk, and the first thing that bites when the author leaves.
Code inspector findings Static analysis results for performance and security. Cheap to run and routinely skipped.
FAQ

Questions we are asked about this

Yes. S/4HANA itself is ABAP, and extensions remain ABAP, though the preferred style has moved toward CDS views and RAP rather than classic procedural reports.
A modification changes SAP's own code and must be reconciled at every upgrade. An enhancement attaches your logic at a defined point SAP provides, and survives upgrades.
Yes, and it has moved rather than declined. ABAP remains the language of the core and of on-stack extensions, with newer capabilities — core data services, the RESTful application programming model, ABAP in the cloud — shaping how it is written. What has changed is the guidance: logic belongs at enhancement points or side-by-side rather than inside modified standard code, and database work belongs pushed down to HANA rather than looped in the application layer.
ABAP Objects is the object-oriented extension of the language, and it is what current development should use. Procedural ABAP still runs and a great deal of older code is written in it, so most teams maintain both. New development in procedural style is a choice worth questioning, because it makes testing harder and reuse clumsier for no compensating benefit.
Three habits, none of them technical. Require a justification for custom development that names the standard capability it is replacing and why that is insufficient. Review the custom object inventory annually with usage statistics and retire what nothing calls. And make side-by-side extension the default rather than the exception, so the core stays upgradeable. Most inventories are large because nothing ever left them, not because everything was needed.
It is commonly outsourced and works well with two conditions. The code must land in a repository you control with its documentation, from the first sprint rather than at handover. And the standards — naming, enhancement strategy, code inspector thresholds, test coverage — must be yours and enforced in review. Without those you are buying working code that nobody else can maintain, which is a liability with a delay fuse.
Related

Where to read next

What is SAP S/4HANA?

Read more

What is SAP Fiori?

Read more

Our SAP consulting services

Read more

Need this applied to your own systems?

We build and support the systems this page describes. Start with a free working proof of concept — no cost, no commitment.