cancel
Showing results for 
Search instead for 
Did you mean: 

Purchase Order Deletion Without Full Archiving

Former Member
0 Kudos

Hi Fellow SCN'rs,

I'm new to posting on the forum but have used this resource for years.  There are a lot of great participants here!

My question...  I am working on a piece of development to identify & set deletion flags on production orders that have been completed and settled for X number of months (along with other selection criteria).  Some of the predecessors to this being successful is that all account assigned purchase orders, manual requisitions and inspection lots have been 'completed'. 

For the account assigned purchase orders, this means that the deletion flag must be set (to 'L') - along with all of the conditions that must exist to allow that.  For my situation, the PO must have been delivered complete, GR/IR quantities are in balance and the business is finished transacting upon the PO line item. I was able to successfully identify and set these to EKPO-LOEKZ = L using BAPI_PO_CHANGE - but this has some unwanted baggage.  (1) it requires re-versioning of the purchase order and (2) it re-triggers the approval hierarchy for the purchase order.  I do not want to re-trigger approval workflows for orders that are merely being deleted for this purpose.

So - I'm considering the use of archiving pre-processor program RM06EV70 to set these deletion flags.  Since it ultimately does direct updates, it will not trigger versioning or approval processes.

Note that my company has no archiving strategy in place (or any open projects to implement such things) - so using the full archiving process (with write & delete steps) is probably not feasible at this time.  The scope of that project far exceeds the boundaries of the time we have available for this now.

I know that RM06EV70 sets deletion flags at the EKKO level also - which is not really a requirement for my production order deletion process and may have some unwanted baggage of its own (such as not being easily reversed), but I have no control of that with this program.

Back to my question...  can anyone think of any harm done by using RM06EV70 to set deletion flags - without implementing the full archiving process for purchasing documents?

Thanks for your input!

Accepted Solutions (1)

Accepted Solutions (1)

JL23
Active Contributor
0 Kudos

In general is the use of the pre-processor  of MM_EKKO a pretty good idea, as it will not set a deletion indicator to still open items.

I am not aware of any other issue than confusion, assumed that you had already talked with purchasing about your plans (regardless of setting the deletion indicator by BAPI or with archiving methods).


It is unfortunately so that the user is not able to differentiate between a manual set real deletion indicator (cancelled item) and a deletion indicator coming from the archiving program. I can explain to check the change history, since a manual deletion creates change history while the archive program does not, but this confuses some users even more.

So it is very important to define the time when a PO is old and will usually not be opened again for any current ongoing business. If that time is not to close to today then the chance is small that a user even realizes that the items have deletion indicators. Nevertheless it should be communicated.

The L at header level appears only if all items got a deletion indicator, I usually keep the time between this event and the real archiving with the write job very small, since SAP will issue messages that the PO is archived while it is still in the system. As you do not plan any archiving, it may lead to some extra confusion. So you should clearly communicate that they must not change any of those POs.

Former Member
0 Kudos

Thank you Jurgen - this is about the same conclusion that I reached looking at what this program does and the effects of the header deletion flag.

Hopefully Purchasing won't even notice in 99.99% of cases, but I have notified our Super User community that this is coming...a necessary evil.

If anyone else has used other approaches, I'd be interested to hear.

Answers (0)