效果:
代码:
DATA: lv_matnr TYPE mdma-matnr, lv_werks TYPE mdma-werks, lv_berid TYPE mdlg-berid, lv_berty TYPE mdlv-berty, ls_mdmax TYPE sdibe_massfields, ls_mdma TYPE mdma, ls_dpop TYPE dpop, ls_return TYPE bapireturn1. "物料 lv_matnr = 'ATBH0239-22SV'. "工厂 lv_werks = '2000'. "MRP范围MDLG-BERID lv_berid = '2000_ND'. "MRP范围数据 ls_mdma-matnr = 'ATBH0239-22SV'. ls_mdma-werks = '2000'. ls_mdma-dispo = '404'. ls_mdma-dismm = 'ND'. ls_mdmax-xdismm = 'X'. ls_mdmax-xdispo = 'X'. CALL FUNCTION 'MD_MRP_LEVEL_CREATE_DATA' EXPORTING i_matnr = lv_matnr i_werk = lv_werks i_mrp_area = lv_berid i_selfields = ls_mdmax i_mdma = ls_mdma i_dpop = ls_dpop IMPORTING e_error_return = ls_return. cl_demo_output=>write( ls_return ). cl_demo_output=>display( ).
标签:MD,matnr,LEVEL,mdma,MRP,lv,ls,TYPE From: https://www.cnblogs.com/StephenAmell/p/16881300.html