Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_ALM_ORDER_MAINTAIN error with method

former_member582701
Contributor
0 Likes
2,023

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

5 REPLIES 5
Read only

Former Member
0 Likes
996

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

Read only

former_member582701
Contributor
0 Likes
996

It does not work

Any other idea? I have found other threads and it seems the correct way to fill method table.

Read only

former_member582701
Contributor
0 Likes
996

It does not work

Any other idea? I have found other threads and it seems the correct way to fill method table.

Read only

Former Member
0 Likes
996

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

Read only

0 Likes
996

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...