SAP扩充库位有两个方式:1,物料主数据里。2,MMSC。
MMSC可以针对物料和工厂批量扩展。一般是业务常用的。
FORM locat_dbc USING p_material p_plant p_stloc CHANGING p_retu STRUCTURE bapireturn. REFRESH:bdcdata,messtab. PERFORM bdc_dynpro USING 'SAPMM03M' '0105'. PERFORM bdc_field USING 'BDC_CURSOR' 'RM03M-WERKS'. PERFORM bdc_field USING 'BDC_OKCODE' '/00'. PERFORM bdc_field USING 'RM03M-MATNR' p_material. PERFORM bdc_field USING 'RM03M-WERKS' p_plant. PERFORM bdc_field USING 'RM03M-LFLAG' 'X'. PERFORM bdc_dynpro USING 'SAPMM03M' '0195'. PERFORM bdc_field USING 'BDC_CURSOR' 'RM03M-LGORT(10)'. PERFORM bdc_field USING 'BDC_OKCODE' '/00'. PERFORM bdc_field USING 'RM03M-LGORT(10)' p_stloc. PERFORM bdc_dynpro USING 'SAPMM03M' '0195'. PERFORM bdc_field USING 'BDC_CURSOR' 'RM03M-LGORT(05)'. PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. CALL TRANSACTION 'MMSC' USING bdcdata MODE 'E' UPDATE 'S' MESSAGES INTO messtab. ENDFORM. " LOCAT_DBC
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/18597.html