When Business Objects are deleted by Archiving their persistency is simply relocated from the systems database to an external storage and they are no longer part of any business chain.
This means that during this deletion no other objects should be created or updated. No integration calls shall take place, except the information that this instance has been archived.
This is done for the most of the SAP frameworks centrally, but what about the enhancements via the Partner Development Infrastructure (PDI)?
As referred in
this blog one can check against the element “
ArchivingStatusCode” but with
the current release it is much easier:
- Use the PDI Reuse Library Archiving with the function IsArchivingInProgress.
We propose to make use of this function in the
Root implementations of all
Business Objects supporting Archiving in one of the following ways:
- Skip your implementation in the AfterModify and BeforeSave scripts
- Delete the Custom Business Objects instances which are shadowing the SAP Business Objects in the OnDelete script
By this one can optimize the performance of this Archiving phase which we noticed takes the most time of the complete Archiving process.
Thanks to
stefan.kiefer for providing the examples.