Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Replacment for MDTB Table

Former Member
0 Likes
3,457

Dear All,

I have a peculiar problem in ECC6.0 , MRP tabel MDTB is not getting populated and i am picking the data from the MDTB & MDKP.

Is ther any other tabel where in i can use in place of MDTB

wiht rgds

Ranjith Singh

Dear All,

I have a peculiar problem in ECC6.0 , MRP tabel MDTB is not getting populated and i am picking the data from the MDTB & MDKP.

Is ther any other tabel where in i can use in place of MDTB

wiht rgds

Ranjith Singh

2 REPLIES 2
Read only

Former Member
0 Likes
1,741

Check the below code for the exact table to be looked into.



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.

Also i saw in another forum saying that

"There is a note 440016,From Release 4.5A, the storage mode of the MRP

lists was changed from transparent form to compressed form. This data

can now be found in MDTC and no longer in table MDTB."

I am not sure of this. Anyways you can check that too.

Hope this helps. Reward points if helpful.

Thanks

Balaji

Read only

Former Member
0 Likes
1,741

Hi Balaji,

sorry for the delay in reply. Thanx i was able to solve the issue.

with rgds

Ranjith Singh