bw_create_variable
Create reusable BW variables on characteristics to serve as query filter parameters, supporting user entry, customer exit, authorization, replacement path, hierarchy, and hierarchy nodes.
Instructions
Create a reusable BW Variable on a characteristic, for use as a filter parameter in queries. The variable is created active and consistent. Covers processing types UserEntry (manual entry, the default), CustomerExit, Authorization and the current-member flavour of ReplacementPath, and stands for a characteristic value, a hierarchy or hierarchy nodes. Text and formula variables are not supported. To keep a variable out of the user's variable screen, set ready_for_input false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | No | Alias for development_class (for consistency with other tools). | |
| reusable | No | Whether the variable can be reused in multiple queries. Defaults to true. | |
| iobj_name | Yes | Technical name of the InfoObject (characteristic) this variable is based on (e.g. "0CALMONTH"). Must exist in the system. | |
| transport | No | Transport request number (e.g. "DEVK900123"). Only needed when the target package is transportable. | |
| input_type | No | Whether a value is required: Optional (default), 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. Defaults to Interval. | |
| description | Yes | Variable description (displayed in query parameter screens). | |
| variable_name | Yes | Technical name of the variable to create (e.g. "VAR_NAME"). | |
| variable_type | No | What the variable stands for: a characteristic value (default), a whole hierarchy, or hierarchy nodes. Hierarchy variables still reference a characteristic via iobj_name. | |
| master_language | No | Language code for the descriptions (e.g. "EN", "DE"). Defaults to the BW_LANGUAGE of the connection, otherwise "EN". | |
| processing_type | No | How the variable is filled: UserEntry (manual entry by the user, the default), CustomerExit (filled by the exit), Authorization, or ReplacementPath. Replacement path is limited to the current-member variant, which needs no donor object; replacement from a query result is not supported. | |
| ready_for_input | No | Whether the variable is shown on the variable screen for user input. Defaults to true. Set false for a variable that only the customer exit fills. | |
| development_class | No | Package name (e.g. "ZPKG"). Defaults to $TMP if omitted. |