This question is asked by ERCO. They need to develop a BAdI implementation where the document history relationship connecting the modified opportunity and its related appointment could be changed. In order to achieve this they need to figure out how to modify document history by ABAP code. See example below:
执行report之前:

执行report之后:
实现源代码: