Skip to Content
0
Former Member
Nov 29, 2011 at 06:08 PM

BAPI_ALM_ORDER_MAINTAIN

162 Views

Hi Experts,

I use FM BAPI_ALM_ORDER_MAINTAIN to update Work order. I have problem with USERSTATUS change. Everytime I got this message. "table USERSTATUS (method CHANGE) was not found " . Any idea? Following is code for user status.

lv_IFREFNUM = lv_IFREFNUM + 1.

ls_method-refnumber = lv_IFREFNUM.

ls_method-objecttype = 'USERSTATUS'.

ls_method-method = 'CHANGE'.

ls_method-objectkey = ls_header-orderid.

APPEND ls_method TO lt_method.

ls_userstatus-user_st_text = lv_cpl.

ls_userstatus-langu = sy-langu.

ls_userstatus-langu_iso = 'EN'.

ls_userstatus-inactive = ' '. " 'X' for inactive

ls_userstatus-change_event = '01'.

APPEND ls_userstatus TO lt_userstatus.

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

TABLES

it_methods = lt_method

it_header = lt_header

it_header_up = lt_header_up

it_userstatus = lt_userstatus

return = lt_return .

Thanks,