Невидимка написал(а):
на i_step = 0 нет доступа к значениям переменным в отчета - не видны никакие вообще переменные. видно только куб, признак, элемент данных, таблица мастер данных...
Возможно это и правда, но вот есть пример кода... может врут в
https://www.sdn.sap.com/irj/sdn/go/port ... 55eeb82b6f
* Called from "Get Attribute" Function (Modification)
* I_VNAM Attribute (not the name of the formula variable)
* I_IOBJNM InfoObject
* I_T_VAR_RANGE Contains characteristic value, attribute value,
* unit of measure, query key date
IF i_step = 0 AND i_vnam = 'YUOMCNVF' AND i_iobjnm = '0MATERIAL'.
* read material and base uom from variables
LOOP AT i_t_var_range INTO l_s_var.
CASE l_s_var-iobjnm.
WHEN '0MATERIAL'. l_material = l_s_var-low.
WHEN '0BASE_UOM'. l_base_uom = l_s_var-low.
ENDCASE.
ENDLOOP.
* get factor for base UoM
PERFORM get_factor USING l_material l_base_uom l_factor1.
* get factor for alternate UoM
PERFORM get_factor USING l_material g_aunit l_factor2.
* return conversion factor for variable
IF l_factor2 <> '0.0'.
l_factor = l_factor1 / l_factor2.
e_meeht = g_aunit. "insert
ELSE.
* When the UoM conversion is not maintained, instead of showing 0, the
* base UoM with a factor of 1 is used. Therefore, the user sees MIXED
* VALUES in the total line and knows right away that there is something
* wrong. That way it’s easier to track inexistent conversion factors.
* l_factor = 0. "delete
l_factor = 1. "insert
e_meeht = l_base_uom. "insert
ENDIF.
CLEAR l_s_range.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
l_s_range-low = l_factor.
APPEND l_s_range TO e_t_range.
* e_meeht = g_aunit. "delete
ENDIF.