*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* A sample program to extract data from the MRP table.
*
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
REPORT ZMRPTABLE.
TABLES: MDKP, "Header Data for MRP Document
MDTB, "MRP table
MDTC, "Aggregated MRP table items
T457T. "Description of MRP elements
DATA: 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 MATNR
AND 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 MDTB
WHERE DTNUM EQ MDKP-DTNUM
ORDER 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.
Wednesday, January 21, 2009
SAP Production Planning - Extract data from MRP Table
Labels:
SAP ABAP Reports
Subscribe to:
Post Comments (Atom)
Archives
-
▼
2009
(359)
-
▼
January
(39)
- Define the default components reservation movement...
- SAP PP Goods Receipt - 101 for Process Order
- SAP Goods receipt and goods issue through a PI sheet
- SAP PP Goods Movement Steps for Subcontracting
- SAP PP Goods Movement Stock in Transit - liquidati...
- SAP Restricting Good Receipt Unless Production Ord...
- SAP PP BOM How to link BOM component to storage lo...
- When is a Material BOM Not Exploded?
- SAP Simple BOM & Group BOM
- SAP Explode PP BOM
- Where used list for SAP PP BOM
- Controlling data for your Bill of Materials
- SAP Allocating PP BOM to Other Plant
- SAP PP BOM Mass Change Bill of Materials
- SAP PP BOM Multi-level configuration with variants
- BOM What exactly is a Phantom item or Assembly means?
- SAP Attachment Of Drawings in PP BOMs
- MM Variant Configuration for an Order BOM
- SAP Checking Costs and Revenues from the Sales Order
- SAP Production Planning - Extract data from MRP Table
- ABAP Reports Production Order Quantity Change Dail...
- ABAP Reports Compare Production Confirmation again...
- ABAP Reports Customized Work Center List PP
- SAP Tcodes used for SAP Plant Maintenance
- TCode for SAP ArchiveLink Link check
- SAP Transparent Table Relate With PM Module
- Effective PM Implementation
- Deadline Monitoring for Maintenance Plans
- Scheduling function in PM
- SAP Definition and Formula for PM terms
- Plant Maintenance Assembly SAP
- Track New Plant Machine Installed at Customer Site
- PM Questions Answers on Functional Locations
- Questions Answers on PM Equipment
- Measuring Points Questions in PM
- Plant Maintenance Q & A - Rept & Analyses - Mgt of...
- SAP Maintenance Planning Questions and Answers
- PM Support Problem Solution
- Maintenance of FT Data in Purchasing Documents in MM
-
▼
January
(39)
No comments:
Post a Comment