Programme SAP BUPA_PREPARE_DA - Business Partner: Set Deletion/Archiving Flag

Purpose
This program allows you to transfer business partners to archiving ordeletion. A prerequisite is that these business partners are no longeractively used in business processes.

Warning
Note that the physical deletion of business partners in the productivesystem can be critical due to legal regulations. Before you execute thereport you should therefore check whether the business partner in yourindustry can actually be deleted or whether it should be deleted and archived due to a legal storage obligation.

Integration
Plan one of the following steps once this program has run:

  • After flagging for archiving: Archiving run for archiving object
  • CA_BUPA, transaction SARA.
    • After flagging for deletion: Deletion run using the report
    • BUPA_TEST_DELETE

      Prerequisites
      Before this program is used, an application-specific check/selectionlogic must be programmed and defined as the implementation of the BAdIBUPA_DA_PREPARE.
      When the flag Deletion/Archivability Check or the filter valueDEFAULT is used, it should be checked before the program is startedwhether all the necessary check modules in the Customizing are definedand also activated. (transaction BUS7, events ARCH1 or DELE1).

      Selection
      The business partner is determined as follows:
      If you fill the input field Business Partner, a selection isfirst carried out for all flagged business partners.
      After this, you can choose a freely-definable application function usingthe input field Filter. New application functions are added byimplementing the BAdI BUPA_DA_PREPARE. The value corresponds to thefilter value of a relevant BAdI implementation.
      If you have set the flag Deletion/Archivability Check, the nowreduced hit list is also transferred to a standard check function thatanticipates checks taking place in the context of archiving or deletion.In this way no records are flagged for archiving or deletion that wouldfail the subsequent checks.
      The standard check function is the same as the filter value DEFAULT.
      The transfer to the subsequent processes takes place

      • In the case of flagging for archiving, by setting the archiving flag
      • (radio button To Be Archived) for the reduced hit list ofbusiness partners in each case.
        At the same time you can also set the indicators System Status 'CanBe Archived' and System Status Can Be Deleted.
        The archiving flag is meant to prevent the business partner being usedin new application objects.
        The system status "Can Be Archived" ensures that a businesspartner can no longer be changed.
        • In the case of flagging for deletion, by setting the system status
        • "Deleted" (radio button To Be Deleted) for the reduced hit listof business partners in each case.
          The system status "Deleted" ensures that a business partner can nolonger be changed. In addition, it also serves as a characteristic forthe selection of the records to be deleted by the subsequent process.
          The above-mentioned flags (archiving flag, system status) can be set bymeans of the radio button Set Flag and, if this was a mistake, itcan be canceled by means of the radio button Reset Flag.
          The field Further Differentiation is not used by the program, butis instead transferred to the application-specific BAdIs. It makesfurther differentiation possible within the application logic.
          If the indicator Test Run, Check Only has been set, no changesare carried out on the database. The selected business partners can,however, be displayed in the application log.

          Standard_variants
          None. However, a DEFAULT implementation of the BAdI BUPA_DA_PREPARE issupplied.

          Output
          You can store the results of the report in the application log(transaction SLG1). Set the flag With Application Log for thispurpose.
          When the program is started in the dialog processing, the log isdisplayed immediately. In the case of background processing theapplication log can be saved and displayed later. Set the flag SaveApplication Log for this purpose.