Skip to Content
0
Mar 05, 2009 at 01:16 PM

BAPI_ALM_ORDER_MAINTAIN error "BAPI call must have a SAVE or DIALOG method"

2267 Views

I have this test code below that I have written to update the work duration on a work order to 5 hours using the BAPI BAPI_ALM_ORDER_MAINTAIN. I however keep getting the error "BAPI call must have a SAVE or DIALOG method". Can someone tell me what I am doing wrong

data: begin of it_methods occurs 0.

include structure bapi_alm_order_method.

data: end of it_methods.

data: begin of it_operation occurs 0.

include structure bapi_alm_order_operation.

data: end of it_operation.

data: begin of it_operation_up occurs 0.

include structure bapi_alm_order_operation_up.

data: end of it_operation_up.

data: begin of it_return occurs 0.

include structure bapiret2.

data: end of it_return.

data: begin of it_et_numbers occurs 0.

include structure bapi_alm_numbers.

data: end of it_et_numbers.

it_methods-refnumber = '0000040000020010'.

it_methods-objecttype = 'OPERATION'.

it_methods-method = 'CHANGE'.

it_methods-objectkey = '0000040000020010'.

append it_methods.

it_operation-duration_normal = '5'.

append it_operation.

it_operation_up-duration_normal = 'X'.

append it_operation_up.

call function 'BAPI_ALM_ORDER_MAINTAIN'

tables

it_methods = it_methods

it_operation = it_operation

it_operation_up = it_operation_up

return = it_return

et_numbers = it_et_numbers.

call function 'BAPI_TRANSACTION_COMMIT'

IMPORTING

RETURN = it_return.

Edited by: Martin Kay on Mar 5, 2009 2:17 PM