cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_APO_AVAILABILITY_CHECK never returns successfully

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member372517
Discoverer
0 Kudos

I know this is an extremely old post, but it is unanswered and the answer is not to be found anywhere on SCN.  Also, there are very few posts regarding this BAPI and this post led me to attempt the call with invalid inputs.

The issue is with the inclusion of REQUIREMENT_GROUP_INDEX_IN - 1 when no groups are provided.  If you leave that field blank on the input, the call will complete successfully.

Former Member
0 Kudos

Hi Pat

I am facing this problem too and am getting the message that location nnot found for rule strategy. Were you able to get this BAPI to work? Can you suggest possible entries in the parameters which are necessary. I am currently entering all that is present in the documentation example.

Thanks & Regards

Rajiv

Former Member
0 Kudos

Pat,

Have you done the following steps.

(1) Created and activated the ATP Customizing Integration MODEL in R3. This is a one time activity.

(2) As soon as the above step is done, you will see that in APO:

SPRO>APO>GATP>General Settings> Maintain Check Instructions is filled with the following

Prod Alloc --- No Step

Prod Availability---First Step

Forecast---No Step

    • Currently I believe all the 3 must be blank.

For Testing purposes, maintain 0XX( The Check mode you see on the order) and A as " First Step-- Prod Availability" and see whether the BAPI is working **

    • Afterwards dont forget to activate the ATP Customizing model**

Let me know what you see and I can help you further

Regards

Kumar Ayyagari

Former Member
0 Kudos

> Pat,

>

> Have you done the following steps.

> (1) Created and activated the ATP Customizing

> Integration MODEL in R3. This is a one time

> activity.

>

> (2) As soon as the above step is done, you will see

> that in APO:

> SPRO>APO>GATP>General Settings> Maintain Check

> Instructions is filled with the following

>

> Prod Alloc --- No Step

> Prod Availability---First Step

> Forecast---No Step

>

> ** Currently I believe all the 3 must be blank.

> For Testing purposes, maintain 0XX( The Check mode

> you see on the order) and A as " First Step-- Prod

> Availability" and see whether the BAPI is working **

> ** Afterwards dont forget to activate the ATP

> Customizing model**

>

> Let me know what you see and I can help you further

>

> Regards

> Kumar Ayyagari

Hi Kumar,

Thanks for the reply. APO/GATP are both configured correctly, as the GATP check works fine when creating orders in R/3. The problem is I cannot get any results when attempting to call BAPI_APO_AVAILABILITY_CHECK using the same material and check mode, which I maintained in a requirements profile.

It seems there must be some "trick" to BAPI_APO_AVAILABILTY_CHECK but I am missing it!

Former Member
0 Kudos

Pat,

Just one more thing which I forgot to mention in my previous post:

Check If your Product-Location Master has a blank <b>Check Mode</b> value.

If the answer is YES, I would suggest you maintain a value of 041.

Then run the FM- Bapi_apo_availability_check and see what happens

All my suggestions are purely based on the error message shown after running the BAPI.

    • Please remember that doing an APO-GATP check from R3 system is a bit different from doing an APO-GATP check in APO system.**

Regards

Kumar Ayyagari

Former Member
0 Kudos

> Pat,

>

> Just one more thing which I forgot to mention in my

> previous post:

>

> Check If your Product-Location Master has a blank

> <b>Check Mode</b> value.

> If the answer is YES, I would suggest you maintain a

> value of 041.

>

> Then run the FM- Bapi_apo_availability_check and see

> what happens

>

> All my suggestions are purely based on the error

> message shown after running the BAPI.

>

> ** Please remember that doing an APO-GATP check from

> R3 system is a bit different from doing an APO-GATP

> check in APO system.**

>

> Regards

> Kumar Ayyagari

Hi Kumar,

Thanks again for your help. The check mode is all set, and I've tried 31, 41 and 50, which is why I'm so flummoxed. R/3 seems to call a more complex BAPI so one would think BAPI_APO_AVAILABILITY_CHECK would be easier, but I have been totally unsuccessful in getting it to return anything of value.