REPORT z_barry_test NO STANDARD PAGE HEADING .
DATA: it_wbs LIKE bapi_bus2054_chg OCCURS 0 WITH HEADER LINE ,
it_update LIKE bapi_bus2054_upd OCCURS 0 WITH HEADER LINE ,
it_ret2 LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
CLEAR:it_wbs[],it_update[].
it_wbs-wbs_element = 'T-MES02-001-01'.
it_wbs-wbs_mrp_element = '2'.
APPEND it_wbs.
it_wbs-wbs_element = 'T-MES02-001-02'.
APPEND it_wbs.
it_update-wbs_element = 'T-MES02-001-01'.
it_update-wbs_mrp_element = 'X'.
APPEND it_update.
it_update-wbs_element = 'T-MES02-001-02'.
APPEND it_update.
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
CALL FUNCTION 'BAPI_BUS2054_CHANGE_MULTI'
EXPORTING
i_project_definition = 'T-MES02'
TABLES
it_wbs_element = it_wbs
it_update_wbs_element = it_update
et_return = it_ret2.
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
TABLES
et_return = it_ret2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
阅读(6299) | 评论(0) | 转发(0) |