*---------------------------------------------------------------------*
* FORM get_sku_list *
*---------------------------------------------------------------------*
* 取物料明细 *
*---------------------------------------------------------------------*
FORM get_sku_list.
SELECT
mara~matnr
mean~meinh
mean~ean11
mara~breit
mara~laeng
mara~hoehe
mara~meabm
mara~brgew
mara~ntgew
mara~gewei
mara~volum
mara~voleh
mara~meins
maw1~wherl
maw1~wherr
INTO CORRESPONDING FIELDS OF TABLE itab_sku_list
FROM mara LEFT JOIN maw1 ON mara~matnr = maw1~matnr
LEFT JOIN mean ON mara~matnr = mean~matnr
WHERE ( mara~ersda = p_date OR mara~laeda = p_date ).
SORT itab_sku_list BY matnr.
LOOP AT itab_sku_list.
CHECK NOT itab_sku_list-meinh = itab_sku_list-meins.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
input = 1
round_sign = 'X'
unit_in = itab_sku_list-meinh
unit_out = itab_sku_list-meins
IMPORTING
output = itab_sku_list-count
EXCEPTIONS
conversion_not_found = 01
division_by_zero = 02
input_invalid = 03.
MODIFY itab_sku_list.
ENDLOOP.
ENDFORM.
阅读(1774) | 评论(0) | 转发(0) |