Refer to the Link Once to get the understanding of this concept of deletion from DSO .
http://help.sap.com/saphelp_nw04/helpdata/en/ca/5c7b3cbd556915e10000000a114084/content.htm
Then you can decide whether to do it based on ABAP program Placing in the process chain (kind of automation)
or Write code the end routine and clear the records .