PM订单更改状态为TECO

时间:2018-03-19 08:49:46

标签: sap abap bapi

您好我想将PM订单的状态更改为TECO。 为此,我使用的是BAPI BAPI_ALM_ORDER_MAINTAIN

这是我的代码,但它不起作用。我做错了什么?

DATA: lt_alm_order_method TYPE TABLE OF bapi_alm_order_method,
      ls_alm_order_method TYPE bapi_alm_order_method.

ls_alm_order_method-refnumber = '00001'.
ls_alm_order_method-objecttype = 'HEADER'.
ls_alm_order_method-method = 'TECHNICALCOMPLETE'.
ls_alm_order_method-objectkey = '000000900085'.
APPEND ls_alm_order_method TO lt_alm_order_method.

CLEAR : ls_alm_order_method .
ls_alm_order_method-refnumber ='00001'.
ls_alm_order_method-objecttype = space.
ls_alm_order_method-method = 'SAVE'.
ls_alm_order_method-objectkey = '000000900085'.
APPEND ls_alm_order_method TO lt_alm_order_method.


CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
* EXPORTING
 *   IV_MMSRV_EXTERNAL_MAINTENACE       =
TABLES
   it_methods = lt_alm_order_method.



CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
*   WAIT          =
* IMPORTING
*   RETURN        =
.

0 个答案:

没有答案