Technical Articles
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 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 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 deletion activation for COHVPI
After that both functions are ready to use:
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 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.
Thank You Sir!
Great Blog 🙂
Thanks! That makes it worth writing blogs!
Thank you!
Very good explanation of a function requested often.
Thank you!
Thank you for sharing your knowledge;) very good and informative blog.
I'm looking forward for the another ones 🙂
Best Regards
Marek
Thank you! Appreciate it!
Great one Dominik Tylczynski
Thanks for this.
Regards
Vignesh V
Thank you!
Another good one Dominik Tylczynski
Thanks for sharing it.
Regards
Ritesh
Very valuable blog. Bookmarked it. Thanks.
Thank you for your positive feedback!
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
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:
I have activated 260 & 270 as you suggested
but that options are still do not appear in the list
Do I missed any config?
Thanks
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