Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_ALM_ORDER_MAINTAIN

Former Member
0 Likes
1,260

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,

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,

5 REPLIES 5
Read only

Former Member
0 Likes
1,098

What is the message id and number for the error?

Rob

Read only

0 Likes
1,098

Message id: IWO_BAPI2

Message Number: 104

Thanks,

Read only

Former Member
0 Likes
1,098

Well, according to the documentation for the BAPI:

"User status change not possible."

Rob

Read only

0 Likes
1,098

Well, it does possible. I did call the FM in following way, it did update the user status.

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,

Read only

0 Likes
1,098

OK - there are a number of OSS notes relating to this BAPI and the user status. Maybe you should start with 1454532.

Rob