Skip to main content
Glama

Call BAPI with Commit/Rollback

sap_bapi_call
Destructive

Call an RFC-enabled BAPI function to create, change, or delete SAP business objects, with automatic commit on success and rollback on errors.

Instructions

Call a BAPI function module. Automatically calls BAPI_TRANSACTION_COMMIT on success or BAPI_TRANSACTION_ROLLBACK on ABAP error (type E/A in the RETURN table).

WARNING: BAPI calls can create, change, or delete business objects. Use only in development/sandbox unless you are certain of the effect.

Args:

  • bapi_name (string): BAPI name (must be RFC-enabled).

  • params (object): BAPI parameters (default: {}).

  • response_format.

Returns (json): { functionName, result, return?: [{type, id, number, message}], committed }. committed=true means BAPI_TRANSACTION_COMMIT was called. committed=false means an error occurred and it was rolled back.

Examples:

  • "Create a purchase order" -> bapi_name='BAPI_PO_CREATE1', params={...header/item tables...}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsNoBAPI import / table parameters as a JSON object.
bapi_nameYesBAPI function module name (e.g. 'BAPI_GOODSMVT_CREATE').
response_formatNoOutput format: 'markdown' (human-readable, default) or 'json' (structured).markdown
Install Server

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark destructiveHint=true and readOnlyHint=false, and the description adds autocommit/rollback behavior, ABAP error-type handling, and a warning about creating/changing/deleting business objects. No contradiction exists; the description significantly enriches the annotation profile.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with the warning first, followed by args, return format, and an example. Each section contributes, though the Args section partially duplicates schema parameter descriptions. Overall it is efficient and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex mutation tool with no output schema, the description explains the return JSON structure including the committed flag, RETURN table entries, and transaction outcomes. It is sufficiently complete for an agent to invoke the tool correctly and understand side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds the constraint that bapi_name must be RFC-enabled and provides a concrete example mapping 'Create a purchase order' to BAPI_PO_CREATE1, which adds practical guidance beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies the verb 'Call' and resource 'BAPI function module', and clearly highlights commit/rollback semantics. It does not explicitly distinguish from sibling sap_rfc_call, but the BAPI-specific transaction handling makes the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes a warning to use only in development/sandbox unless certain of the effect, which is useful context. However, it does not state when to choose this tool over alternatives like sap_rfc_call or sap_read_table, nor does it provide any when-not conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/appmaster3000/sap-abap-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server