SAP AI

/

feb 16, 2025

SAP S/4HANA document grounding with SAP AI Core (real use case)

Explore how SAP AI Core and ABAP enable document-grounded AI assistance in S/4HANA, integrating SharePoint, SAP AIF, and enterprise knowledge.

/

AUTHOR

/

AUTHOR

/

AUTHOR

Mateusz Kwaśniewski

Enabling Intelligent Knowledge Transfer Assistance through SAP AI Core and ABAP

In today’s enterprise landscape, the volume of business documentation - policies, standard operating procedures, and system manuals - continues to grow exponentially. Navigating and extracting insights from these documents efficiently becomes critical for onboarding new team members, supporting knowledge transfer (KT), and driving process compliance.

This is where SAP AI Core integration with ABAP comes into play. By orchestrating AI-powered document grounding within the SAP landscape, organizations can create an intelligent assistance framework that enables employees to interact naturally with enterprise knowledge. Imagine a scenario during onboarding where a new User can simply ask:

“I want to understand what are all possible existing errors in our custom process?”

and instantly receive a contextual, document-grounded response sourced from internal repositories such as SharePoint and business process documentation.

This real use case leverages SAP AI Core’s orchestration capabilities to deploy and manage machine learning or large language model (LLM)-based workloads that connect seamlessly with SAP S/4HANA on premise with ABAP.

https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/initial-setup?locale=en-US

Technical Prerequisites

To implement this orchestration-based document grounding scenario, the following components and configurations are required:

  1. SAP AI Core

    • A fully configured SAP AI Core tenant for managing orchestration pipelines, models, and deployment runtimes.

    • Ensure connection setup between SAP AI Core and AI Launchpad for monitoring and lifecycle management

      https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/initial-setup?locale=en-US

  2. SAP S/4HANA System

    • Active OData or REST APIs for data retrieval and process integration.

    • RFC or Cloud Connector configuration (if applicable) to bridge communication between on-premise and AI Core environments.

  3. SAP AIF (Application Interface Framework)

    • Installed and configured to handle message processing, mapping, and error handling between AI Core services and S/4HANA.

    • Useful for defining custom message structures for AI requests and responses.

  4. SharePoint Connection for Document Repository

    • SharePoint (or an equivalent enterprise repository) integrated for storing and managing business process documents.

    • Connection established via REST API or Microsoft Graph API to allow retrieval of reference materials during document grounding.

Use Case: Knowledge Assistance for Onboarding

When new employees join a department, they often spend significant time exploring multiple sources to understand workflows, transactions, and documentation. With the SAP AI Core–S/4HANA integration:

  • The AI model indexes and grounds data from connected document repositories (SharePoint, internal manuals).

  • Users interact through a chat-based interface or SAP Fiori application, querying about tasks, rules, or steps.

  • SAP AIF handles the structured communication between the AI orchestration layer and the S/4HANA system, ensuring data security and compliance.

This architecture not only enhances knowledge accessibility but also reduces onboarding time and improves process accuracy by aligning answers with organizational standards.

Custom Development in SAP HANA

The integration between SAP AI Core and S/4HANA can be achieved through custom ABAP development on SAP HANA. The key idea is to wrap the AI Core API interaction within a custom class, and expose it via a custom report with an interactive UI.

  • Wrapper Class for SAP AI Core Connection

Create a custom ABAP class (e.g., ZCL_AI_CORE_WRAPPER) that acts as an interface between S/4HANA and SAP AI Core.
This class:

  • Performs HTTP calls to the AI Core REST API,

  • Handles authentication (OAuth 2.0 or token-based),

  • Sends document context or user queries to the AI model,

  • Parses and returns the AI-generated responses.


  • Custom Report with HTML and JavaScript Integration

Next, develop a custom report (transaction or Fiori-style screen) that uses HTML viewer elements and JavaScript to create an interactive chatbot-like UI.

  • The HTML container displays the conversation and responses.

  • JavaScript handles dynamic user input and calls back to the ABAP layer for AI responses.

  • The ABAP backend (via the wrapper class) sends queries to SAP AI Core and returns the grounded answers.


    Code snippet available in Codemine Github.


/

BLOG

/

BLOG

/

BLOG

SAP AI

/

Jan 8, 2026

From reactive SAP AIF Error Handling to autonomous AI resolution - lessons from 2025

In 2025, SAP teams faced the same recurring SAP AIF challenges: repetitive errors, unclear ownership, and manual processes that don’t scale. This article shares real project lessons and explains how AI agents, Joule, and SAP AIF APIs enable autonomous error categorization, prediction, and resolution. A practical look at how SAP operations can move from reactive firefighting to AI-driven, proactive interface management.

SAP AI

/

Jan 8, 2026

From reactive SAP AIF Error Handling to autonomous AI resolution - lessons from 2025

In 2025, SAP teams faced the same recurring SAP AIF challenges: repetitive errors, unclear ownership, and manual processes that don’t scale. This article shares real project lessons and explains how AI agents, Joule, and SAP AIF APIs enable autonomous error categorization, prediction, and resolution. A practical look at how SAP operations can move from reactive firefighting to AI-driven, proactive interface management.

SAP AI

/

Jan 8, 2026

From reactive SAP AIF Error Handling to autonomous AI resolution - lessons from 2025

In 2025, SAP teams faced the same recurring SAP AIF challenges: repetitive errors, unclear ownership, and manual processes that don’t scale. This article shares real project lessons and explains how AI agents, Joule, and SAP AIF APIs enable autonomous error categorization, prediction, and resolution. A practical look at how SAP operations can move from reactive firefighting to AI-driven, proactive interface management.

SAP AIF

/

Oct 10, 2025

SAP AIF custom ABAP framework

Learn how to modernize your SAP AIF implementations with object-oriented ABAP and clean architecture. Discover best practices for building modular, reusable, and scalable AIF actions that simplify integration and long-term maintenance.

SAP AIF

/

Oct 10, 2025

SAP AIF custom ABAP framework

Learn how to modernize your SAP AIF implementations with object-oriented ABAP and clean architecture. Discover best practices for building modular, reusable, and scalable AIF actions that simplify integration and long-term maintenance.

SAP AIF

/

Oct 10, 2025

SAP AIF custom ABAP framework

Learn how to modernize your SAP AIF implementations with object-oriented ABAP and clean architecture. Discover best practices for building modular, reusable, and scalable AIF actions that simplify integration and long-term maintenance.

SAP AIF

/

Jun 13, 2024

SAP AIF Mapping Conditions - How to Apply Conditional Logic in Interface Mappings

Discover how to use mapping conditions in SAP AIF to apply dynamic logic, value mappings, and checks during message processing. Learn practical configuration steps and examples from Codemine’s SAP integration experts.

SAP AIF

/

Jun 13, 2024

SAP AIF Mapping Conditions - How to Apply Conditional Logic in Interface Mappings

Discover how to use mapping conditions in SAP AIF to apply dynamic logic, value mappings, and checks during message processing. Learn practical configuration steps and examples from Codemine’s SAP integration experts.

SAP AIF

/

Jun 13, 2024

SAP AIF Mapping Conditions - How to Apply Conditional Logic in Interface Mappings

Discover how to use mapping conditions in SAP AIF to apply dynamic logic, value mappings, and checks during message processing. Learn practical configuration steps and examples from Codemine’s SAP integration experts.