查看MD04结果的程序 Production Planning - Extract data from MRP Table
生活随笔
收集整理的這篇文章主要介紹了
查看MD04结果的程序 Production Planning - Extract data from MRP Table
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
原文地址:http://www.sap-img.com/pp001.htm
?
Production Planning - Extract data from MRP Table
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * * A sample program to extract data from the MRP table. * *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ REPORT ZMRPTABLE.TABLES: MDKP,? "Header Data for MRP DocumentMDTB,? "MRP tableMDTC,? "Aggregated MRP table itemsT457T. "Description of MRP elementsDATA: BEGIN OF MDTBX OCCURS 0.INCLUDE STRUCTURE MDTB. DATA: END?? OF MDTBX.SELECT-OPTIONS: PLANT FOR MDKP-PLWRK OBLIGATORY,MATNR FOR MDKP-MATNR OBLIGATORY.CLEAR: MDKP, MDTB. SELECT * FROM MDKP WHERE DTART EQ 'MD'AND MATNR IN MATNRAND PLWRK IN PLANT.WRITE:/ MDKP-MATNR, MDKP-PLWRK.IF MDKP-CFLAG EQ 'X'.CLEAR MDTBX. REFRESH MDTBX.IMPORT MDTBX FROM DATABASE MDTC(AR) ID MDKP-DTNUM.LOOP AT MDTBX.MOVE MDTBX TO MDTB.SELECT SINGLE * FROM T457T WHERE SPRAS = 'E'AND DELKZ = MDTB-DELKZ.IF MDTB-PLUMI = '-'. MULTIPLY MDTB-MNG01 BY -1. ENDIF.WRITE:/ MDTB-DAT00, T457T-DELB1, MDTB-VSTAT,MDTB-MNG01, MDTB-LGORT.ENDLOOP.ELSE.SELECT * FROM MDTBWHERE DTNUM EQ MDKP-DTNUMORDER BY PRIMARY KEY.SELECT SINGLE * FROM T457T WHERE SPRAS = 'E'AND DELKZ = MDTB-DELKZ.IF MDTB-PLUMI = '-'. MULTIPLY MDTB-MNG01 BY -1. ENDIF.WRITE:/ MDTB-DAT00, T457T-DELB1, MDTB-VSTAT,MDTB-MNG01, MDTB-LGORT.ENDSELECT.ENDIF. ENDSELECT.
Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.sap-img.com
?
好程序呀,找了好久的,建議有需求和沒需求的都收藏一下。
總結(jié)
以上是生活随笔為你收集整理的查看MD04结果的程序 Production Planning - Extract data from MRP Table的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 电力、电气、电工知识汇总
- 下一篇: 谷歌代码规范的中文版