PM Order change status to TECO

旧时模样 提交于 2019-12-24 22:14:07

问题


Hello I want to change the status of a PM order to TECO. For that I am using the BAPI BAPI_ALM_ORDER_MAINTAIN.

This is my code, but it doesn't work. What am I doing wrong?

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

来源:https://stackoverflow.com/questions/49358873/pm-order-change-status-to-teco

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!