11-05-2008 5:41 AM
Hi,
I want to change the work order user status in IW32 using ABAP.
Is there any function module to do so or any other way? I have tried using BDC but this does not work.
Please suggest.
Regards,
Naba
Edited by: n. saha on Nov 5, 2008 6:46 AM
11-05-2008 5:48 AM
Hi,
Check the Function module :
BAPI_ALM_ORDER_MAINTAIN
Thanks & Regards,
Navneeth K.
11-05-2008 5:55 AM
Navneeth,
i have used this BAPI for TECO using method TECHNICALCOMPLETE. I know i can use this for changing the user status also but not sure how to carry out things.
i think i have to use:
REFNUMBER = 1.
OBJECTTYPE = USERSTATUS.
METHOD = Change.
OBJECTKEY = order number.
but how to pass the user status which i want to set?
Regards,
Naba
11-05-2008 6:01 AM
Yuo have to update fields in the table parameter:
IT_USERSTATUS . Mention the status text and the status (inactive field).
11-05-2008 6:27 AM
i have tried doing this but unfortunately it is not working. i think i am doing something wrong .
can you help?
Edited by: n. saha on Nov 5, 2008 7:37 AM
11-05-2008 6:44 AM
I have used this:
DATA:fi_methods LIKE bapi_alm_order_method OCCURS 0 WITH HEADER LINE.
DATA:fi_header LIKE bapi_alm_order_headers_i OCCURS 0 WITH HEADER LINE.
DATA:fi_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA:fi_userstatus LIKE bapi_alm_order_usrstat OCCURS 0 WITH HEADER
LINE.
fi_methods-method = 'SAVE'.
APPEND fi_methods.
fi_methods-refnumber = 1.
fi_methods-objecttype = 'USERSTATUS'.
fi_methods-method = 'CHANGE'.
fi_methods-objectkey = '000500001940'.
APPEND fi_methods.
fi_userstatus-user_st_text = 'ZVIP'.
fi_userstatus-inactive = ' '.
APPEND fi_userstatus.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = fi_methods
it_userstatus = fi_userstatus
return = fi_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
11-05-2008 6:50 AM
Check the value of "fi_methods-objectkey " is it correct.
Also
try to replace
fi_userstatus-inactive = ' '.
with
clear fi_userstatus-inactive.
11-05-2008 7:11 AM
"fi_methods-objectkey " is correct. i have used the same objectkey for TECO and it worked.
also tried : clear fi_userstatus-inactive but doesnot work either.
11-05-2008 7:15 AM
Ok i will try to check it in my system and will get back to you.
11-05-2008 5:54 AM
[http://www.sapfans.com/forums/viewtopic.php?f=13&t=182938]
11-25-2008 12:29 AM
Naba,
you should fill out P_IT_USERSTATUS-LANGU. I've done the following, with Standard BAPI, and it worked out.
Regards,
Evandro Neves
BP PLM Consultant.
05-12-2014 11:03 AM
I am getting Same Problem.
fi_methods-method = 'SAVE'.
APPEND fi_methods.
fi_methods-refnumber = 1.
fi_methods-objecttype = 'USERSTATUS'.
fi_methods-method = 'CHANGE'.
fi_methods-objectkey = '002000002453'.
APPEND fi_methods.
fi_userstatus-user_st_text = 'COMM'.
fi_userstatus-user_langu = 'EN'.
fi_userstatus-CHANGE_EVENT = ' 01 '.
APPEND fi_userstatus.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = fi_methods
it_userstatus = fi_userstatus
return = fi_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Above code I am using and there the message comes like
T ID NUM MESSAGE
S IW 080 Order saved with number 2000002453
S IWO_BAPI2 110 BAPI control was ended
can any on know what is wrong in this? please help if having knowledge.
Thank You,
Jahnavee Trivedi
06-04-2014 10:47 AM
01-15-2015 8:04 AM
Hi Jahnavee,
Could you please explain how did you solved that issue, I am also facing same problem.
Thanks