Update Module函数,主要用语对话或报表中实现同步和异步更新数据库操作,需要单独调用函数实现更新数据库表,但又要求对程序的运行不产生影响(更新成功与否不影响主程序的正常执行)
几个操作,要么全部执行,要么全部不执行
执行顺序如下
- IF_EX_MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE
- POST_DOCUMENT(产生会计凭证)
- IF_EX_MB_DOCUMENT_BADI~MB_DOCUMENT_UPDATE
Method would get triggered in Update debugging mode. After setting the update debugging it would work . update debugging is setting values at runtime ....and checking values.
Update task是用于对话或报表中实现同步和异步更新数据库的功能,在Update之前还有一个Before Update,用于更新数据前的检查,当二者都执行完,才会进行到后面的commit,当before update成功执行,而update不成功,会报错如下,显示数据回滚: Express document "Update was terminated" received from author "xxx"
SAP is detecting that and rolling back the body of work that was just committed to the database.
T-code:SM13 and ST22 to analyse it
调试Update Task方法
- 在MB_DOCUMENT_BEFORE_UPDATE打上内部断点;
- 在MB_DOCUMENT_ UPDATE打上外部断点
- 在MB_DOCUMENT_BEFORE_UPDATE调试界面
Settings-
Display/Change Debugger Settings-
Update Debugging
FM加入到update task的方式是:Call Function xxx in update task