CreateCDSView
Create or replace a local CDS DDL view in an SAP system, with automatic activation and support for local packages such as $TMP and $LOCAL.
Instructions
Create or replace a local CDS DDL view in the SAP system. Only supports local packages ($TMP, $LOCAL, $-prefixed). Auto-activates by default.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"view_name": "<view_name>",
"source_code": "<source_code>"
},
"name": "CreateCDSView"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | No | Package name (defaults to $TMP, must be a local package) | |
| view_name | Yes | CDS view name (must start with Z or Y) | |
| description | No | Optional description for the CDS view | |
| source_code | Yes | Complete DDL source code for the CDS view | |
| auto_activate | No | Optional: Automatically activate the CDS view after creation (default: true) | |
| preaudit_requested | No | Optional: Request pre-audit during activation (default: true, only used if auto_activate is true) |