cancel
Showing results for 
Search instead for 
Did you mean: 

Material availability check error on BAPI_ALM_ORDER_MAINTAIN

0 Kudos

Hello,

I repost the following question from vascodmendes

I am on a project that requires the release of a PM order

I am using the BAPI_ALM_ORDER_MAINTAIN to perform this task with success, as follows:

Copy Code

  1. ls_bapi_method-objecttype ='HEADER'.
  2. ls_bapi_method-method ='RELEASE'.
  3. ls_bapi_method-objectkey =ls_bapi_header-orderid.
  4. APPEND ls_bapi_method TO lt_bapi_method.

There is however an error when I try to release a PM order that has components with no stock availability.

It issues the following error:

  • C2 009 - Release rejected

If I try to release the order via IW32, it issues an warning, but I am able to bypass it, as you can see in the following picture:

If i click on "Release Order" it will be released without further problems.

The application needs to allow to also release the the order even if it has components without stock With the BAPI.


How can I replicate via BAPI this button "Release Order".

Thank you,

Tony Ankri

Accepted Solutions (1)

Accepted Solutions (1)

paul_meehan
Advisor
Advisor

Hi,

You should be able to allow release via the BAPI by following the instructions in note 1455018. This involves adding some code to your calling program. Include this code before call to BAPI_ALM_ORDER_MAINTAIN.

You only need to apply the standard corrections if valid for your patch level.

Let us know if this works for you.

-Paul

0 Kudos

Thank a lot Paul.

it's work well now !!!

The correction was to applied in the specific program, the calling program of the BAPI !

Answers (2)

Answers (2)

0 Kudos

Nic, Thanks for your answer.

I Already check this note. Already implemented in the version system

Thanks

NTeunckens
Active Contributor
0 Kudos
  • The BAPI has a Method "ATP_CHECK", that you could add to Do some kind of Validation before the Update ...
  • If permitted, Check the Customizing for ATP-Check (Trx. "OIOI") as there are Settings that control the Dialog / GUI-Behaviour if I recall ...
  • Does the Order have Permits assigned? See SAP-KBA 2062023 : link
  • Or ... contact SAP ONE Support
NTeunckens
Active Contributor
0 Kudos

Have you checked SAP ONE Support for SAP-KBA's?

Please do so first, as I can see some KBA's such as :

  • SAP-KBA 2045038 "BAPI_ALM_ORDER_MAINTAIN: Release rejected" : link
  • SAP-KBA 2160165 "ATPCHECK does not update system status MACM in BAPI_ALM_ORDER_MAINTAIN" : link
  • ...