Skip to Content
Technical Articles
Author's profile photo Dominik Tylczynski

Mass delete production / process orders with COHV / COHVPI

I have been seeing several questions on how to delete production or process orders with mass processing transactions COHV and COHVPI. This article explains deletion flag and deletion indicator of production orders and shows how to maintain them with mass processing transactions.

Through the article I refer to production orders or to the COHV transaction. However the same approach can be used for process orders and the COHVPI transaction. Deletion flag and deletion indicator work exactly the same in both PP and PP-PI.

Deletion flag and deletion indicator

System status Internal code System status explanation
DLFL Deletion Flag I0076

Deletion flag is the first step of production orders archiving

The status is also reflected by the AUFK-LOEKZ field

Deletion flag should be set on regular basis for completed and settled orders

DLT Deletion indicator I0013

Deletion indicator is the second step of productions order archiving

Only production orders with DLT set can actually be archived

DLT is set in the preprocessing step of production orders archiving

Deletion flag should be set on regular basis for completed and settled orders even if production orders archiving is not executed. Deletion flag also set in the AUFK-LOEKZ field, so deleted orders can be selected very efficiently.

It speeds up tremendously orders selection in COOIS and in the month end tasks.

Deletion flag in COHV

By default the deletion flag mass processing function is not available in COHV:

COHV%20without%20mass%20delete%20functions

COHV without mass delete functions

Both deletion flag and deletion indicator can be set en masse with the PPARCHP1 and PRARCHP1 reports for production and process orders respectively:

Mass%20delete%20with%20PPARCHP1%20report

Mass delete with PPARCHP1 report

However the selection criteria of both reports are quite limited as compared to COHV or COHVPI. Also the report do not provide any interactive functions e.g. selecting orders from a results list. Therefore having mass deletion in COHV might get very handy.

SAP has actually already implemented mass processing functions both for deletion flag and deletion indicator. They are just not activated in COHV. The (de)activation procedure is described in the note 2877018 – How to deactivate Functions in T-code COHV.

All that needs to be done is adding 260 “Set Deletion Flag” and 270 “Set Deletion Indicator” in the COISL transaction:

Mass%20deletion%20activation%20for%20COHVPI

Mass deletion activation for COHVPI

After that both functions are ready to use:

COHVPI%20with%20mass%20deletion%20functions

COHVPI with mass deletion functions

Under the hood technicalities

Set Deletion Flag and Set Deletion Indicator mass processing functions are implemented by SAP in the COWORK260 and COWORK270 functions groups respectively:

COWORK260%20Deletion%20Flag%20function%20group

COWORK260 Deletion Flag mass processing implementation

That information may be useful if you encounter problems with those functions. Now, you know where to put break-points and debug.

How to revoke deletion statuses

Production order deletion flag DLFL status can be revoked in CO02 with the menu function: Functions → Restrict Processing → Deletion Flag Undo

Or in case of a process order, in COR2 with the menu function: Process Order → Functions → Deletion Flag → Delete

As per note 1893567 – How to cancel DLT status of production/processor orders deletion indicator DLT can not be revoked in standard.

However, the note 191216 – Resetting Status I0013 ‘Deleted’ delivers the ZZSTATUSDEL report to revoke DLT status.

Assigned Tags

      15 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Raheel Babar
      Raheel Babar

      Thank You Sir!

      Great Blog 🙂

      Author's profile photo Dominik Tylczynski
      Dominik Tylczynski
      Blog Post Author

      Thanks! That makes it worth writing blogs!

      Author's profile photo Rick Konings
      Rick Konings

      Thank you!

      Very good explanation of a function requested often.

      Author's profile photo Dominik Tylczynski
      Dominik Tylczynski
      Blog Post Author

      Thank you!

      Author's profile photo Marek Kamiński
      Marek Kamiński

      Thank you for sharing your knowledge;) very good and informative blog.

      I'm looking forward for the another ones 🙂

       

      Best Regards

      Marek

      Author's profile photo Dominik Tylczynski
      Dominik Tylczynski
      Blog Post Author

      Thank you! Appreciate it!

      Author's profile photo Vignesh Veerasamy
      Vignesh Veerasamy

      Great one Dominik Tylczynski

      Thanks for this.

      Regards

      Vignesh V

      Author's profile photo Dominik Tylczynski
      Dominik Tylczynski
      Blog Post Author

      Thank you!

      Author's profile photo Ritesh Dube
      Ritesh Dube

      Another good one Dominik Tylczynski

      Thanks for sharing it.

      Regards

      Ritesh

      Author's profile photo Yang Gu
      Yang Gu

      Very valuable blog. Bookmarked it. Thanks.

      Author's profile photo Dominik Tylczynski
      Dominik Tylczynski
      Blog Post Author

      Thank you for your positive feedback!

      Author's profile photo Hendy Hendy
      Hendy Hendy

      Hi Dominik, I have followed your instructions step by step, but the Deletion Flag option is still not showed up in the Order Header's list. Any idea to solve this issue? Thanks

      Author's profile photo Dominik Tylczynski
      Dominik Tylczynski
      Blog Post Author

      Hendy Lie Mass processing function in COISL are defined per order category (production/process/planned) and list type. Make sure that you have activated 260 and 270 function in COISL for the same list type that you use in COHV:

      Author's profile photo Hendy Hendy
      Hendy Hendy

      I have activated 260 & 270 as you suggested

      COISL

      but that options are still do not appear in the list

       

      Do I missed any config?

       

      Thanks

      Author's profile photo Dominik Tylczynski
      Dominik Tylczynski
      Blog Post Author

      Hello Hendy Lie

      I have just double checked and it works like a charm for me. I cannot tell you exactly what is wrong, but something definitely is and it is not necessarily related to deletion flag i.e. 260/270 functions. Notice that you have the function 135 activated in COISL and it does not show in COHV either.

      Make sure the check the notes:

      They both mention business function LOG_PP_MIS activation.

      Cheers

      Dominik Tylczynski