- Получим данные по matid.
- Получим коэффициент между БЕИ и АЕИ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
CALL FUNCTION '/SAPAPO/DM_MATID_GET_MATERIAL' EXPORTING iv_matid = iv_matid IMPORTING ev_meins = lv_meins --> Получим БЕИ EXCEPTIONS material_not_found = 1 OTHERS = 2. CALL FUNCTION '/SAPAPO/DM_UNIT_CONVERSION' EXPORTING i_matid = iv_matid i_meins_from = iv_base_meins "БЕИ i_meins_to = lv_meins IMPORTING e_umref = lv_umref "коэффициент EXCEPTIONS material_not_found = 1 conversion_error = 2 OTHERS = 3. |