分隔线上面是 SAP 标准文档中提供的说明 分隔线下面是我的翻译 ---------------------- 当在一个 LUW(Logic Unit of Work)中发生错误时,可以撤销从它开始以后做的任何数据库修改,就是说,从上次数据库提交之后。在 R/3 系统中,数据库回滚自动触发,或者通过 ABAP 关键字 ROLLBACK WORK,或者通过数据库系统的相关 Native SQL 命令。
你是不是DEBUG INSERT部分的代码了阿?如果DEBUG,那么大部分时候是回滚不了的。只能回滚 距离ROLLBACK WORK 最近的SQL理论上可以的,你试过了吗?不行的话大概要重置系统变量哦,亲
ROLLBACK WORK **&------------------------
SAP Managed Tags: ABAP Development Hi SDN, In mode test (without commit work): Is it necessary to perform BAPI_TRANSACTION_ROLLBACK, after calling the BAPI? In this case BAPI_ASSET_RETIREMENT_POST in what circumstances? Even without commit, the number range FI_DOCUMNT was used. Best regar...
SAP Managed Tags ABAP Development To commit changes made by BAPIs like BAPI_PO_CREATE1 it is necessary to call BAPI_TRANSACTION_COMMIT. Question is: Is it also necessary to call BAPI_TRANSACTION_ROLLBACK in case of an error? e.g. BAPI_PO_CREATE1 does not succeed and returns an error...
SAP Managed Tags: ABAP Development Hi I've tried this simple code: <ZTABLE> = ... INSERT <ZTABLE>. ROLLBACK WORK. It works fine, if I try to see the new record by SE16, I can't see it You should check what's in fm to get the number, perhaps they do a COMMIT Max Reply...
Cleanest way to be able to rollback is to do all DB updates in update function modules because they will only be triggered by COMMIT WORK, not by a mere DB commit. https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abendb_commit.htm Thanks Thorsten! didn't find the hints...
SAP Managed Tags: ABAP Development To commit changes made by BAPIs like BAPI_PO_CREATE1 it is necessary to call BAPI_TRANSACTION_COMMIT. Question is: Is it also necessary to call BAPI_TRANSACTION_ROLLBACK in case of an error? e.g. BAPI_PO_CREATE1 does not succeed and returns an err...
SAP Managed Tags ABAP Development Hi guys, I have two questons please: 1. Do I need to do commit/rollback after I insert/update record in internal table? does this depends on loop...endloop 2. Do I need to do commit/rollback after I insert/update record from abap into remote oracle...
The most common reasons for error ORA-1555 (snapshot too old) are: A long running query due to a poorly qualified data access A high processing time between fetches of the same query Incorrect rollback segment setup A long run query can cause some activities in the ABAP program...