BAPI: TRANSACTION_BEGIN的作用
Posted Rainystuday
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的作用的主要内容,如果未能解决你的问题,请参考以下文章
BAPI_MATERIAL_GET_ALL 是 BAPI,还是只是 RFC?
[BAPI]采购申请PR审批-BAPI_REQUISITION_RELEASE_GEN