‎2019 Feb 21 10:24 AM
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 MSKUWant 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,
‎2019 Feb 22 11:19 AM
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