Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

vendor data archive

Former Member
0 Kudos
713

Hi

Could someone please tell me how to archive customer data. We are creating about 2000 single customers per day so in a few months we may have a problem with data base.

What influence it will have on created SD documents?

I know I should look at AOBJ and SARA but where exactly?:)

Thx in advance

Piotrek

1 ACCEPTED SOLUTION

Former Member
0 Kudos
100

Hi ,

<b>Purpose</b>

In the IT process Archiving the actual archiving takes place. This process includes the scheduling and control of write and delete jobs, for example. All of the important functions necessary for data archiving are contained in Archive Administration (transaction <b>SARA</b>).

IT-Processes of the Scenario Variant

This process variant is composed of the following IT processes:

<b>Process</b>

<b>Monitoring</b>

In this IT process you monitor the behavior of the database and database tables in terms of data growth, performance and system behavior.

<b>Analyzing and Categorizing</b>

In this IT process you examine the fastest-growing tables and those involved in performance-demanding queries in depth, and group data according to different requirements.

<b>Customizing</b>

In this IT process you make customizing settings to archive the appropriate data, as identified under Monitoring and Analyzing and Categorizing.

<b>Archiving</b>

In this IT process you carry out the actual data archiving process. This includes the scheduling and control of write and delete jobs. All important data archiving functions are found in Archive Administration (transaction SARA).

<b>Post Processing</b>

In this IT process you carry out different tasks necessary after archiving, such as managing archiving jobs, building indexes for accessing archived data, cleaning up the database, and deleting archived data.

<b> Prerequisites</b>

You have determined which data in your system needs to be archived and you have identified the archiving objects that archive the data you want. You have also made the necessary Customizing settings.

<b>Process Flow</b>

1. Scheduling and Executing Write Jobs

Write jobs are scheduled with the Write function from within Archive Administration. Here you must enter different parameters and criteria to select the data that is to be archived. The write jobs can then be started immediately or can be scheduled to run at a later point in time.

During the write job the system selects, based on the selection criteria and parameters you entered, the data to be archived and writes it from the database to an archive.

2. <b> Scheduling and Executing a Delete Job</b>

Delete jobs are scheduled with the Delete function from within Archive Administration. During the archiving process data can only be deleted from the database after it has been successfully written to the archive during the write session. You can delete data immediately or schedule the deletion to run at a later point in time.

During the delete job the system checks, based on the selection criteria and parameters you entered, whether or not the data has been successfully written to the archive. If so, it then deletes the data from the database.

3. <b>Scheduling and Execution of the Storage Phase (this step only applies for ADK-based archiving and is optional)</b>

The storage of archived data can be scheduled from within Archive Administration. In Customizing you can determine whether storage is supposed to take place automatically and at which point in time. It is also possible to use the Archive Routing function to segregate the data into different content repositories during archiving. Moreover, you can store already archived data manually using the Storage System function in Archive Administration.

The Logs function, which is available in Archive Administration, provides a central point of access to the main logs generated during data archiving, such as job overview, spool list, and the application log. These logs provide you with information about the progress of the archiving sessions and how the objects being archived have been processed.

...

<b>Result</b>

You have removed the data you wanted from the database and written it to an archive in a secure manner. Depending on the requirements outlined in your archiving project, you have stored the data in an external storage system.

<b>reward pts for usefull answer :)</b>

Regards

Sathish

2 REPLIES 2

Former Member
0 Kudos
101

Hi ,

<b>Purpose</b>

In the IT process Archiving the actual archiving takes place. This process includes the scheduling and control of write and delete jobs, for example. All of the important functions necessary for data archiving are contained in Archive Administration (transaction <b>SARA</b>).

IT-Processes of the Scenario Variant

This process variant is composed of the following IT processes:

<b>Process</b>

<b>Monitoring</b>

In this IT process you monitor the behavior of the database and database tables in terms of data growth, performance and system behavior.

<b>Analyzing and Categorizing</b>

In this IT process you examine the fastest-growing tables and those involved in performance-demanding queries in depth, and group data according to different requirements.

<b>Customizing</b>

In this IT process you make customizing settings to archive the appropriate data, as identified under Monitoring and Analyzing and Categorizing.

<b>Archiving</b>

In this IT process you carry out the actual data archiving process. This includes the scheduling and control of write and delete jobs. All important data archiving functions are found in Archive Administration (transaction SARA).

<b>Post Processing</b>

In this IT process you carry out different tasks necessary after archiving, such as managing archiving jobs, building indexes for accessing archived data, cleaning up the database, and deleting archived data.

<b> Prerequisites</b>

You have determined which data in your system needs to be archived and you have identified the archiving objects that archive the data you want. You have also made the necessary Customizing settings.

<b>Process Flow</b>

1. Scheduling and Executing Write Jobs

Write jobs are scheduled with the Write function from within Archive Administration. Here you must enter different parameters and criteria to select the data that is to be archived. The write jobs can then be started immediately or can be scheduled to run at a later point in time.

During the write job the system selects, based on the selection criteria and parameters you entered, the data to be archived and writes it from the database to an archive.

2. <b> Scheduling and Executing a Delete Job</b>

Delete jobs are scheduled with the Delete function from within Archive Administration. During the archiving process data can only be deleted from the database after it has been successfully written to the archive during the write session. You can delete data immediately or schedule the deletion to run at a later point in time.

During the delete job the system checks, based on the selection criteria and parameters you entered, whether or not the data has been successfully written to the archive. If so, it then deletes the data from the database.

3. <b>Scheduling and Execution of the Storage Phase (this step only applies for ADK-based archiving and is optional)</b>

The storage of archived data can be scheduled from within Archive Administration. In Customizing you can determine whether storage is supposed to take place automatically and at which point in time. It is also possible to use the Archive Routing function to segregate the data into different content repositories during archiving. Moreover, you can store already archived data manually using the Storage System function in Archive Administration.

The Logs function, which is available in Archive Administration, provides a central point of access to the main logs generated during data archiving, such as job overview, spool list, and the application log. These logs provide you with information about the progress of the archiving sessions and how the objects being archived have been processed.

...

<b>Result</b>

You have removed the data you wanted from the database and written it to an archive in a secure manner. Depending on the requirements outlined in your archiving project, you have stored the data in an external storage system.

<b>reward pts for usefull answer :)</b>

Regards

Sathish

Former Member
0 Kudos
100

Hello,

For vendor master data, use archive object FI_ACCPAYB. Some documentation on this is:

Program SAPF058

Description

The SAPF058 program archives vendor master records and writes the archiveable master records to an archiving file.

You can limit the number of master records to be archived by selecting:

Vendor numbers

Company codes if FI data is to be considered

Purchasing organization if MM data is to be considered

System conditions (see criteria below).

Requirement

Program Modes

The program can be run in three different modes:

1. Only general data is archived (so-called 'A' segments)

2. Only application-specific data is archived (so-called 'B' segments)

3. General data and application-specific data is archived.

Archiveability Check

Mode 1: The selected 'A' segments must have a deletion flag. There must not be any accompanying 'B' segments remaining. For example, company code data for a vendor may not still exist if the general data is to be archived.

Mode 2: The selected application-specific data must fulfill the following application criteria:

FI: You can delete company code data if neither special general ledger figures nor transaction figures exist and neither open items nor cleared items exist. The deletion flag must also be set at company code level.

MM: You can delete purchasing orgnization data if the deletion flag has been set at this level.

Mode 3: The 'A' segments or 'B' segments selected must have a deletion flag. A record will be deleted in the 'A' segment and in the 'B' segment if the deletion flag is set in the 'A' segment. You may only delete 'B' segment records if the deletion flag is set in the 'B' segment (in this case, the 'A' segment is simply copied into the archive). The application-specific data must also fulfill the criteria from Mode 2.

The 'A' segments are archived after all accompanying 'B' segments have been archived and the vendor is not referenced elsewhere. If this is not the case, the 'A' segments will be copied into the archive.

For all modes: Vendors can basically not be archived if they are referenced by another vendor at general level or at company code level (for example, via fiscal address or alternative payee). This check can, however, be switched off (by means of the "FI link validation off" field) if you know that all vendors who refer back to this original vendor are also to be archived in either this run or in a subsequent one.

Requirement

Customizing for the Object

As for any archiving object, SAP supplies a default setting for the object in question FI_ACCPAYB. You can implement modifications, such as new archive file names, file paths, maximum size of the files, etc. using transaction "SARA".

Output

Detail log

If you have selected "Detail log" on the selection screen, several lists will be output displaying all non-archived master records sorted according to general data and application-specific data. The reason as to why each record could not be archived is also displayed.

A warning message is also possible for general data: in this case, the 'A' segment record will not be deleted from the database but will be copied into the new archive. This can lead to multiple versions of a vendor in the database and in the archive which you should bear in mind when reloading at a later date. A warning or an error with the general data can mainly be explained using application-specific details.

If a general section cannot be archived due to FI, this will be explained in the FI section of the log.

The entries which can be archived then follow.

Summarized log

An additional summarized log is also output. Its first section provides information regarding the number of files read and those which can be archived, followed by statistics on the various different applications. General data on the archiving run, such as user name and selection, are provided at the end of the list.

Miscellaneous

The archiving function (SAPF058) is separated from deletion (SAPF058D) as is the case with other archiving objects. SAPF058 automatically starts the deletion process if this was specified in technical Customizing. You can also start the deletion process separately, especially after a system termination.

(Note: If you start program SAPF058 using transaction SE38, the SAPF058D deletion program will not be started automatically because the system will recognize it as a test case).

If you are starting this archiving program for the first time and you would like to have the validation check carried out (required setting), then you must start program SAPF047 before archiving in order to generate the link information.

For customer master data, use archive object FI_ACCRECV. Documentation on this archive object is:

Program SAPF056

Description

The SAPF056 program archives customer master records and writes the archivable master records to an archiving file.

The number of master records to be archived depends on the following selections:

Customer numbers

Company codes (if FI data is to be taken into consideration)

Sales organization (if SD data is to be taken into consideration)

System conditions (see criteria below).

Note that company code data and sales area data cannot be archived in one program run. When you make your selections, you can only choose either company code or sales area data.

Note that only that master data is taken into account that is marked for deletion (see below).

Requirement

Program Modes

This program can be run in three different modes:

1. Only general master data is archived

2. Only application-specific data is archived

3. Both general data and application-specific data is archived.

Check on Whether Data can be Archived

Mode 1: The selected general data must have been marked for deletion. There must be no accompanying company code data. For example, company code data for a customer must not still exist if the general data is to be archived.

Furthermore, you cannot archive the general data if the customer is a business partner of another customer or one of his contact persons is also assigned to another customer as a contact person (table KNVP: Customer Master Partner Functions)

Mode 2: The selected application-specific data must fulfill the following application criteria:

FI: You can delete company code data provided the following do not exist:

Special G/L figures

Transaction figures

Open items

Cleared items.

The deletion flag must also be set at company code level.

SD: You can delete sales area data if the customer for the sales area is not active in a customer hierarchy (table KNVH) and the customer and his contact person are not active as a partner in sales documents (VBPA). The sales document check can also be switched off for performance reasons.

Mode 3: The general data or company-code specific segments selected must be flagged for deletion. Both the general data and the company code-specific data will be deleted if the deletion flag is set in the general data part of the record. You may only delete company code-specific data if the deletion flag is set in the company code data section of the master record (in which case the general data is simply copied into the archive). The application-specific data must also fulfill the criteria for mode 2.

The general data is archived after all accompanying company code-specific data has been archived and the customer is not referenced elsewhere. If this is not the case, the general data is copied into the archive.

Requirement

Customizing for the Object

As for any archiving object, SAP supplies a default setting for the object in question FI_ACCRECV. You can implement modifications, such as new archive file names, file paths, maximum size of the files, etc. using transaction "SARA".

Output

Detail log

If you have selected "Detail log" on the selection screen, several lists will be output displaying all non-archived master records sorted according to general data and application-specific data. The reason as to why each record could not be archived is also displayed.

A warning message is also possible for general data: In this case, the general data record will not deleted from the database but copied into the new archive. This can lead to multiple versions of a customer in the database and in the archive and must therefore be borne in mind during subsequent reloading. The application-specific entries can normally shed further light on errors within the general data.

The archiveable entries are then listed.

Summarized log

An additional summarized log is always output. Its first section provides information regarding the number of files read and those which can be archived, followed by statistics on the various different applications. General data on the archiving run, such as user name and selection, are provided at the end of the list.

Miscellaneous

The archiving function (SAPF056) is separated from deletion (SAPF056D) as is the case with other archiving objects. SAPF056 automatically starts the deletion process if this was specified in technical Customizing. You can also start the deletion process separately, especially after a system termination.

(Note: If you start program SAPF056 using transaction SE38, the SAPF056D deletion program will not be started automatically because the system will assume you are running a test case).

If you start this program for the first time and have carried out the link check (default setting), you need to start program SAPF047 prior to archiving in order to generate the link information.

Typically, archiving master data is difficult as all of the related transactional data needs to be archived first.

Hope this helps.

Regards,

Karin Tillotson