‎2007 Apr 11 11:39 PM
Hi! I was trying to use BAPI_MATERIAL_AVAILABILITY to get the stock of my material, but I do not sure how to use it.
I'm setting
PLANT=POS1
MATERIAL=..
UNIT=...
WMDVSX-REQ_DATE = today
WMDVSX-REQ_QTY = 99999999
this returns me
AV_QTY_PLT with the correct value in stock for all warhouses of that plant
WMDVEX-EQ_QTY= 99999...
WMDVEX-COM_QTY = 222724 // not a clue what this number represents...
but if I call it with
PLANT=POS1
MATERIAL=...
UNIT=...
STGE_LOC=MOS1
WMDVSX-REQ_DATE = today
WMDVSX-REQ_QTY = 99999999
this returns me
AV_QTY_PLT with the same value for all warehouses, not just for MOS1
WMDVEX-EQ_QTY= 99999...
WMDVEX-COM_QTY = 993 // not a clue what this number represents neither...
I want to know how much material I had for sale today in just one Plant+Location...
thanks a lot
‎2007 Apr 12 12:23 AM
Hi, we use it as follows:
call function 'BAPI_MATERIAL_AVAILABILITY'
exporting
plant = det_entrega-werks "Plant
material = p_matnr "Material number
unit = det_entrega-meins "Unit of measure to verify
stge_loc = det_entrega-lgort "Storage
tables
wmdvsx = tabla1
wmdvex = tabla_disp. "Result Available
if sy-subrc eq 0.
read table tabla_disp index 1.
if sy-subrc eq 0.
the avilable quantity it's on tabla_disp-com_qty
‎2007 Apr 12 8:25 PM
and in "tabla1" what are you filling in to send it to the bapi?