使用bapi: BAPI_BUPA_CENTRAL_CHANGE
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IV_PARTNER) TYPE BU_PARTNER
*" TABLES
*" OT_RETURN STRUCTURE BAPIRET2
*"----------------------------------------------------------------------
DATA: centraldata TYPE bapibus1006_central ,
centraldata_x TYPE bapibus1006_central_x .
***********************************************
centraldata-centralarchivingflag = 'X' .
centraldata_x-centralarchivingflag = 'X' .
CALL FUNCTION 'BAPI_BUPA_CENTRAL_CHANGE'
EXPORTING
businesspartner = iv_partner
centraldata = centraldata
centraldata_x = centraldata_x
valid_date = sy-datlo
TABLES
return = ot_return.
LOOP AT ot_return WHERE type CA 'AEX'.
ENDLOOP.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
阅读(1684) | 评论(0) | 转发(0) |