search
Find SAP development documentation across ABAP, RAP, CAP, UI5, BTP, and AI sources, returning document IDs and snippets so you can fetch full content.
Instructions
SEARCH SAP DOCUMENTATION: search(query="search terms")
FUNCTION NAME: search
Unified search for SAP development documentation, including UI5, CAP, BTP services, Cloud SDK, AI, ABAP, and RAP. It searches across curated OFFLINE sources (fast, deterministic) and can also include ONLINE sources (best-effort, 10s timeout per source) when enabled.
Use this to discover the best document IDs, then call fetch(id=...) to retrieve full content.
LANGUAGE: Query in ENGLISH — the corpus and ranking are primarily English; non-English queries return weaker results.
SOURCES OVERVIEW
OFFLINE sources (local FTS index; always searched unless filtered via sources):
Reference & guidance (not sample-heavy):
• abap-docs-standard (offline): Official ABAP Keyword Documentation for on‑premise systems (full syntax). Best for statement syntax + semantics.
• abap-docs-cloud (offline): Official ABAP Keyword Documentation for ABAP Cloud/BTP (restricted syntax). Best for Steampunk/BTP constraints.
• sap-styleguides (offline): SAP Clean ABAP Style Guide + best practices (includes translations; non‑English duplicates are filtered).
• dsag-abap-leitfaden (offline): DSAG ABAP Leitfaden (German) with ABAP development guidelines and best practices.
• btp-cloud-platform (offline): SAP Business Technology Platform documentation - concepts, getting started, development, extensions, administration, security.
• sap-artificial-intelligence (offline): SAP AI Core and SAP AI Launchpad documentation.
Additional SAP Docs sources (use these IDs with the sources filter): • btp-connectivity: Destinations, Cloud Connector, HTTP/RFC, and principal propagation. • cloud-sdk-python, cloud-sdk-ai-python: Python BTP and AI SDK reference and examples. • odata-vocabularies: SAP annotation terms and types for Fiori elements, CAP, and RAP. • btp-cloud-identity-services, btp-cloud-identity-integration: IAS/IPS, trust, and provisioning. • btp-integration-suite, btp-event-mesh: Integration flows, adapters, scripting, API Management, and events. • btp-job-scheduling-service, btp-cloud-logging: Scheduled jobs and observability. • btp-business-application-studio: Dev spaces, development, and troubleshooting. • btp-continuous-integration-and-delivery, btp-cloud-transport-management: Pipelines and transports. • sap-tutorials-ai, sap-tutorials-hana, sap-tutorials-integration: Curated official tutorials with prerequisites, code, and published source links. Use these for worked examples; use the SDK/product sources for reference details.
Sample-heavy OFFLINE sources (controlled by includeSamples; great for implementation, can dominate broad queries):
• abap-cheat-sheets (offline, samples): Many practical ABAP/RAP snippets; quick “how-to” reference.
• abap-fiori-showcase (offline, samples): Annotation-driven RAP + OData V4 + Fiori Elements feature showcase.
• abap-platform-rap-opensap (offline, samples): openSAP “Building Apps with RAP” course samples (ABAP/CDS).
• cloud-abap-rap (offline, samples): ABAP Cloud + RAP example projects (ABAP/CDS).
• abap-platform-reuse-services (offline, samples): RAP reuse services examples (number ranges, change documents, mail, Adobe Forms, ...).
OPTIONAL ONLINE SOURCES (when includeOnline=true): • sap-help (online): SAP Help Portal product documentation (official, broad scope). • sap-community (online): SAP Community blogs + Q&A + troubleshooting (practical, quality varies). • software-heroes (online): Software Heroes ABAP/RAP articles & tutorials (searched in EN+DE, deduplicated by URL; feed search is disabled).
NOTE ABOUT abapFlavor:
• OFFLINE: filters the official ABAP Keyword Documentation libraries (abap-docs-standard vs abap-docs-cloud); other offline sources are kept.
• ONLINE: when set EXPLICITLY to "standard"/"cloud", it ALSO scopes the SAP Help leg to the matching ABAP product (standard → ABAP Platform docs; cloud → ABAP environment docs), removing cross-product noise on conceptual ABAP queries. "auto" leaves SAP Help unscoped.
• IMPORTANT — "standard"/"cloud" is a QUERY-DOMAIN signal ("this is an ABAP-LANGUAGE question"), NOT a system flag. Forcing it on a non-ABAP-language query scopes SAP Help to ABAP-language docs and buries the relevant content. Route by DOMAIN:
ABAP language/RAP/CDS → "standard" or "cloud".
FUNCTIONAL / configuration (Asset Accounting, Controlling, EWM ) → leave abapFlavor "auto" and pass the
productparam (e.g. "SAP_S4HANA_ON-PREMISE").CAP / UI5 / Fiori → leave "auto". The OFFLINE corpus is the authoritative source for these; note the online SAP Help leg is NOT scoped for them (no abapFlavor/product fit yet), so it may still contribute some off-topic or low-value SAP Help hits.
PARAMETERS: • query (required): Search terms. Be specific and include the product and technical terminology. • k (optional, default=50): Number of results to return. • includeOnline (optional, default=true): Keep this ON for best answers. Only set to false if online search is blocked/slow/unreliable in your environment OR you explicitly want OFFLINE-only sources. • includeSamples (optional, default=true): Includes sample-heavy offline sources (repos, showcases, cheat sheets). If results are flooded by examples and you want more conceptual/reference docs, set to false. Turn it on when you want implementation/code. • abapFlavor (optional, default="auto"): Filter by ABAP flavor:
"standard": Only Standard ABAP (on-premise, full syntax)
"cloud": Only ABAP Cloud (BTP, restricted syntax)
"auto": Detect from query (add "cloud" or "btp" for cloud, otherwise standard) • sources (optional): Restrict OFFLINE search to specific source IDs (does not disable online sources; use includeOnline for that). Example: ["abap-docs-standard", "sap-styleguides"]
RETURNS (JSON array of results, each containing): • id: Document identifier (use with fetch to get full content) • title: Document title • url: Link to documentation • snippet: Text excerpt from document • score: Relevance score (RRF-fused from multiple sources) • library_id: Source library identifier • metadata.source: Source ID (abap-docs-standard, sap-help, etc.) • metadata.sourceKind: "offline" | "sap_help" | "sap_community" | "software_heroes"
TYPICAL WORKFLOW:
search(query="your ABAP/RAP question")
fetch(id="result_id_from_step_1") to get full content
QUERY TIPS: • Be specific: "RAP behavior definition" not just "RAP" • Include ABAP keywords: "SELECT FOR ALL ENTRIES", "LOOP AT GROUP BY" • For ABAP Cloud: Add "cloud" or "btp" to query, or set abapFlavor="cloud" • For OFFLINE-only: Set includeOnline=false (use this mainly when online search does not work for you) • If results are too code-heavy: Set includeSamples=false • For implementation examples: Keep includeSamples=true
ESCALATION: If search returns no useful results (especially for specific error messages, niche runtime issues, or workaround patterns), try the dedicated sap_community_search tool which searches SAP Community blogs and Q&A directly and returns full post content for the top matches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Number of results to return. Default: 50. | |
| query | Yes | Search terms for SAP documentation, in ENGLISH (corpus is primarily English). Be specific and include the product and technical terms. | |
| product | No | Optional SAP Help product-id scope, applied ONLY to the online SAP Help leg (offline unaffected). Routes the online query to ONE product's docs — use it for FUNCTIONAL/configuration questions that `abapFlavor` cannot express (e.g. 'SAP_S4HANA_ON-PREMISE' for Asset Accounting, Grants, sales customizing). Takes precedence over the abapFlavor auto-mapping. DISCOVER valid values exactly like `version`: run the search once WITHOUT product and copy a result's `metadata.productId` EXACTLY — that is the scope facet, NOT `metadata.product`, which is the human display label (e.g. 'SAP S/4HANA') and will NOT filter. Never invent a slug (e.g. 'ABAP_PLATFORM' is wrong; the real facet is 'ABAP_PLATFORM_NEW'). An unknown product safely falls back to unscoped, so nothing is lost. | |
| sources | No | Optional: specific source IDs to search. If not provided, searches all sources configured for the active profile. | |
| version | No | Optional SAP release filter, applied ONLY to online SAP Help (help.sap.com) — offline docs are unaffected. Omit it for the latest content (the right default for most queries). To pin an older release, copy a result's `versionId` value EXACTLY and pass it back here — it is case-sensitive and its format varies by product (e.g. '2025.001', '2.0.08', '10.0', '2211', 'Cloud', '2026_06'). Discover valid values in one step: run the same search WITHOUT version first; every result shows its `versionId`. Never invent, reformat, or guess the token (a bare year like '2025' is usually a different release). If a version matches nothing, the latest results are returned instead, so no results are lost. | |
| abapFlavor | No | Filter by ABAP flavor: 'standard' (on-premise), 'cloud' (BTP), or 'auto' (detect from query). Default: auto. Offline: picks the abap-docs library. Online: an EXPLICIT 'standard'/'cloud' also scopes the SAP Help leg to the matching ABAP product, removing cross-product noise. QUERY-DOMAIN signal ('this is an ABAP-language question'), NOT a system flag. Route by domain: ABAP language → 'standard'/'cloud'; FUNCTIONAL/config → 'auto' + the `product` param (e.g. SAP_S4HANA_ON-PREMISE); CAP/UI5/Fiori → 'auto' (offline corpus is authoritative; the online leg stays unscoped for these). Forcing 'standard' on a non-ABAP query buries the relevant docs. | auto |
| includeOnline | No | Include online sources (SAP Help, SAP Community, Software Heroes). Default: true. Only turn off if online search is blocked/slow/unreliable or you explicitly want offline-only sources. | |
| includeSamples | No | Include sample-heavy offline sources (cheat sheets, showcases, example repos). Default: true. Turn off if you want fewer code examples and more reference/guidance docs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes |