bw_update_variable
Update a reusable BW variable in place—description, input, selection, processing, and formula defaults—without delete/recreate; its UID and existing query, CKF and structure references stay intact.
Instructions
Change a reusable BW Variable in place: description, input readiness, input type (optional / mandatory), selection type and processing type, and on a formula variable its default value, unit and currency. The UID stays the same, so references from queries, CKFs and structures survive the change — unlike the delete-and-recreate that was the only correction path before, which BW refuses as soon as anything references the variable, and deleting a query does not remove its reusable components either. The reference characteristic and the variable type cannot be changed: BW accepts such a write, reports it as consistent and keeps the old value, so both are rejected here instead of being sent. Read the result back with bw_get_variable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Formula variables only: unit of measure (dimension Quantity or Price); an empty string removes it where the dimension allows. | |
| currency | No | Formula variables only: currency key (dimension Amount or Price); an empty string removes it where the dimension allows. | |
| input_type | No | Whether a value is required: Optional, MandatoryWithInitial (entry required, initial value allowed) or MandatoryWithoutInitial (entry required, initial value rejected). | |
| represents | No | Selection type. Interval is a from/to range, SelectionOption allows the full set of comparison operators. | |
| description | No | New description. | |
| default_value | No | Formula variables only: new default value, or null to remove it. A fractional value needs the logon user's decimal notation, as in bw_create_variable. | |
| variable_name | Yes | Technical name of the variable. | |
| processing_type | No | How the variable is filled. ReplacementPath is limited to the current-member variant, the same one bw_create_variable writes. A formula variable takes UserEntry or CustomerExit only. | |
| ready_for_input | No | Whether the variable is shown on the variable screen for user input. | |
| transport_request | No | Transport request to record the change in. |