Application Development 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: 

BAPI_ALM_ORDER_MAINTAIN multiple user status

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

custodio_deoliveira
Active Contributor
0 Kudos

Hi Sumanth,

As far as I know you have to call the FM multiple times.

Cheers,

Custodio

3 REPLIES 3

custodio_deoliveira
Active Contributor
0 Kudos

Hi Sumanth,

As far as I know you have to call the FM multiple times.

Cheers,

Custodio

0 Kudos

looks like so, But BAPI documentation doesn't say any thing about this...!!

taufique00005
Member
0 Kudos

Hi folks,
You can change reference number of lt_methods as 1,2,3.......up to as many as number of lines available in status table.