### JSON Schema Validation using ajv-cli
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Command-line instructions to install and use `ajv-cli` for validating partner-contributed classic API JSON files against the official schema. Ensures compliance before submission.
```bash
# Install ajv-cli for JSON schema validation
npm install -g ajv-cli
# Validate SAP Classic API file
ajv validate --strict=false \
-s ./schema/classicAPI-schema.json \
-d ./src/objectClassifications_SAP.json
```
--------------------------------
### ABAP ATC Check Configuration for API Validation
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Configuration examples for the ABAP Test Cockpit (ATC) check to automatically validate custom code against released and classic API lists from the Cloudification Repository. Requires direct URLs to the JSON files.
```abap
* For SAP Cloud ERP (Released APIs):
* 1. Activate check: Cloud Readiness -> Usage of Released APIs (Cloudification Repository)
* 2. Enter URL in check attributes:
* https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfoLatest.json
* For SAP Cloud ERP Private (Classic APIs - Clean Core):
* 1. Activate check: Clean Core -> Usage of APIs
* 2. Enter URL for latest version:
* https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectClassifications_SAP.json
* For specific SAP Cloud ERP Private release (e.g., 2023 FPS03):
* https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfo_PCE2023_3.json
* Run ATC check on your custom code packages
* The check will identify:
* - Usage of deprecated APIs with successors
* - Usage of non-released APIs
* - Classic APIs requiring migration strategy
```
--------------------------------
### Validate Partner Namespace JSON with AJV
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Validates a partner namespace JSON file against a predefined schema using the AJV command-line interface. This ensures the structure and content of the partner API definitions are correct before contribution. Requires AJV to be installed globally.
```bash
ajv validate --strict=false \
-s ./schema/classicAPI-schema.json \
-d ./src/partner/objectClassifications_NAMESPACE.json
```
--------------------------------
### Partner API Contribution Workflow using Git and AJV
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Outlines the steps for partners to contribute classic API definitions. This involves generating a JSON file using an ABAP report, validating it locally with AJV, committing the changes using Git, and submitting a pull request on GitHub.
```bash
# Clone the repository
git clone https://github.com/SAP/abap-atc-cr-cv-s4hc.git
cd abap-atc-cr-cv-s4hc
# Create a branch for your contribution
git checkout -b partner/add-yournamespace-apis
# Add your file to the partner directory
cp /path/to/objectClassifications_YOURNAMESPACE.json ./src/partner/
# Validate your JSON file
ajv validate --strict=false \
-s ./schema/classicAPI-schema.json \
-d ./src/partner/objectClassifications_YOURNAMESPACE.json
# Commit and push
git add ./src/partner/objectClassifications_YOURNAMESPACE.json
git commit -m "Add classic APIs for /YOURNAMESPACE/ partner namespace"
git push origin partner/add-yournamespace-apis
# Create pull request on GitHub
# Repository: SAP/abap-atc-cr-cv-s4hc
# Title: "Partner Contribution: Classic APIs for /YOURNAMESPACE/"
# Description: Include partner name, namespace, and API count
```
--------------------------------
### Load SAP APIs (TOON Format)
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Python function to load SAP API data in TOON format, optimized for LLM context, offering significant token savings.
```APIDOC
## Load SAP APIs (TOON Format)
### Description
This function retrieves SAP API classification and release information in TOON format, which is optimized for Large Language Models (LLMs) and provides a notable reduction in token count compared to standard JSON.
### Method
Python Function
### Endpoint
N/A (Fetches from GitHub URLs)
### Parameters
None
### Request Example
```python
import requests
def load_sap_apis_toon():
"""
Load SAP API data in TOON format (optimized for LLMs)
Compression: 18.3% reduction vs JSON
"""
# Classic APIs in TOON format
classic_url = "https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectClassifications_SAP.toon"
# Released APIs in TOON format
released_url = "https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfo_PCELatest.toon"
response = requests.get(classic_url)
classic_apis = response.text # Token-optimized format
response = requests.get(released_url)
released_apis = response.text
return {
"classic_apis": classic_apis,
"released_apis": released_apis,
"format": "toon",
"token_optimized": True
}
api_data = load_sap_apis_toon()
print(f"Loaded {len(api_data['classic_apis'].splitlines())} classic APIs and {len(api_data['released_apis'].splitlines())} released APIs.")
```
### Response
#### Success Response
Returns a dictionary containing the raw TOON formatted text for classic and released APIs, along with format information.
- **classic_apis** (string) - TOON formatted string for classic APIs.
- **released_apis** (string) - TOON formatted string for released APIs.
- **format** (string) - Indicates the format, "toon".
- **token_optimized** (boolean) - True, indicating token optimization.
#### Response Example
```json
{
"classic_apis": "...TOON formatted data for classic APIs...",
"released_apis": "...TOON formatted data for released APIs...",
"format": "toon",
"token_optimized": true
}
```
```
--------------------------------
### Web Viewer Integration Links
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Provides HTML anchor tags to access the interactive API viewer hosted on GitHub Pages. These links can include query parameters to filter APIs by version, state, labels, or perform search queries.
```html
View SAP Cloud ERP Released APIs
View SAP Cloud ERP Private Classic APIs
View RFC-Enabled Classic APIs
Search for HTTP-related APIs
View 2023 FPS03 Released APIs
```
--------------------------------
### Viewer Application (React TypeScript)
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Information about the web-based viewer application built with React and TypeScript for interactive exploration of API objects.
```APIDOC
## Viewer Application - React TypeScript
### Description
The viewer application is a web-based interface built using React and TypeScript. It allows users to interactively explore SAP API objects, their details, and successors through filterable, sortable, and groupable tables.
### Method
Web Application (Client-side)
### Endpoint
N/A (Local application structure)
### Parameters
Query parameters can be used to pre-filter data:
- **version** (string) - Specifies the data file to load (e.g., `objectClassifications_SAP.json`).
- **states** (string) - Filters by API state (e.g., `classicAPI`).
- **labels** (string) - Filters by labels (e.g., `remote-enabled`).
- **q** (string) - General search query.
### Request Example (URL format)
`?version=objectClassifications_SAP.json&states=classicAPI&labels=remote-enabled&q=*RFC*`
### Code Structure Example (`viewer/src/App.tsx`)
```typescript
// Viewer application structure (viewer/src/App.tsx)
import { AnalyticalTable } from "@ui5/webcomponents-react";
import { useContext, useEffect, useState } from "react";
import { DataContext, ObjectElement } from "./providers/DataProvider";
import { FilterContext } from "./providers/FilterProvider";
// Load and filter API data
function ApiExplorer() {
const { fileContent, product } = useContext(DataContext);
const { handleFilter, searchValues } = useContext(FilterContext);
const [selected, setSelected] = useState();
// Example: Filter APIs by search query with wildcard support
const searchQuery = "CL_HTTP*";
const regex = new RegExp(searchQuery.replace(/\*/g, '.*'), "i");
const filteredApis = fileContent.filter(element =>
regex.test(element.tadirObjName) ||
regex.test(element.objectKey) ||
regex.test(element.applicationComponent)
);
// Table columns configuration
const columns = [
{ Header: "Object Type", accessor: "tadirObject" },
{ Header: "Object Name", accessor: "tadirObjName" },
{ Header: "State", accessor: "state" },
{ Header: "Component", accessor: "applicationComponent" },
];
return (
setSelected(event.detail.row.original)}
filterable
sortable
groupable
/>
);
}
// Query parameter integration
// URL: ?version=objectClassifications_SAP.json&states=classicAPI&labels=remote-enabled&q=*RFC*
```
### Response
#### Success Response
The application renders an interactive table displaying API data. Users can select rows to view details.
#### Response Example
(UI rendering of an AnalyticalTable component with filtered API data.)
**Table Columns:**
- **Object Type**
- **Object Name**
- **State**
- **Component**
```
--------------------------------
### Load SAP APIs in TOON Format with Python
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Loads SAP API data from specified URLs in TOON format, which is optimized for LLM context, offering significant token savings compared to JSON. This function uses the 'requests' library to fetch data.
```python
import requests
def load_sap_apis_toon():
"""
Load SAP API data in TOON format (optimized for LLMs)
Compression: 18.3% reduction vs JSON
"""
# Classic APIs in TOON format
classic_url = "https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectClassifications_SAP.toon"
# Released APIs in TOON format
released_url = "https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfo_PCELatest.toon"
response = requests.get(classic_url)
classic_apis = response.text # Token-optimized format
response = requests.get(released_url)
released_apis = response.text
# Token count comparison:
# objectReleaseInfo_PCELatest.json: 3,659,440 tokens
# objectReleaseInfo_PCELatest.toon: 2,989,644 tokens
# Savings: 669,796 tokens (18.3%)
return {
"classic_apis": classic_apis,
"released_apis": released_apis,
"format": "toon",
"token_optimized": True
}
# Usage in LLM prompt
api_data = load_sap_apis_toon()
prompt = f"""
Context: SAP API Classifications
{api_data['classic_apis']}
Question: Which RFC-enabled classic APIs exist for material management?
"""
```
--------------------------------
### Fetch SAP API Data via REST
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Demonstrates how to fetch SAP API classification and release information directly from public GitHub repositories using cURL. This pattern is useful for programmatic integration and custom tooling, allowing data retrieval in JSON format.
```bash
# Fetch latest released APIs for SAP Cloud ERP
curl -H "Accept: application/json" \
https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfoLatest.json \
-o objectReleaseInfoLatest.json
# Fetch classic APIs for SAP Cloud ERP Private
curl -H "Accept: application/json" \
https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectClassifications_SAP.json \
-o objectClassifications_SAP.json
# Fetch specific release version (2023 FPS03)
curl https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfo_PCE2023_3.json \
-o objectReleaseInfo_PCE2023_3.json
# Parse JSON with jq to find deprecated APIs with successors
curl -s https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfoLatest.json \
| jq '.objectReleaseInfo[] | select(.state == "deprecated" and .successors != null) | {name: .tadirObjName, successors: .successors}'
# Filter classic APIs by label (RFC-enabled)
curl -s https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectClassifications_SAP.json \
| jq '.objectClassifications[] | select(.labels != null and (.labels | contains(["remote-enabled"]))) | {name: .tadirObjName, key: .objectKey, labels: .labels}'
# Count APIs by state
curl -s https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectClassifications_SAP.json \
| jq '.objectClassifications | group_by(.state) | map({state: .[0].state, count: length})'
# Expected output example:
# [
# {"state": "classicAPI", "count": 45231},
# {"state": "noAPI", "count": 12456},
# {"state": "internalAPI", "count": 3421}
# ]
```
--------------------------------
### Generate Viewer Content Data with Node.js
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Executes a Node.js script to generate the data files required for the web viewer application. This script processes JSON files from the './src/' directory, categorizes them, and creates an index file in the './viewer/src/data/' directory.
```bash
# Run from project root
node scripts/generateContents.js
```
--------------------------------
### REST API Access Pattern
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Demonstrates how to directly access SAP API data files using HTTP requests (curl) for programmatic integration and custom tooling.
```APIDOC
## REST API Access Pattern
### Description
This section details how to access SAP API data directly via RESTful HTTP requests. These examples use `curl` to fetch data in JSON format, suitable for integration into custom tools, scripts, or applications.
### Method
GET
### Endpoints
- `https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfoLatest.json`
- `https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectClassifications_SAP.json`
- `https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfo_PCE.json` (e.g., `objectReleaseInfo_PCE2023_3.json`)
### Parameters
None (Data is accessed via direct URL)
### Request Examples
**1. Fetch latest released APIs for SAP Cloud ERP:**
```bash
curl -H "Accept: application/json" \
https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfoLatest.json \
-o objectReleaseInfoLatest.json
```
**2. Fetch classic APIs for SAP Cloud ERP Private:**
```bash
curl -H "Accept: application/json" \
https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectClassifications_SAP.json \
-o objectClassifications_SAP.json
```
**3. Fetch specific release version (e.g., 2023 FPS03):**
```bash
curl https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfo_PCE2023_3.json \
-o objectReleaseInfo_PCE2023_3.json
```
**4. Parse JSON with `jq` to find deprecated APIs with successors:**
```bash
curl -s https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfoLatest.json \
| jq '.objectReleaseInfo[] | select(.state == "deprecated" and .successors != null) | {name: .tadirObjName, successors: .successors}'
```
**5. Filter classic APIs by label (RFC-enabled):**
```bash
curl -s https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectClassifications_SAP.json \
| jq '.objectClassifications[] | select(.labels != null and (.labels | contains(["remote-enabled"]))) | {name: .tadirObjName, key: .objectKey, labels: .labels}'
```
**6. Count APIs by state:**
```bash
curl -s https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectClassifications_SAP.json \
| jq '.objectClassifications | group_by(.state) | map({state: .[0].state, count: length})'
```
### Response
#### Success Response (200)
Returns the requested API data in JSON format.
#### Response Example (for count APIs by state):
```json
[
{"state": "classicAPI", "count": 45231},
{"state": "noAPI", "count": 12456},
{"state": "internalAPI", "count": 3421}
]
```
```
--------------------------------
### React TypeScript Viewer for SAP APIs
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
A React TypeScript application component utilizing UI5 Web Components for React to display SAP API data in an interactive, filterable, and sortable table. It demonstrates data filtering based on search queries with wildcard support and column configuration for table display.
```typescript
// Viewer application structure (viewer/src/App.tsx)
import { AnalyticalTable } from "@ui5/webcomponents-react";
import { useContext, useEffect, useState } from "react";
import { DataContext, ObjectElement } from "./providers/DataProvider";
import { FilterContext } from "./providers/FilterProvider";
// Load and filter API data
function ApiExplorer() {
const { fileContent, product } = useContext(DataContext);
const { handleFilter, searchValues } = useContext(FilterContext);
const [selected, setSelected] = useState();
// Example: Filter APIs by search query with wildcard support
const searchQuery = "CL_HTTP*";
const regex = new RegExp(searchQuery.replace(/\*/g, '.*'), "i");
const filteredApis = fileContent.filter(element =>
regex.test(element.tadirObjName) ||
regex.test(element.objectKey) ||
regex.test(element.applicationComponent)
);
// Table columns configuration
const columns = [
{ Header: "Object Type", accessor: "tadirObject" },
{ Header: "Object Name", accessor: "tadirObjName" },
{ Header: "State", accessor: "state" },
{ Header: "Component", accessor: "applicationComponent" },
];
return (
setSelected(event.detail.row.original)}
filterable
sortable
groupable
/>
);
}
// Query parameter integration
// URL: ?version=objectClassifications_SAP.json&states=classicAPI&labels=remote-enabled&q=*RFC*
```
--------------------------------
### Classic APIs JSON Format (v2)
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Defines the JSON structure for classic API classifications, including states like classicAPI, noAPI, and internalAPI, along with optional labels for RFC-enabled and transactional-consistent APIs. Used for SAP Cloud ERP Private Clean Core governance.
```json
{
"formatVersion": "2",
"objectClassifications": [
{
"tadirObject": "CLAS",
"tadirObjName": "/AIF/CL_ENABLER_IDOC",
"objectType": "CLAS",
"objectKey": "/AIF/CL_ENABLER_IDOC",
"softwareComponent": "SAP_BASIS",
"applicationComponent": "BC-SRV-AIF",
"state": "classicAPI"
},
{
"tadirObject": "FUGR",
"tadirObjName": "SOME_FUNCTION_GROUP",
"objectType": "FUNC",
"objectKey": "RFC_ENABLED_FUNCTION",
"softwareComponent": "SAPSCORE",
"applicationComponent": "MM-PUR",
"state": "classicAPI",
"labels": ["remote-enabled", "transactional-consistent"],
"successors": [
{
"tadirObject": "CLAS",
"tadirObjName": "CL_SUCCESSOR_API",
"objectType": "CLAS",
"objectKey": "CL_SUCCESSOR_API"
}
]
}
]
}
```
--------------------------------
### Released APIs JSON Format (v1)
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Defines the JSON structure for released API information, including object identification, software component, application component, state, and successor details. Used for SAP Cloud ERP and BTP editions.
```json
{
"formatVersion": "1",
"objectReleaseInfo": [
{
"tadirObject": "CLAS",
"tadirObjName": "CL_SOME_CLASS",
"objectType": "CLAS",
"objectKey": "CL_SOME_CLASS",
"softwareComponent": "SAP_BASIS",
"applicationComponent": "BC-ABA",
"state": "released"
},
{
"tadirObject": "FUGR",
"tadirObjName": "OLD_FUNCTION_GROUP",
"objectType": "FUNC",
"objectKey": "OLD_FUNCTION_MODULE",
"softwareComponent": "SAP_BASIS",
"applicationComponent": "BC-ABA",
"state": "deprecated",
"successorClassification": "oneObject",
"successors": [
{
"tadirObject": "CLAS",
"tadirObjName": "CL_NEW_CLASS",
"objectType": "CLAS",
"objectKey": "CL_NEW_CLASS"
}
]
}
]
}
```
--------------------------------
### ABAP Report for Partner API Classification Generation
Source: https://context7.com/sap/abap-atc-cr-cv-s4hc/llms.txt
Details the use of an ABAP report (SYCM_API_CLASSIFICATION_MANAGR) for generating partner JSON files. This report requires specific parameters to be set, including the namespace, output format, and inclusion criteria for objects within the partner's namespace.
```abap
* Step 1: Generate partner JSON file using ABAP report
* Note: Requires implementation of SAP Note 3630552
* Transaction: SE38
* Report: SYCM_API_CLASSIFICATION_MANAGR
* Execute report with parameters:
* - Namespace: /YOURNAMESPACE/
* - Output format: JSON
* - Include only objects in your namespace
* - File naming: objectClassifications_YOURNAMESPACE.json
* Step 2: Validate the generated JSON file locally
* Ensure the file structure matches format version 2:
DATA: lv_format_version TYPE string VALUE '2'.
DATA: lt_classifications TYPE STANDARD TABLE OF ...
* Step 3: Validate against schema
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.