This website is not affiliated with, sponsored by, or approved by SAP AG.

BAPI for changing Work order user status in IW32

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

BAPI for changing Work order user status in IW32

Postby JTrivedi » Mon May 12, 2014 6:14 am

Hello Experts,

I am getting Same Problem in updating status via BAPI, BAPI_ALM_ORDER_MAINTAIN. Its not giving any error but even not update status.
I know i can use this for changing the user status also but not sure how to carry out things.

I used this code.
Code: Select all
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
Last edited by Gothmog on Mon May 12, 2014 6:50 am, edited 1 time in total.
Reason: code tags
JTrivedi
 
Posts: 1
Joined: Mon May 12, 2014 4:55 am

Re: BAPI for changing Work order user status in IW32

Postby Grogan » Mon May 12, 2014 4:24 pm

Try appending the SAVE method after the userstatus / change method.

Also try setting refnumber and objectkey in the save method record (just based on a bit of old code we have lying around).
Grogan

Award cash if useful.
Grogan
 
Posts: 365
Joined: Thu Aug 04, 2005 7:16 pm
Location: Australia

Re: BAPI for changing Work order user status in IW32

Postby knowledgeWorx » Tue May 13, 2014 2:34 am

Just out of interest - why are you using the BAPI instead of STATUS_CHANGE_EXTERN from function group BSVA? I think that one gives you better control.
SAP Enthusiast, PM/PS/CS Consultant, Hobby Blogger.
http://www.dev-workbench.com
knowledgeWorx
 
Posts: 17
Joined: Mon May 05, 2014 9:36 am
Location: Germany


Return to ABAP

Who is online

Users browsing this forum: Google Adsense [Bot] and 12 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.