Check the function module BAPI_MATERIAL_AVAILABILITY
if it doesn't fit your needs, play with transaction BAPI or with SE37 looking for material or stock related functions.
Check the function module BAPI_MATERIAL_AVAILABILITY
if it doesn't fit your needs, play with transaction BAPI or with SE37 looking for material or stock related functions.