Skip to Content
0
Former Member
Sep 22, 2014 at 06:14 PM

BAPI_ALM_ORDER_MAINTAIN multiple user status

574 Views

i am using the bapi its not updating multiple user status at one go, its always updating the first status only . Is there any restriction on the user status or am i doing something wrong?

Searched all the forums and looks like nothing found

ls_method-refnumber = 1.

ls_method-objecttype = 'USERSTATUS'(088).

ls_method-method = 'CHANGE'(089).

ls_method-objectkey(12) = ps_input-aufnr.

APPEND ls_method TO lt_methods.

CLEAR ls_method.

ls_method-refnumber = 1.

ls_method-method = 'SAVE'(092).

ls_method-objectkey(12) = ps_input-aufnr.

APPEND ls_method TO lt_methods.

ls_status-user_st_text = 'canc'(036).

ls_status-langu = sy-langu.

ls_status-inactive = ' '.

ls_status-change_event = '01'.

APPEND ls_status TO lt_status.

ls_status-user_st_text = 'DERF'(035).

ls_status-langu = sy-langu.

ls_status-inactive = space.

ls_status-change_event = '01'.

APPEND ls_status TO lt_status.

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

TABLES

it_methods = lt_methods

it_userstatus = lt_status

return = lt_return.