Skip to content
FAST SAP SOLUTIONS®Discuss a project

START HERE · NO PRIOR TOPIC KNOWLEDGE NEEDED

What it is. Why it matters.

A scalar function turns input values into one output value. In ABAP CDS, database functions and analytical functions run in different engines, so developers must choose the supported kind.

Completely new to SAP?

Manufacturers use SAP to connect work such as buying components, recording inventory, planning production, shipping equipment and accounting for costs. SAP S/4HANA is an enterprise resource planning system: it connects these activities through shared business data.

ABAP is SAP’s programming language for business applications. A program reads data, applies rules and produces a result. Start with the objects involved before investigating code.

A transaction code, or t-code, is a shortcut to a task in classic SAP GUI. Fiori apps provide another way to work. Names and screens depend on the product and release; you do not need a live system to learn the concepts in this guide.

Original editorial vector illustration for Custom analytical scalar functions in ABAP CDS: What customers can build today
Original FSS editorial vector illustration. Conceptual artwork, not an SAP interface or customer-system evidence.
Scope and source-review notes

Scope and evidence

Source review by FAST SAP SOLUTIONS® editorial. This badge describes our editorial review; it does not represent SAP certification or independent endorsement.

CDS scalar functions in supported ABAP 7.58 and later contexts; customer analytical-function creation remains restricted in reviewed SAP documentation.

Primary documentation reviewed on 14 November 2026 using official indexed excerpts. Documentation review only; authored examples were not compiled or executed in an SAP system.

A MANUFACTURING EXAMPLE

Calculate a manufacturing reporting metric in the right engine

Choose the execution engine

Input: One business value. SQL scalar function: Database execution. Analytical function: Analytical engine. First question: Which engine consumes it?
What to notice: A shared name does not make the creation and execution rules interchangeable.Original annotated example with illustrative values. This is not an SAP screen or a result from a customer system.
Read the example values
Input
One business value
SQL scalar function
Database execution
Analytical function
Analytical engine
First question
Which engine consumes it?
Words you’ll meet in this guide
Program
A set of instructions executed by a computer.
Class
A reusable unit that groups data with operations called methods.
Database
Organized information kept beyond one program execution.
Internal table
A list of rows held temporarily in an ABAP program’s memory.
Key
One or more fields used to identify or find a record.
ABAP
SAP’s programming language for business applications.
CDS
Core Data Services: reusable definitions of business data and relationships.
HANA
SAP’s database platform.
SQL
A language used to read and work with database data.
ADT
ABAP Development Tools: SAP tools for ABAP development in Eclipse and, on supported systems, Visual Studio Code.
Preview the practical steps

SEE THE CONNECTION

See it in a simple example.

A small example to make the idea concrete.

Inputs → Correct execution engine → One calculated value. Conceptual diagram for Custom analytical scalar functions in ABAP CDS: What customers can build today.
Apply the idea: A manufacturer's developer needs a derived reporting value and must distinguish an analytical calculation from a database-executed function.An illustrative example, not a live SAP screen. The connections show how to think about the topic; they are not instructions to change a system.
  1. Calculate a manufacturing reporting metric in the right engine

    A manufacturer's developer needs a derived reporting value and must distinguish an analytical calculation from a database-executed function.

  2. Customers can build SQL-based functions, not their own analytical-engine functions

    The answer depends on which execution engine you mean.

  3. Prerequisites and release scope

    The relevant scalar-function capabilities were introduced with ABAP release 7.58 and corresponding supported product versions, including SAP S/4HANA 2023.

  4. Scalar describes the result shape, not the timing

    A scalar function returns an elementary result from its input values.

Reading map · FSS editorial. The sections below explain each part in detail.

Found this useful?

Share this guide with your network, or leave a like.

LinkedIn WhatsApp

Your like is saved in this browser.

Explore Knowledge Hub

Discuss Your SAP Project

Your enquiry is sent through this website and used only to respond to your request.