bw_create_ckf
Create reusable calculated key figures on an InfoProvider using operator/operand formula trees, with optional transport recording.
Instructions
Create a reusable Calculated Key Figure (CKF) on an InfoProvider. The formula is passed as an operator/operand tree in the same node syntax bw_update_query_key_figures uses for "add_formula", so a tree read back from bw_get_ckf (field formula_tree) can be written again unchanged. Records to a transport when package and transport_request are given, and reports in "recorded_in" where the entry actually landed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formula | Yes | 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. | |
| package | No | Development package (default "$TMP"). | |
| decimals | No | Number of decimal places (0-9). Server default when omitted. | |
| info_area | No | InfoArea the CKF is filed under. | |
| description | Yes | Description of the CKF. | |
| provider_name | Yes | InfoProvider the CKF is defined on (e.g. a CompositeProvider). | |
| technical_name | Yes | Technical name of the new CKF. | |
| transport_request | No | Transport request to record the CKF in. |