‎2009 Mar 05 3:38 PM
Hi,
I have a problem using this BAPI. I have looked how to use this BAPI in the forum but it doesnt work and i dont know why:
Here the code, maybe u can find something wrong. The goal is to modfy the user status changing the order user status to technical close:
wa_methods-method = c_save. "SAVE
APPEND wa_methods TO li_methods.
wa_methods-refnumber = c_1.
wa_methods-objecttype = c_userstatus. "USERSTATUS
wa_methods-method = c_change. " CHANGE
wa_methods-objectkey = p_order.
APPEND wa_methods TO li_methods.
Userstatus
wa_userstatus-user_st_text = c_cierreTEC. "CTEC
wa_userstatus-langu = SY-LANGU.
wa_userstatus-inactive = space.
wa_userstatus-change_event = '01'.
APPEND wa_userstatus TO li_userstatus.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = li_methods
IT_USERSTATUS = li_userstatus
RETURN = li_return.
The error i am getting is msgid: IWO_BAPI2 msgno: 113 (Something like "error using the methods of the BAPI".
Do you have any idea?
Regards,
Manel
‎2009 Mar 05 4:22 PM
Hi Manel,
I think you also have to add the refnumber with the SAVE method:
wa_methods-refnumber = c_1.
wa_methods-method = c_save. "SAVE
APPEND wa_methods TO li_methods.Kind regards,
Lieselot
‎2009 Mar 05 4:59 PM
It does not work
Any other idea? I have found other threads and it seems the correct way to fill method table.
‎2009 Mar 05 4:59 PM
It does not work
Any other idea? I have found other threads and it seems the correct way to fill method table.
‎2009 Mar 06 4:43 AM
hello ,
what is c_1 value and first dotn use the save method in the method table
use the chaneg method and then save method after callign the bapi
use bapi_transaction_method
hope it might solev ur prob
‎2009 Mar 06 8:39 AM
bapi_transaction_method? U want to say commit i think and it does not work.
You have to specify the save method before or after (i have tryed both) the change method.
It is strange, im doing the same as other people that i have seen in the forum...