Act on the SAP screen
sap_actPerforms actions on open SAP GUI, Web GUI, or Fiori screens, including field entry, key presses, selections, and transaction commands, then returns the resulting screen or its changes.
Instructions
Acts on the SAP screen; answers with the new screen, on the same screen only the changes ("~" changed line, "+" new, "-" gone, "=" unchanged), so sap_look after it is rarely needed. Ids from the latest view; the last part is enough. "STATUS E": the step did not go through, correct the field it names; W: Enter accepts it; S: done (document numbers). A new "WINDOW wnd[1]" is a popup: answer it before anything else. set only types: fill every field, then one Enter (key 0). Codes: f4 on the field lists them. do and its fields: set id, value; a table cell: id (the table), row, col; "\n" breaks lines in a text editor key key: Enter, Back, Execute, Save, Cancel, Exit, F1-F24, Shift+F3, or SAP's number press id (click too); btn[N] is function key N okcode value: "/nVA03" starts a transaction, "/oVA03" in a new session; it submits on its own (no Enter after it); the command field cannot be typed into select id (tab, radio, menu entry, list item); with row: a table row (value false: deselect) check id, value true|false combo id, key (entry key or text; without: lists them) f4, focus, dblclick id grid id, row, col, how double|select|cell tree id, node, how double|select|expand|collapse toolbar id, button scroll id, to: a row from 0, next, prev, first, last, left, right open app "#SalesOrder-manage" (Fiori launchpad) timeout: seconds per step (default 180). actions: [...] up to 20 in one call, a screen's fields then its key: [{"do":"set","id":"ctxtVBAK-AUART","value":"OR"},{"do":"key","key":0}]. Stops at the first surprise (failure, refusal, a write awaiting yes, popup, E/W/A status, another screen unless the next action's id is on it and it does not write; okcode "/n" and open go on into it). Per step: expect {"screen":"4001"}|{"screen":"*"} (any)|{"popup":true}|{"status":"W"} goes on through it; show:true adds the screen after it; unseen:true lets a write run on a screen first reached in the batch. Do not repeat a failed action unchanged. An action that may write (save, post, delete...) runs only after the user says yes in a dialog the client shows; if they decline, leave the transaction without saving (okcode /n), then ask how to go on. A client that cannot ask the user gets it refused: then tell the user what you would have saved.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "sap_act"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| do | No | ||
| id | No | ||
| to | No | ||
| app | No | ||
| col | No | ||
| how | No | ||
| key | No | ||
| row | No | ||
| full | No | answer with the whole screen, not the changes | |
| node | No | ||
| value | No | ||
| button | No | ||
| actions | No | ||
| session | No | number, id, system, transaction or sapgui|webgui|fiori; default: the active one | |
| timeout | No |