Skip to Content
0
Mar 05, 2009 at 03:38 PM

BAPI_ALM_ORDER_MAINTAIN error with method

1027 Views

Hi,

I have a problem using this BAPI. I have looked how to use this BAPI in the forum but it doesnt work and i dont know why:

Here the code, maybe u can find something wrong. The goal is to modfy the user status changing the order user status to technical close:

wa_methods-method = c_save. "SAVE

APPEND wa_methods TO li_methods.

wa_methods-refnumber = c_1.

wa_methods-objecttype = c_userstatus. "USERSTATUS

wa_methods-method = c_change. " CHANGE

wa_methods-objectkey = p_order.

APPEND wa_methods TO li_methods.

  • Userstatus

wa_userstatus-user_st_text = c_cierreTEC. "CTEC

wa_userstatus-langu = SY-LANGU.

wa_userstatus-inactive = space.

wa_userstatus-change_event = '01'.

APPEND wa_userstatus TO li_userstatus.

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

TABLES

it_methods = li_methods

IT_USERSTATUS = li_userstatus

RETURN = li_return.

The error i am getting is msgid: IWO_BAPI2 msgno: 113 (Something like "error using the methods of the BAPI".

Do you have any idea?

Regards,

Manel