Skip to Content
0
Former Member
Jun 07, 2007 at 06:27 PM

BAPI_APO_AVAILABILITY_CHECK never returns successfully

254 Views

Hello,

I am trying to execute an availability check using BAPI_APO_AVAILABILITY_CHECK to perform an ATP check using our GATP rules. Per the documentation, I'm passing the following:

FIELD_CATALOG_IN: Relevant condition values, match what is passed when calling GATP from R/3 sales order creation

REQUREMENTS_IN:

REQUIREMENT_INDEX - 1

REQUIREMENT_GROUP_INDEX_IN - 1

POSITION_IN_GROUP - 1

PRODUCT - Valid product

LOCATION - Valid plant with inventory

LOCATION_TYPE - 1002

ITEM_NUMBER - 000010

ACTION_METHOD - A

CHECK_PROFILE - Valid check profile

SCHEDULING_INDICATOR - N

TRANSACTION_TYPE - H

RESULT_MODE - X

REQUREIMENT_ITEMS_IN:

REQUIREMENT_ITEM_INDEX - 1

REQUIREMENT_INDEX - 1

REQUIREMENT_TIMESTAMP - 200706071200

REQUIREMENT_QUANTITY - 5.000

SCHEDULE_LINE - 0001

Invariably, I get a GUID but also get the following 3 errors:

- Requirements subgroup with index 1 already exists

- Internal error: Item /000010

- Check instructions /A does not exist for location/product [PROD]/[PLANT]

I get the same error messages regardless of the product/plant combination, and have debugged the R/3 call from sales order creation and am passing the same variables as far as I can tell.

The last error I find odd since it does find a check mode per the ATP log. I am not an ABAP guy so I am struggling here and would appreciate any guidance. Documentation seems very sparce on this RFC especially when using it in conjunction with GATP.

Thanks!

Pat