This manual describes procedure how to remove old documents (cut old data) in SH4 database

Important: Before making any of described operations, make backup of database.

First option

  1. Build report "Balance" for every stock for date which should stay in database.
  2. Copy those report to receiving report documents, and activate those documents.
  3. Make sure that those documents are first in period, which stays in database after cut.
  4. Open list o documents, in filter set no date, set all types of documents, and receiver/suppliers fields leave empty.
  5. Select all documents (till created as incoming ballance), press delete documents and wait.
  6. Delete dish expenditure documents.

Second option (if there are lots of documents)

  1. Build report "Balance" for every stock for date which should stay in database.
  2. Copy those report to receiving report documents, and activate those documents.
  3. Open list of dish expenditure documents, select them and delete all associated documents.
  4. After associated documents are deleted, select all expenditure documents and delete them.
  5. Open list of documents, in filter set no date, set all types of documents, and receiver/suppliers fields leave empty.
  6. Select all documents (till created as incoming balance), press delete documents and wait.

Third option (delete all documents in database)

  1. Build report "Balance" for every stock for date which should stay in database.
  2. Copy those report to receiving report documents, and activate those documents.
  3. Save created documents to XML files 
  4. Execute RESTORE of database with an option Dockills=1 in file SH_CRTDB.INI. It will restore database without any of documents 
  5. Open new database and create new receiving reports by importing from XML files.
  6. In SH_CRTDB.INI set parameter Dockills=0

Additional:

  • If database contains Return documents in the period which stays after cut, but those documents have links to receiving report which are in cut period, then Return documents should be changed to issue documents or completely deleted.
  • Third option will create database with lists and with starting balance, but without any other documents.