You are on page 1of 16

Data Archiving using PO Number

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.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 2 of 16

Concept of Data Archiving

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.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 3 of 16

SWO1 Screen

Procedure of Data Archiving


1. We have two options , Either we have SAP Standard object / Custom
Objects. For both the objects we have transaction code AOBJ.

Object is get the SAP Object which we need to Archive.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 4 of 16

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.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 5 of 16

Now we have following entries in the 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.

The next screen would be

Before going ahead lets check the what are the dependent tables for the object. Click
on DATABASE TABLES. Your screen will be

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 6 of 16

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.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 7 of 16

Lets go ahead with the data archiving.


Now we need to configure the system. Now click on the WRITE option. you will get
the following screen.

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.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 8 of 16

Here I have define PO number 4501008654 which I want to Archive.


save the variant. Now we can select the variant

Another option to maintain variant is click on Maintain button after Variant.


Now we have to schedule the Archive process when we have to write the data. Click
on button Start Date you will get the following screen.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 9 of 16

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.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 10 of 16

Lets create a File Path.

1. Create a logical file path

Just see the screen

Logical file name is /HTG/CA-CENTRALADDRESSMANAGEMENT .

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>

Data Format will be BIN.

and logical path would be /HTG/GC

Now Logical file will be stored at the following location

So finally at the following location

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 11 of 16

/usr/sap/trans/goldclient/<FILENAME> our archive file will created and name of


the file will be based on the naming convention which we have given.

so 1. Create Logical File Name.


2. Assign Logical file name to Logical path.
3. Assign logical path to physical path.

Now we have got the file location we can configure rest of the Archive process.

Again go to SARA, click on Customizing.

Double click on Technical Setting.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 12 of 16

Set the above things.

Again double click on Technical Setting ( Below One )

Put the logical file name, Max. size, Variant Etc.

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.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 13 of 16

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.

Double click if everything ok you will get the green signal.

Lets do an Archive of PO 4501008654.

First delete this PO using ME22n.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 14 of 16

After Archiving you will get the following details screen.

Once data writing is successful just check it and than call the activate the deletion
program.

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 15 of 16

It will ask for which archiving we need to delete data from system.

After successful deletion you will get the following screen.

now again check this PO in system. you wont get it………………..Its


Archived………………………………………………

By Ravi Anand : Fujitsu Consulting


Data Archiving using PO Number
Page 16 of 16

By Ravi Anand : Fujitsu Consulting

You might also like