‎2009 Sep 08 2:07 PM
Hello experts,
To determine the ATP quantity Iu2019m using the function module BAPI_MATERIAL_AVAILABILITY. I need to get the ATP quantity on storage-location-level; for this the following parameters are set:
- PLANT
- MATERIAL
- UNIT
- CHECK_RULE
- STGE_LOC
The result in table WMDVEX is for different storages locations the same, but in transaction CO09 I have different quantities for the storage locations.
How can I determine the ATP quantity on storage-location-level?
Thank you for your hint.
Regards,
Kurt.
‎2009 Sep 08 7:39 PM
I'm not aware of any differences between the BAPI and CO09 and I've been using the function for quite some time in transactions to pre-determine ATP quantities. Are you using checking rule 'A' for both? Example:
CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
EXPORTING
plant = gs_docitems-werks
material = gs_docitems-matnr
unit = gs_docitems-vrkme
check_rule = 'A'
stge_loc = gs_docitems-lgort
IMPORTING
return = ls_return
TABLES
wmdvsx = lt_wmdvsx
wmdvex = lt_wmdvex.
READ TABLE lt_wmdvex INTO ls_wmdvex INDEX 1.
gs_docitems-atpqty = ls_wmdvex-com_qty.
‎2009 Sep 09 8:56 AM
Hallo Brad Bohn,
thank you for your suggestion.
Iu2019m using an own rule (as copy of rule A), the own rule donu2019t use purchase orders.
In CO09 I have the following ATP Quanties:
09.09.2009 BStand 1,775 0 259
09.09.2009 LgBest 0001 785 0 459
09.09.2009 LgBest 0002 989 0 452
09.09.2009 LgBest 0003 22 0 20The function module provides only 259 for each storage location.
There is another function module AVAILABILITY_CHECK. Can this function module also be used to determine ATP quantity?
Thank you & best regards,
Kurt.
‎2009 Sep 09 2:15 PM
Unfortunately, I can't really tell you what's wrong without looking at your configuration or the differences in the calls. If you trace both the BAPI and CO09 with Runtime Analysis, you'llsee that they both call function AVAILABILITY_CHECK. I would start by checking if rule 'A' produces different results, then by checking for any differences in the two calls or the handling of the results from the calls.