bw_update_ckf
Update a reusable calculated key figure by either replacing its formula completely or making targeted edits that leave the rest untouched, with all changes saved atomically.
Instructions
Change a reusable Calculated Key Figure. Two call forms: pass "formula" to replace the whole expression, or "operations" for targeted edits that leave the rest of the formula untouched — the usual case being "add another summand to a sum" without having to know or rebuild the existing formula. All operations are applied to one document and written in a single save, so a rejected operation leaves the stored formula unchanged rather than half edited.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formula | No | Replacement formula tree (mutually exclusive with "operations"). Formula tree. A node is one of: {"type":"operator","code":"+","operands":[...]} (codes as in the BW formula editor: + - * / , NDIV0, IF, MAX, %A, …); {"type":"component","component_name":"..."} for a reusable CKF/RKF; {"type":"key_figure","name":"..."} for a basic key figure InfoObject; {"type":"constant","value":100}. Operand counts are checked against the operator catalog before anything is written. | |
| decimals | No | Number of decimal places (0-9). | |
| operations | No | Targeted edits on the existing formula, applied in order. | |
| description | No | New description. | |
| component_name | Yes | Technical name of the CKF. | |
| transport_request | No | Transport request to record the change in. |