bw_save_afo_workbook
Saves an Analysis for Office workbook back to SAP BW under a new name and optionally adds it to a role menu, with overwrite protection for existing workbooks.
Instructions
Save an Analysis for Office workbook to BW, as Analysis for Office does, and optionally place it in a role menu. Typical use: fetch a workbook with bw_get_afo_workbook, change it, save it back under a new name. If a workbook of that name exists, nothing is saved unless overwrite is true — confirm with the user before passing it. The where-used list is built from the workbook itself (queries, planning functions and sequences, BPC model); a data source of another kind stops the save. With role (and folder) the workbook is added to that role menu, once. BW checks the caller's authorization and locks. Needs the SOAP RFC service (/sap/bc/soap/rfc).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Technical name to save under (e.g. "WORKBOOK_NAME"). | |
| role | No | Role whose menu the workbook is added to (e.g. "ROLE_NAME"). | |
| folder | No | Folder path inside the role menu, separated by "/" (e.g. "Planning/Prices"); default the top level. | |
| file_path | No | Local .xlsx/.xlsm file to save. Local server only. | |
| overwrite | No | Replace an existing workbook of the same name (default false). Only after the user confirmed it. | |
| description | No | Workbook text, at most 60 characters. Required for a new workbook; an existing one keeps its text when omitted. | |
| content_base64 | No | The workbook as base64, instead of file_path. |