bw_create_planning_function
Creates and saves a Planning Function of a chosen type on an aggregation level, applying characteristic usage, conditions, and parameter values immediately.
Instructions
Create a Planning Function (TLOGO PLSE) of a given function type on an aggregation level. The server fills in the parameter skeleton of the function type and a usage of NONE for every characteristic; characteristic usage, conditions and parameter values can be passed right away and are applied after the create. Saved active — there is no activation step. Read an existing function of the same type with bw_get_planning_function to see which parameters a type has.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | No | For function types with several rules: the 1-based rule that conditions and parameters apply to. Defaults to 1. | |
| label | Yes | Description of the Planning Function. | |
| package | No | Package. Defaults to "$TMP". | |
| info_area | No | InfoArea. Defaults to the InfoArea of the aggregation level. | |
| transport | No | Transport request number. Required on systems with transport obligation. | |
| char_usage | No | Characteristic usage per characteristic. FIELDS_TO_BE_CHANGED: the function may change its values, and records that differ in it are processed together. FIELD_FOR_CONDITIONS: not changed, but conditions may restrict it. NONE: neither. Every characteristic that is not FIELDS_TO_BE_CHANGED is a block characteristic — the function runs once per combination of their values. On a CompositeProvider the bare characteristic name is accepted as well as the prefixed one. | |
| conditions | No | Conditions of the rule, per characteristic. The given constraints replace every constraint the characteristic has; an empty or omitted constraints list removes the condition. A condition is only valid on a characteristic with usage FIELD_FOR_CONDITIONS. | |
| parameters | No | Parameter values of the rule, as shown in the parameter tree of bw_get_planning_function. Applies to single-value parameters; a nested one may be named by its path ("STRUCTURE/FIELD") or, where unambiguous, by its own name. Pass value for a constant or variable for a variable reference. The FOX code of a FORMULA function is the value of its FLINE parameter. A key figure selection (e.g. KYFSEL) takes key_figures, a data selection (e.g. the from and to selections of a copy) takes selection. In a table parameter row n of every field belongs together; row = current rows + 1 adds a row. | |
| function_type | Yes | Planning function type (e.g. "0RSPL_FORMULA", "0RSPL_COPY", "0RSPL_DELETE", or a custom type). | |
| aggregation_level | Yes | Aggregation Level the function works on (e.g. "OBJECT_NAME"). | |
| planning_function_name | Yes | Technical name of the new Planning Function, at most 20 characters (e.g. "OBJECT_NAME"). |