Back to tools
AvailableAPI·

ABAP AI SDK for SAP BTP

SAP's official SDK for integrating generative AI into ABAP developments. Enables calling Generative AI Hub models directly from ABAP code in S/4HANA Cloud.

Compatible with

sapabapsdkbtpdesarrollo

ABAP AI SDK for SAP BTP

The ABAP AI SDK is SAP's official library for ABAP developers to integrate generative AI capabilities into their developments on SAP S/4HANA Cloud and SAP BTP.

Features

  • LLM calls: invoke Generative AI Hub models (GPT-4o, Claude, Gemini) from ABAP
  • Embeddings: generate text vectors for semantic search
  • Prompt management: store and version prompts as ABAP development objects
  • Orchestration: support for advanced orchestration (RAG, few-shot, chain-of-thought)

Usage example

DATA(lo_llm) = cl_ai_core_llm_client=>get_instance(
  iv_model = 'gpt-4o'
).

DATA(lo_response) = lo_llm->generate(
  iv_prompt = 'Classify this customer complaint: ' && lv_complaint_text
).

lv_category = lo_response->get_text( ).

Benefits for SAP developers

  • No leaving the ABAP environment: use Eclipse ADT or SE80 as always
  • Access to transactional data: reads S/4HANA tables directly to enrich context
  • Security compliance: data does not leave the certified SAP environment

ABAP AI SDK