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

MRP List

Former Member
0 Likes
1,173

Hello

I need to get MRP data for materials and do some processing and output a list based on the different MRP elements and their quantities. Is there a FM which would give the entire dynamic list for me to process?

Thanks in Advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
957

Hello

You can try using FM 'MD_STOCK_REQUIREMENTS_LIST_API'. Pass material and plant as a parameter and it would return the MRP list in an internal table.

Regards

Shounak

Hello

I need to get MRP data for materials and do some processing and output a list based on the different MRP elements and their quantities. Is there a FM which would give the entire dynamic list for me to process?

Thanks in Advance

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
957

You can check out these tables.

MDKP

MDTB

Also, please check out function module READ_MRP_LIST.

Regards,

Rich HEilman

Read only

Former Member
0 Likes
958

Hello

You can try using FM 'MD_STOCK_REQUIREMENTS_LIST_API'. Pass material and plant as a parameter and it would return the MRP list in an internal table.

Regards

Shounak

Read only

0 Likes
957

As Shounak has suggested, you can also use the function module MD_STOCK_REQUIRMENTS_LIST_API. Here's how.




report zrich_0002.

parameters: p_matnr type mara-matnr,
            p_werks type marc-werks.

data: xmdkp type mdkp,
      imdps type table of mdps with header line,
      imdez type table of mdez with header line,
      imdsu type table of mdsu with header line.


call function 'MD_STOCK_REQUIREMENTS_LIST_API'
  exporting
*   PLSCN                          =
    matnr                          = p_matnr
    werks                          = p_werks
*   BERID                          =
*   ERGBZ                          =
*   AFIBZ                          =
*   INPER                          =
*   DISPLAY_LIST_MDPSX             =
*   DISPLAY_LIST_MDEZX             =
*   DISPLAY_LIST_MDSUX             =
 importing
*   E_MT61D                        =
   e_mdkp                         = xmdkp
 tables
   mdpsx                          = imdps
   mdezx                          = imdez
   mdsux                          = imdsu
 exceptions
   material_plant_not_found       = 1
   plant_not_found                = 2
   others                         = 3.


check sy-subrc  = 0.

REgards,

Rich Heilman