DATA:LV_PROJ TYPE BAPIPR-PROJECT_DEFINITION,
LV_UD_SYS_STA TYPE BAPI_SYSTEM_STATUS-SYSTEM_STATUS,
LV_UD_USR_STA TYPE BAPI_USER_STATUS-USER_STATUS,
LV_SYS_STA TYPE BAPI_SYSTEM_STATUS-SYSTEM_STATUS,
LV_USR_STA TYPE BAPI_USER_STATUS-USER_STATUS,
LT_RESULT TYPE STANDARD TABLE OF BAPI_STATUS_RESULT,
LT_RETURN TYPE STANDARD TABLE OF BAPIRET2.
LV_PROJ = '00000561'.
LV_SYS_STA = 'REL'.
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
CALL FUNCTION 'BAPI_BUS2001_SET_STATUS'
EXPORTING
PROJECT_DEFINITION = LV_PROJ
UNDO_SYSTEM_STATUS = LV_UD_SYS_STA
UNDO_USER_STATUS = LV_UD_USR_STA
SET_SYSTEM_STATUS = LV_SYS_STA
SET_USER_STATUS = LV_USR_STA
TABLES
E_RESULT = LT_RESULT.
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
TABLES
ET_RETURN = LT_RETURN.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
网友评论