Introduction to Archiving:
The concept of Archiving comes into picture when the customer needs to delete the Business Partner data which is no longer relevant for the Business Scenario and hence would like to eliminate Business Partner data from the Database. There are basically 2 steps to be performed in order to eliminate the Business Partner data from the Database:
Archiving: Archiving of Business Partners is a process where the complete Business Partner data is been written into a file and later the data is removed from the Database. Archiving is officially released from ABA 5.0 systems. For system 4.6C BDT archiving is officially released and not BP Archiving.
In Broad there are basically 2 steps during archiving:
Important reports for BP-archiving
2640553 - How to archive BP (without customer/vendor role) by SARA
2491026 - Guided Answer - How to delete BP (with vendor/customer role) completely in S/4HANA
3110023 - How to archive a person BP after the synchronization employee to BP in S/4 HANA
1. TA: BUPA_PRE_DA, Report: BUPA_PREPARE_DA
This transaction is used to prepare the Business Partner for Archiving/Deletion. It sets the XDELE flag to ‘X’ in table BUT000. The settings for the report should be as below:-
To archive the same you need to check the ‘Set Flag’ and execute the report which shall flag the Business Partner for archiving as below:
Thus, after the above success message is seen then the Business Partner would be ready for archiving by setting the archiving flag XDELE to ‘X’.
The above transaction BUPA_PRE_DA executes the report BUPA_PREPARE_DA which carries out the above functionality of marking the BP for Archiving. This report can be used for a range of Business Partner which can be marked for archiving.
Note: In order to archive the Business Partners in CRM systems you need to execute the report CRM_BUPA_ARCHIVING_FLAGS which shall set the required status for the BP. The setting needs to be as below:
Once this is executed the required status would be set in the CRM_JEST table and for the XDELE flag.
2. TA SARA (schedule job), Report: BUSOBARCH
This is a batch process which is used to archive and delete the Business Partner. This is used to archive and delete a large number of Business Partners and is preferable to be scheduled when not many processes are running. The way to schedule the same is as shown below:
This is the initial screen of the transaction SARA. Enter the Object Name CA_BUPA -> Enter in order to archive the Business Partner. Initially you perform the ‘Write’ job which writes the data of the Business Partner into the archive file. When this Write job is executed the report BUSOBARCH is executed.
Steps:
Click on the write button which shall enable us to create a variant as shown below:
Click on the Maintain tab in order to maintain the variant. The below pop-up appears select the option ‘For all Selection Screens’ and select the button continue.
After pressing the continue button the screen for specifying the Business Partners which you would like to archive is displayed. You can execute the same in the test run or in the detail log (which archives the BP).
Save the above variant with the description for the field ‘Short Text for Archive’. Once the variant is saved you shall be taken to the initial screen where the variant is maintained.
Here select the tab ‘Start Date’ where the timing is specified for the Batch job.
Here you could specify the details and save the same, for testing you could select the option Immediate and ‘Save’ the settings.
Once this is done in the variant maintenance screen, select the option/tab ‘Spool Params’.
A pop-up as shown below is displayed.
In the pop-up for the field ‘Output Device’ enter the value ‘locl/lp01’ and press Enter.
Now select the same which shall navigate back to the variant maintenance screen. Later execute the same which shall display a message below ‘New Archiving Job was scheduled’.
Once executed the write Job would be performed and you can view the same by navigating to the Management section as below:
Click on the Management Icon which shall display the status of the Jobs.
This screen ‘Overview of Archiving Sessions’ would have 4 main categories.
· Complete Archiving Sessions: This section would contain the archiving jobs which are completely done (i.e. after both the write and the delete job is been executed).
Thus after the ‘Write’ job is performed through Transaction SARA the archive file would be under the section ‘Incomplete Archiving Sessions’.
Note: TA SARA cannot be used for debugging as it is a batch job. In order to the write job you could execute the report BUSOBARCH and set the variable tnobatch = ‘X’ during debugging. Once this variable is set you can debug the same.
TA: SARA, Report BUSOBARCH_DELETE
Now since the Business Partner details have been written to the Database we proceed to the deletion of the same by executing the ‘Delete’ functionality in TA SARA. The process is carried out as below:
From the initial screen (tr SARA) you select the tab ‘Delete’ Icon which shall enable the delete functionality of archiving through transaction SARA. When this Delete functionality is executed the report BUSOBARCH_DELETE is executed. When this is executed, below are the activities performed in broad sense:
- Delete data from database, after data is archived (ARCH4 Function modules).
- Delete data archived by archiving classes via Function module: ARCHIVE_DELETE_OBJECT_DATA. (Defined by archiving handle).
In the above screen select the Icon Archive Selection which enables us to select the Archive file previously created through the Write Job. As shown above the Archive file with number 000092 (ZTEST) created during the write job is displayed. Select the same and click on the select mark. Once this is done the previous screen is displayed where Start Date and the Spool Parameters needs to be specified as previously done during the write job.
After the above settings are made, execute the same to complete the deletion of the Business Partner. Once executed you can find the entry in under the Management section ‘Complete Archiving Sessions’ as shown below:
Once the archive session/file is under the ‘Complete Archiving Sessions’, it implies that the Archiving/Deletion of the Business Partner has been completed successfully.
Important Tables:
TBZ1F
- Contains BDT customizing, FNAME ZTPKT
- Customizing via TA BUS7.
TBZ1
- Allocation of Field catalogue to archiving object
- Primary key is application object (-> BUPA for business partner).
CRM_JEST (CRM)
- Status of BPs (archivable / deletable)
- No status set for BP, no entry in this table.
- Status no.:
o I1100 archivable (CRM)
o I1101 archived (CRM)
o I1102:deleteable (CRM)
o I0810: archivable
o I0811: archived
o I0812: deletable
Important Notes on Archiving:
In order to find notes on Archiving use the key word BP_ARCHIVING.
Important Facts:
· Transaction AS_AFB can be used to see the contents of the archived file created after deleting the partner. All the tables and the data are shown in one view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |