SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Implement a Custom ABAP AI Scenario including Grounding Capabilities in Your SAP S/4HANA System

Learn how to implement an Intelligent Scenario including Grounding capabilities using the ABAP AI SDK powered by Intelligent Scenario Lifecycle Management (ISLM)

Overview

🎓 beginner 25 min. ABAP DevelopmentBeginnerArtificial IntelligenceSAP S 4hanaSAP Ai Core

You will learn

  • How to create an Intelligent Scenario in the Intelligent Scenarios Application, including an Execution Flow Template, and upload grounding documents
  • How to deploy and activate the Intelligent Scenario in the Intelligent Scenario Management Application
  • How to use the Intelligent Scenario in a simple ABAP class
Jasmin Gruschke J Jasmin Gruschke July 29, 2026
Created by July 28, 2026
Contributors

Prerequisites

Prerequisites

You have successfully configured your system as described in Set Up Your SAP S/4HANA System for Custom AI Scenarios.

Steps

Pre-Read

SAP AI Core’s orchestration service including its consumption in ABAP has already been introduced in the previous tutorial, i.e. Implement a Custom ABAP AI Scenario Consuming SAP AI Core Orchestration Service in Your SAP S/4HANA System. To further improve results in large language model (LLM) interactions, the LLM can be grounded using additional information. Such additional information could be e.g. company-specific or organisation-specific policies, custom- or user-defined rules, etc. In the orchestration service pipeline, the query on existing grounding documents is executed before the actual prompt is handed over to the large language model.

Want to learn more? Please see the Orchestration documentation for more information.


Step 1 Prepare the Execution Flow Template (optional)

Usage of SAP AI Core orchestration service requires the configuration of the orchestration service pipeline. In order to create a custom configuration, you may e.g. use the SAP AI Launchpad as explained in tutorial Implement a Custom ABAP AI Scenario Consuming SAP AI Core Orchestration Service in Your SAP S/4HANA System. The consumption of the orchestration service pipeline in ABAP requires an intelligent scenario (INTS) including an execution flow template in the enclosed intelligent model (INTM).

You may use the above mentioned tutorial for obtaining your own JSON file, which can subsequently be uploaded later in this tutorial. Alternatively, you may use the JSON provided in a later step in this tutorial. The file provided in this tutorial slightly differs from the one created in the above mentioned tutorial, i.e. it omits the usage of the output translation module.

NOTE: In case you use the JSON file copied from your SAP AI Core Launchpad Orchestration configuration, make sure you adapt to remove the outermost layer, hence the file should start with { "modules" and adapt to "masking_providers" (instead of "providers").

NOTE: If you would like to dive deeper into SAP AI Core’s orchestration service grounding module, please also check tutorial Orchestration(V2) with Grounding Capabilities in SAP AI Core.

Step 2 Create an Intelligent Scenario
+
Step 3 Deploy and Activate the Intelligent Scenario
+
Step 4 Consume the Intelligent Scenario in a Simple ABAP Class
+
Step 5 Test yourself
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 5
1. Prepare the Execution Flow Template (optional) 2. Create an Intelligent Scenario 3. Deploy and Activate the Intelligent Scenario 4. Consume the Intelligent Scenario in a Simple ABAP Class 5. Test yourself

Learn more →