This blog will explain how to archive purchase orders and purchase documents via object MM_EKKO. Generic technical setup must have been executed already, and is explained in this blog.
Go to transaction SARA and select object MM_EKKO.
Main tables that are archived:
- EKKO: purchase document header
- EKPO: purchase document item
Technical programs and OSS notes
Pre-processing program: RM06EV70
Write program: RM06EW70
Delete program: RM06ED70
Read program: RM06ER30
Relevant OSS notes:
- 456129 – FAQ: Archiving in purchasing
- 3024489 – MM_EKKO: MM Tables not archived during the archiving process
- 3051297 – Improve performance of report RM06EV70 with PS selection option
- 3064505 – MM_EKKO: Report RM06EV70 Data Selection for Document Date does not work when using PS option
- 3196849 – MM_EKKO: Archiving Material Ledger tables
- 3286658 – The pre-processing archiving step (program rm06ev70 or rm06ev47) of purchase orders (MM_EKKO) is not checking residence time if PO item is deleted
- 3266567 – Error MMPUR_ARCHIVE076 in MM_EKKO Archiving
- 3286677 – Error MMPUR_ARCHIVE 085 – Criteria of additional checks from T161Z not satisfied
- 3298092 – MM_EKKO, MM_EBAN: Adopt Project selection in enhancement PS_EKKO_PRECHECK_ENHN using PS option
- 3303018 – Runtime error ‘DBSQL_STMNT_TOO_LARGE’ encountered during execution of Archiving of Purchase Orders: Write Program
Application specific customizing
In the application specific customizing for MM_EKKO you can maintain the document retention time settings:
You have to set the residence time per purchase order type:
In transaction SARA, MM_EKKO select preprocessing:
There are quite some reasons why a purchase order cannot be archived.
Executing the write run and delete run
In transaction SARA, MM_EKKO select the write run:
Select your data, save the variant and start the archiving write run.
Give the archive session a good name that describes the purchasing group and year. This is needed for data retrieval later on.
After the write run is done, check the logs. MM_EKKO archiving has average speed, and medium percentage of archiving (50 to 90%).
Deletion run is standard by selecting the archive file and starting the deletion run.
For MM_EKKO start the read via SARA:
Then select the archive file(s).
Result is in a simple list.