有谁知道从哪个表中获取生产订单的基本数量?我认为是在AFVV-MGVRG,但我不确定。
我在下面的结构中需要它:
TYPES: BEGIN OF tables_fields,
AUFNR TYPE AUFK-AUFNR, "Nr comanda productie
* AUFNR TYPE AUFM-AUFNR, "Nr comanda productie
* MAKTX TYPE MAKT-MAKTX, "Descriere material
AUART TYPE AUFK-AUART, "Tip comanda /Sectie
WERKS TYPE AUFK-WERKS, "Unitate logistica
TXT TYPE T003P-TXT, "Nume sectie
"MENGE TYPE AUFM-MENGE, "Cantitate buc predata
GAMNG TYPE AFKO-GAMNG, "Cantitatea totala vrac
GMEIN TYPE AFKO-GMEIN, "Unitatea de masura kg cantitate totala
"WEMNG TYPE AFPO-WEMNG, "Cantitatea totala livrata
ERFMG TYPE AUFM-ERFMG, "Cantitatea totala livrata defalcata
GSTRP Type AFKO-GSTRP, "Data lansarii comenzii
GLTRP TYPE AFKO-GLTRP, "Data estimativa a finalizarii comenzii
BLDAT TYPE AUFM-BLDAT, "Data finalizarii comenzii
MGVRG TYPE AFVV-MGVRG, "Bucati pe comanda-cant de baza
"MEINS TYPE AUFM-MEINS,"Unitate bucati pe comanda-rectificat
MEINH TYPE AFVV-MEINH, "Unitate de masura bucati pe comanda
MENGE TYPE AUFM-MENGE, "Cantitate buc predata
* BMENG TYPE STKO-BMENG, "Cantitatea de baza estimata
* BMEIN TYPE STKO-BMEIN, "Unitatea de masura cantitatea de baza estimata
MATNR TYPE AUFM-MATNR, "Cod material
"PLNBEZ TYPE AFKO-PLNBEZ,"Cod material
MAKTX TYPE MAKT-MAKTX, "Descriere material
MBLNR TYPE AUFM-MBLNR,
ZEILE TYPE AUFM-ZEILE,
BMSCH TYPE AFVV-BMSCH,
SPRAS TYPE T003P-SPRAS,"Restrictionare limba
ZILEDEP TYPE I,"AFKO-GLTRP, "Filtru date intre care s-au realizat comenzi
COMDEP(10) TYPE C,"Nr zile comanda depasita
COMINTRE TYPE AFKO-GSTRP,"Data comenzi termen depasit
* ERDAT TYPE AUFK-ERDAT, "Data lansarii comenzii - campul vechi
* LTRMI TYPE AFPO-LTRMI, "Data finalizarii comenzii noul camp
"ISTAT TYPE TJ02T-ISTAT,
"TXT04 type TJ02T-TXT04, "Text scurt stare comanda
"TXT30 TYPE TJ02T-TXT30, "Text lung stare comanda
line_color(4) TYPE c,
END OF tables_fields.
答案 0 :(得分:0)
因此,您希望转换基数单位的数量。
if lf_afpo_umren > 0. "if 0 division by zero dump
try.
lf_afpo_psmng_basme = lf_afpo_psmng * lf_afpo_umrez / lf_afpo_umren
catch cx_sy_arithmetic_overflow.
"do somethin, e.g. call function 'maximal_value_get'
catch cx_sy_arithmetic_error.
"do something, e.g. clear lf_afpo_psmng_basme.
else.
"try it manually with table MARA/MARM
"or try function module
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = lf_matnr
i_in_me = lf_afpo_amein
i_out_me = lf_mara_meins
i_menge = lf_afpo_psmng
IMPORTING
e_menge = lf_afpo_psmng_basme
EXCEPTIONS
error_in_application = 1
error = 2
OTHERS = 3.
if sy-subrc <> 0.
"do something, clear lf_quantity_basme
endif.
答案 1 :(得分:-1)
基本数量似乎由AFPO-PSMNG / AFPO-UMREN计算。在这种情况下,结果与基数相同。