Skip to Content
1
Former Member
Aug 22, 2012 at 07:09 PM

BAPI_ALM_ORDER_MAINTAIN release multiple

1093 Views

Hi everybody!

I am new here and i hope to learn new things 😊

I'm trying to release several orders (similar to IW38) using a function that uses the BAPI_ALM_ORDER_MAINTAIN

As it frees one at a time, I am in a loop of a table of orders to be released, and calls with each of the function, filling methods as follows:

* Prepare data to call the BAPI

lw_methods-ObjectType = space.

lw_methods-method = 'SAVE'.

Lw_methods APPEND TO lt_methods.

CLEAR lw_methods.

lw_methods-REFNUMBER = 1.

lw_methods-ObjectType = 'HEADER'.

lw_methods-method = 'RELEASE'.

lw_methods-OBJECTKEY = lv_aufnr.

Lw_methods APPEND TO lt_methods.

The problem is that if i try to release more than one, the first are released ok and the others release strip error (C2 009), as if I release one and release another. I have to exit and re-enter the program to release another order.

I appreciate suggestions!

already thank you!