为了方便audit, 我们可能会希望把某个的增删改操作全都记录下来。这样子的话,我们一看,就知道谁在什么时候进行过什么操作。万一有不良操作,我们能够很快地方锁定责任人。这里我来做一个sample:
1. 创建表
除了key以外的字段,如果需要对它的修改进行跟踪的话,我们需要将相应的date element中的"change Document"勾选。
2.设置 table maintenance generator
表创建好后,点击se11->utilities->Table maintenance generator,
3.找到要添加代码的event (se11->utilities->Table maintenance generator->modification->event)
event有很多,作用也各不同.
对每个event的详细用法,以及每个表预定好的参数,请查询help.sap.com(key words 'Table maintenance')
对于参数的使用,这里强调一下。Unicode 系统和non-unicode系统使用的参数是不一样的
对于event 01来说
变量 total在两种系统来中,都是存放了最新的数据
(1)在non-unicode系统中,total的结构应该是:
DATA: BEGIN OF TOTAL,
INCLUDE STRUCTURE viewname,