A beginner-friendly demonstration project showing how Large Language Models (LLMs) can be integrated into enterprise applications using:
- π§ OpenRouter (LLM API access layer)
- π Python (backend orchestration)
- π Streamlit (UI layer)
- π’ SAP RAP (RESTful ABAP Programming Model)
- π OData V2 Web API (SAP communication layer)
This project is designed for non-AI engineers, SAP developers, and beginners in LLM applications who want to understand how modern AI systems connect with enterprise backend systems.
Modern enterprise systems are evolving from traditional transactional systems into AI-assisted decision platforms.
This demo shows:
- How a user can input raw text (incident / issue)
- How an LLM converts it into structured business data
- How SAP RAP persists that data in a backend system
- How OData acts as the bridge between frontend and backend
Think of this system like a pipeline:
User Input β LLM Processing β Structured JSON β SAP OData β RAP Backend β Database
A user writes something in English β AI understands it β converts it into structured SAP data β SAP stores it
ββββββββββββββββββββββ
β Streamlit UI β
β (Frontend Layer) β
βββββββββββ¬βββββββββββ
β
βΌ
ββββββββββββββββββββββ
β Python Backend β
β (Orchestration) β
βββββββββββ¬βββββββββββ
β
βββββββββββββββββΌβββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β OpenRouter β β JSON Mapper β β SAP OData V2 β
β (LLM API) β β Formatter β β Web Service β
ββββββββββββββββ ββββββββββββββββ ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββββββββ
β SAP RAP Backend β
β (ABAP Layer) β
βββββββββββ¬βββββββββββ
βΌ
ββββββββββββββββββββββ
β Database Table β
β (ZAI_INCIDENT) β
ββββββββββββββββββββββ
Streamlit is used to create a simple web interface where users can:
- Enter raw text (incident description)
- Click submit
- View AI-generated structured output
- Very fast to build UI
- No frontend framework needed
- Ideal for prototypes and demos
Python acts as the brain orchestrator:
It handles:
- Sending user input to LLM
- Receiving structured JSON response
- Cleaning / validating JSON
- Sending data to SAP via OData
OpenRouter is used to access LLM models via API.
- Takes raw user text
- Converts it into structured JSON
User: "SM30 table not allowing new entries"
{
"raw_input": "SM30 table not allowing new entries",
"business_summary": "User cannot add entries via SM30",
"technical_summary": "Table maintenance view issue or missing authorization",
"priority": "Medium",
"sap_module": "ABAP"
}Before sending data to SAP:
- JSON is validated
- Missing fields are handled
- Default values are inserted if required
This ensures SAP always receives clean structured data.
This is the communication bridge between Python and SAP.
- Accept POST requests from Python
- Trigger RAP behavior implementation
- Persist data into ABAP table
- Return response (201 Created)
RAP handles:
- Business logic
- Data validation
- UUID generation
- Default field population
- Persistence to database
- Auto-generate
incident_id - Set
created_at - Set
created_by - Enforce status rules
Table: ZAI_INCIDENT
Stores final structured output:
- Incident details
- AI-generated summaries
- Metadata
- User enters text in Streamlit UI
- Python sends request to OpenRouter
- LLM returns structured JSON
- Python formats and validates JSON
- Python sends POST request to SAP OData API
- SAP RAP processes request
- RAP fills missing fields (UUID, timestamps)
- Data is saved in database
- SAP returns HTTP 201 Created
- Streamlit displays success response
SM30 is not allowing me to create entries in ZBILL table
{
"raw_input": "SM30 issue",
"business_summary": "User cannot create entries in ZBILL via SM30",
"technical_summary": "Missing table maintenance configuration",
"priority": "High",
"sap_module": "ABAP"
}{
"d": {
"incident_id": "generated-uuid",
"status": "PROCESSED",
"created_at": "timestamp",
"created_by": "SAPUSER"
}
}| Layer | Technology |
|---|---|
| UI | Streamlit |
| Backend | Python |
| LLM API | OpenRouter |
| SAP Interface | OData V2 |
| SAP Backend | RAP (ABAP) |
| Database | SAP HANA / Z Table |
- Usually caused by incorrect RAP numbering configuration
- Happens when update is triggered instead of create
- Determination not executed correctly
- SAP BTP session expiry or incorrect service binding
This system demonstrates:
- AI transforming unstructured text β structured business data
- Seamless integration between modern AI APIs and SAP systems
- Enterprise-grade backend processing with RAP
After understanding this demo, you will know:
- How LLMs are used in real enterprise systems
- How SAP RAP handles business logic
- How APIs connect AI systems with ERP
- How modern full-stack AI applications are built
This project is a bridge between AI and enterprise SAP systems, showing how:
Natural language β AI β structured data β SAP persistence
Start the application by rough input
LLM categorizes based on prompt
You can see it appended in your table in ADT - Eclipse

Video
Recording.2026-05-10.223153.mp4
OpenRouter Usage (very cheap)
