bw_update_transformation
Map a source field to a target InfoObject or convert existing rules in a BW Transformation to direct, routine, formula, constant, lookup, or no_update types.
Instructions
Map a source field to a target InfoObject in a Transformation, or convert an existing rule to a field routine (StepRoutine) or formula rule (StepFormula). rule_type="direct" (default): changes a StepNoUpdate/StepInitial rule to StepDirect. rule_type="routine": converts an existing StepDirect, StepInitial, or StepNoUpdate rule to StepRoutine (AMDP field routine). rule_type="formula": converts an existing rule to StepFormula — no ABAP class generated, BW evaluates the formula natively. rule_type="constant": sets a fixed constant value on the target field — no source field needed. For routine/formula on StepNoUpdate rules, source_field is required. For routine/formula on StepDirect/StepInitial rules, source_field is ignored (field is already mapped). source_field is always ignored for rule_type="constant". Returns a lock_handle for bw_activate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transformation_name | Yes | Transformation name (UUID-like key). | |
| source_field | No | Source field name in the source segment (e.g. "FIELD_NAME"). Required for rule_type="direct" if the existing rule has no source mapping. Also required for routine/formula when the target has no source mapping yet (StepNoUpdate). Required for rule_type="lookup". | |
| target_infoobject | Yes | Target InfoObject name in the target segment (e.g. "IOBJ_NAME"). | |
| rule_type | No | Rule type to assign. "direct" (default): maps source field directly (StepDirect). "routine": converts the rule to an AMDP field routine (StepRoutine) — the server generates the ABAP class automatically. "formula": converts the rule to a formula rule (StepFormula) — requires the formula parameter. "constant": sets a fixed constant value (StepConstant) — requires the constant_value parameter, source_field is ignored. "lookup": converts the rule to a StepRead (Lookup) rule — requires lookup_object and lookup_object_type. "no_update": reverts any existing mapping back to StepNoUpdate (no mapping, field stays empty). IMPORTANT: AMDP SQLSCRIPT methods only allow ASCII 7-bit characters — no German umlauts or special symbols in code or comments. | |
| formula | No | Formula expression for rule_type="formula" (required). Source fields are referenced by their technical field name: use /BIC/FIELDNAME for custom InfoObjects (e.g. "/BIC/FIELD_NAME + 10"), or the direct field name for standard InfoObjects. Operators: +, -, *, /. Functions: IF, ABS, CONCATENATE, DATE_YEAR, etc. Comparison operators < > <= >= <> are supported (will be XML-escaped automatically). | |
| constant_value | No | Constant value for rule_type="constant" (required). The value is written as-is into the target field during data loading. Example: "X" for a flag field, "USD" for a currency field. | |
| lookup_object | No | Name of the InfoObject or aDSO to read from (Nachlese-Objekt). Required for rule_type="lookup". | |
| lookup_object_type | No | Type of the lookup object. "IOBJ" for InfoObject, "ADSO" for aDSO. Required for rule_type="lookup". | |
| additional_source_fields | No | Additional source fields for rule_type="formula" when the formula references more than one source field. Combined with source_field, all listed fields are registered as inputs on the StepFormula rule. Example: ["QUANTITY_SOLD", "COST_PER_UNIT"]. | |
| transport | No | Transport request number (e.g. DEVK900123). Only required if the BW system requires transport assignment. |