Professional Documents
Culture Documents
Page 1 of 16
Data Archiving is a process in which system delete the unwanted data for the
production system to some other system, you can think that we have back up option
than why data archiving, Now the answer is there are differences between data
archiving and data backup, During the backup we just delete the data and copy it
on some other device or system, following things misses during backup,
1. We do not have any option for validation, means suppose we are deleting
some data from PO Item table but during back up it will not check in PO
header table on that case there will be entry in EKKO table but no entry
in EKPO table. System will not be consistent.
2. After back we do not have any link with the back up data, if we want to
read some of the data we do not have any option to read data based on
Key field say PO Number.
3. After deleting for some reason if back up fails we do not have option to
restore it.
All the above mention points and some other points also removed in Data Archiving
process. Now Data Archiving process is a safe and reliable way to keep your system
fast with recent data and up to date with old data stored in third system.
Now the question is why we need data archiving. In every org. with increasing
number of transaction the size of database increases which leads the system to
perform very slow, and expanses of unnecessary memory ( if we want to increase the
performance). We just can not delete the old data because various times we need
those data, some time in Reporting purpose and some time during Auditing purpose.
Data archiving insure us that after archiving system will not be inconsistent. The
concept is same which is concept of SAP Business Objects ( Transaction Code :
SWO1). Every Business Objects consist of various Attributes , Key Fields, Interface
and Methods. The concept of business objects is same which is the concept of OPPS
Programming. Lets take an exa. of Business Object PO (BUS2012), The key field
would be PO Number, Attribute will be Vendor, PO Org etc, The method would be
Creation of PO, Deletion of PO etc. With the help of method we can change the
attribute of object means we can change the PO, we can delete the PO etc.
Now go on a little bit details, If we think about attributes than where these
attributes are stored, they are stored in various transparent tables in SAP with some
relations. We can not store all the attributes of an object in a single table , concept
of Normalization in Data Base. So we have various tables where we are storing the
data and making the validation based on Check Table, Value Table Etc. So for PO
we have various tables say EKKO for PO Header, EKPO for PO Item, EKBE,
MARA, MARC, EBAN……..and there is some link among all these tables so the
valid records in all the tables can create a business object ( Close to BAPI).
Now We just can not delete the records of only EKKO because some relation still
exist in EKPO, EKBE Etc Tables. So if we want to delete a record we need to delete
all the related entries from all the dependent tables, and this is the concept of Data
Archiving in SAP. In data archiving data can not be deleted from the system unless
it is successfully copied into third system.
SWO1 Screen
On the left of your screen we have various option which is provided for the object,
lets take an example of object MM_EKKO. Just double click and you will get the
following screen.
The WRITE program is the name of the program which will be used for writing
data in to Archive file. Remember this program will change from object to object.
Same for delete and reload programs.
Now once you have got the details of the object next step is to configure the system
for archiving process. Lets go a little bit in details. Transaction code is SARA.
If you do not put any name in object you will get the following screen.
As soon as you put the object name there you will get the changed screen. The other
attribute it will collect from AOBJ transaction. For Example if we delete the name
of the deleting program from AOBJ than Delete option will be removed from here
also and if you put some new program name there it will appear here also.
Before going ahead lets check the what are the dependent tables for the object. Click
on DATABASE TABLES. Your screen will be
If you see at the bottom than you will see the name of the tables from which data
will be deleted after archiving.
Now if we want to check what are the tables and these tables are involved in which
click on radio button Object For Tables and put the table name say VBAK, On the
bottom window you will get the number of object in which this table is used. select
it and press Show Tables Button you will get the name of the tables involve in this
object.
Now it will ask for the variant name and Archive Process Start date and Time.
Now in WRITE option SAP will call the same program which is mention in the
transaction AOBJ against object name and Variant will be the selection screen
parameter. We have the option here which data we will archive. Lets take an exa. of
PO Number 4501008654, Remember one thing we can not Archive those object for
which some relation exist in system , only those records for which deletion flag is set
we can delete. We can set the variant after executing the program, here for writing
the program name is RM06EW47, execute it and set the variant.
Set the date and time. Radio button will be green now. Maintain same for delete and
read option.
Now before writing data to third system we need to create the path for third system.
the transaction code for the same is FILE.
Now the Physical file which will be created on the system for that naming
convention would be
<PARAM_1>_<PARAM_2>_<SYSID>_<CLIENT>.<DATE>.<TIME>
Now we have got the file location we can configure rest of the Archive process.
You can set the file name from BASIS Customization option if not already did using
FILE Transaction. There are some other settings which is object dependent , you
can set it from Application Specific Customization.
Now if you click on the management it will show you the details of the Archived last
happen. Here its showing for to-days date.
Once data writing is successful just check it and than call the activate the deletion
program.
It will ask for which archiving we need to delete data from system.