search
Search offline and online ABAP/RAP documentation to find relevant document IDs, then fetch full content for detailed answers.
Instructions
SEARCH ABAP/RAP DOCUMENTATION: search(query="search terms")
FUNCTION NAME: search
Unified search for ABAP + RAP development documentation. 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.
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 use technical ABAP/RAP 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 |
|---|---|---|---|
| query | Yes | Search terms for ABAP/RAP documentation, in ENGLISH (corpus is primarily English). Be specific and use technical terms. | |
| k | No | Number of results to return. Default: 50. | |
| 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. | |
| 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 |
| sources | No | Optional: specific source IDs to search. If not provided, searches all ABAP sources. | |
| 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. | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes |