BW Objects (write)
bw_writeCreate, change, activate, and delete BW objects through BW's own APIs with dry-run validation by default; set commit to true to write changes and record them on Workbench requests.
Instructions
Create, change, activate and delete BW objects through BW's own APIs, recorded on Workbench requests. Dry run unless commit: true.
Actions (pass action plus that action's parameters; connectionId picks the system): • create — Create a BW object through BW's own API, by default activated afterwards. This version creates InfoObjects (type IOBJ) through BAPI_IOBJ_CREATE; bw(action: "capabilities") shows what else the system and this version support. details holds BAPI6108 fields, for example a characteristic: { TYPE: "CHA", DATATP: "CHAR", INTLEN: 10, TEXTSHORT: "Short", TEXTLONG: "Long text", INFOAREA: "" }, a key figure: { TYPE: "KYF", KYFTP: "AMO", UNINM: "0CURRENCY" }; an unknown field is refused; read an existing one with bw(action: "read") to see the fields. Required: type, name, definition. Optional: package, activate, commit, transport, workItem, showAllTransports. • change — Change a BW object through BW's own API, starting from its current definition: values sets single fields, and a table given replaces that table. By default activated afterwards. This version changes InfoObjects through BAPI_IOBJ_CHANGE. Required: type, name. Optional: values, compounds, attributes, navigationAttributes, activate, commit, transport, workItem, showAllTransports. • activate — Activate a BW object's modified version through BW's own API (InfoObjects: BAPI_IOBJ_ACTIVATE_MULTIPLE). Dry run unless commit: true; records on a Workbench request when the object's package records changes. Required: type, name. Optional: commit, transport, workItem, showAllTransports. • delete — Delete a BW object through BW's own function (InfoObjects: RSDG_IOBJ_MULTI_DELETE), which refuses while other objects still use it (see bw(action: "where_used")). In a package that records changes the object is first recorded on a Workbench request, so the deletion reaches the other systems when the request is imported; an object already locked on a request uses that one. Dry run unless commit: true. Required: type, name. Optional: commit, transport, workItem, showAllTransports.
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": {
"action": "<action>"
},
"name": "bw_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Object name (e.g. ZCUSTOMER, 0MATERIAL) | |
| type | No | BW object type (TLOGO) as BW names it: IOBJ InfoObject, ADSO DataStore object (advanced), AREA InfoArea, HCPR CompositeProvider, TRFN transformation, DTPA DTP, RSPC process chain, CUBE InfoCube, ODSO classic DSO, … (bw(action: "capabilities") lists the system's types) | |
| action | Yes | What to do: create, change, activate, delete (see the tool description) | |
| commit | No | true writes; default is a dry run that checks and reports only | |
| values | No | change: Fields to set, e.g. { TEXTLONG: "New text" } (BAPI6108 names for an InfoObject) | |
| package | No | create: Package of the new object (default $TMP: local, not transported) | |
| activate | No | create: Activate after creating (default true) | change: Activate after changing (default true) | |
| workItem | No | Name of the piece of work, to keep using one transport for it | |
| compounds | No | change: Replace the compound rows | |
| transport | No | Workbench request to record on, for an object in a package that records changes; without it the open requests are offered | |
| attributes | No | change: Replace the attribute rows | |
| definition | No | create: The object's definition in the fields of BW's API for its type | |
| connectionId | No | SAP system connection ID | |
| showAllTransports | No | Offer everyone's open Workbench requests, not just yours | |
| navigationAttributes | No | change: Replace the navigation attribute rows |