Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

BAPI_ALM_ORDER_MAINTAIN for USER status change in IW32 transaction?

$
0
0

Hi Experts,

 

I have the status -->W_MA (Waiting material)  for the order # 123. I want to change as ' W_LA (Waiting Labour)'. I tried the following code, it is not updated in the transaction. 

 

 

  lw_header-orderid = lv_aufnr.

lw_header-order_type = 'ZPM1'.

lw_header-planplant = 'INJA'.

APPEND lw_header to li_header.

 

 

CLEAR w_METHODS.

W_METHODS-REFNUMBER   1.

w_METHODS-OBJECTTYPE  'USERSTATUS'.

w_METHODS-METHOD      'CHANGE'.

w_METHODS-OBJECTKEY   lv_aufnr.

APPEND w_METHODS to t_methods.

 

CLEAR w_USERSTATUS.

w_USERSTATUS-USER_ST_TEXT 'W_LA'.

w_USERSTATUS-LANGU        SY-LANGU.

w_USERSTATUS-INACTIVE     ''.                                             "Not set to X

w_USERSTATUS-CHANGE_EVENT '01'.

APPEND w_userstatus to T_USERSTATUS.

 

 

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

   TABLES

    IT_METHODS                        = T_METHODS

    IT_HEADER                         = li_header

    IT_USERSTATUS                     T_USERSTATUS

    RETURN                            = T_RETURN

    ET_NUMBERS                        = T_NUMBERS

 

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

     WAIT          = 'X'

* IMPORTING

*   RETURN        =



Many thanks in Advance

           .


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>