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

finding stock availability for a material

bala_krishna007
Participant
0 Likes
879

Hi,

I am finding stock for a material, I know that there are some standard reports available for this but from my custom report I want to check this.

I know that there are tables mentioned below to find the different types of stock for a material.

MARD MSSQ MSSL MSSA MKOL MSKU

Want to know if there is any FM or BAPI where we can check the stock for a material. or can I join all the tables mentioned based on material no?

thanks,

1 REPLY 1
Read only

former_member596005
Participant
0 Likes
752

HI Balakrishna t Krishna,

MD_STOCK_REQUIREMENTS_LIST_API function module may help you for the available stock of a material.

data : lwa_mdkp type mdkp.
CALL FUNCTION 'MD_STOCK_REQUIREMENTS_LIST_API'
  EXPORTING
    matnr                      =      "Material
    werks                      =      "Plant
 IMPORTING
  E_MDKP                       = lwa_mdkp.
 EXCEPTIONS
   MATERIAL_PLANT_NOT_FOUND       = 1
   PLANT_NOT_FOUND                = 2
   OTHERS                         = 3
          .
          
write : lwa_mdkp-sum01 . " it is the available stock for material