首页 > 代码库 > BAPI: TRANSACTION_BEGIN的作用
BAPI: TRANSACTION_BEGIN的作用
大概知道是启动一个新会话,
CALL FUNCTION ‘TRANSACTION_BEGIN‘
业务数据处理,
CALL FUNCTION ‘TRANSACTION_END‘
详细功能不清楚。
CLEAR G_TRANSACTION_ID. **1.Transaction control for BAPIs CALL FUNCTION ‘TRANSACTION_BEGIN‘ IMPORTING TRANSACTION_ID = G_TRANSACTION_ID. **2.BAPIs for Creating/Changing Matl Data CALL FUNCTION ‘BAPI_MATERIAL_SAVEDATA‘ EXPORTING HEADDATA = WA_HEADER PLANTDATA = WA_MARC PLANTDATAX = WA_MARCX VALUATIONDATA = WA_MBEW VALUATIONDATAX = WA_MBEWX TABLES RETURNMESSAGES = IT_RETURN. READ TABLE IT_RETURN WITH KEY TYPE = ‘E‘. IF SY-SUBRC EQ 0. *get reprocess data and error log MOVE-CORRESPONDING IT_UPLOAD TO IT_ELOG. MOVE IT_RETURN-MESSAGE TO IT_ELOG-REASON. APPEND IT_ELOG. ELSE. *get successful log MOVE-CORRESPONDING IT_UPLOAD TO IT_SLOG. APPEND IT_SLOG. CALL FUNCTION ‘TRANSACTION_STATUS‘ IMPORTING STATUS = G_STATUS_OF_TRANSACTION. IF G_STATUS_OF_TRANSACTION = ‘COMMIT_WORK‘. COMMIT WORK AND WAIT. ENDIF. CALL FUNCTION ‘TRANSACTION_END‘ EXPORTING TRANSACTION_ID = G_TRANSACTION_ID. ENDIF.
BAPI: TRANSACTION_BEGIN的作用
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。