‎2007 Oct 04 12:45 PM
Hi,
I am trying to use this BAPI to update several components at a time, however it is only updating the first component.
Have anybody updated several components with a sinlge execution of this BAPI.
Thanks
Martin
‎2007 Oct 04 12:57 PM
‎2007 Oct 04 12:58 PM
HI,
Here is the sample code
data : methods type standard table of BAPI_ALM_ORDER_METHOD,
userstat type standard table of BAPI_ALM_ORDER_USRSTAT,
zreturn type standard table of BAPIRET2.
data : xmethod like BAPI_ALM_ORDER_METHOD,
xstatus like BAPI_ALM_ORDER_USRSTAT,
xaufnr like aufk-aufnr,
xreturn like bapiret2,
h_tabix like sy-tabix.
xstatus-user_st_text = 'docc'.
xstatus-langu = sy-langu.
xstatus-inactive = ' '.
xstatus-change_event = '01'.
append xstatus to userstat.
h_tabix = sy-tabix.
refresh: methods.
xaufnr = '000000000000'.
xaufnr+4(8) = orders_in-order.
clear: xmethod, xstatus..
xmethod-refnumber = 1.
xmethod-objecttype = 'USERSTATUS'.
xmethod-method = 'CHANGE'.
xmethod-objectkey(12) = xaufnr.
append xmethod to methods.
clear xmethod.
xmethod-refnumber = 1.
xmethod-method = 'SAVE'.
xmethod-objectkey(12) = xaufnr.
append xmethod to methods.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
IT_METHODS = methods
IT_USERSTATUS = userstat
RETURN = zreturn.
Regards
Sudheer
‎2007 Oct 04 1:00 PM
Did you read my question. I said updating components. You have posted code which doesn't do anything with the components table.
‎2007 Oct 05 2:09 PM
Hi Martin,
I am facing the similler problem which you had earlier.It is updating only the first component always.
May i know how did u fixed this problem.
Thanks
Lokesh
‎2007 Oct 08 11:55 AM