Application Development and Automation 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: 
Read only

how to archive idocs?

Former Member
29,084

Hi all,

I need the detailed procedure for archiving idocs. Suitable answers would be rewarded.

1 ACCEPTED SOLUTION
Read only

Former Member
13,866

Procedure for Archiving an IDoc:

• Search the IDoc’s (not only with the control or address information, but also with the data it contains) using transaction WE09.

• After searching the IDoc’s, we need to check the status of the IDoc’s we need to archive. Certain IDoc statuses are classified as archivable in the standard system, while others are not. The current status of an IDoc must be archivable before the IDoc can be archived.

We can archive IDoc’s with status which facilitates archiving. For example, an idoc which was not processed yet cannot be archived. And the idoc with the status code 53 (posted successfully) can be archived. So in order to archive an idoc we need to check the status of that idoc.

There are two ways to archive an idoc

1. Through standard report programs or

2. Through the central archiving transaction SARA.

Through standard report programs:

The following are the programs used for archiving IDoc’s

RSEXARCA – program for archiving.

RSEXARCD – program for deleting archived IDoc’s from the database.

RSEXARCR – program to read the IDoc’s from archive file.

RSEXARCL – Program to Retrieve IDoc’s from the archive into the database.

To archive idoc using report program RSEXARCA:

This program helps to archive the data .After archiving successfully, we need to delete the data in the database.

This report program has the following important select options for selecting IDoc’s to archive.

1. Time at which the control record was last changed

2. Time of IDoc creation

3. Current status

4. Logical message

5. Direction

6. IDoc number

7. Partner

The system displays the status after writing the archive file. After archiving use the program RSEXARCR to read the data of the archived file (After reading the archived file a log is generated with the fields of control record) and then use program RSEXARCD to delete the IDoc’s from the database.

To reload the archived IDoc’s into database:

To reload the archived IDoc’s into the system use program RSEXARCL.This program checks the client, preventing data to be loaded in the wrong client. It also checks whether the idoc number that is being reloaded already exists in the database.

The IDoc’s reloaded into the database have status 35(for inbound) and 71 (for outbound IDoc’s) i.e. status as ‘reloaded’. So when we start archiving again these IDoc’s are not archived. To archive these IDoc’s again we need to change the status of these IDoc’s.

Using the transaction SARA:

1. Enter the archiving object name (An archiving object name deals with related business data that is read from the database by a write program and deleted by the associated delete program after the data has been successfully archived).

2. To customize the object, click on the ‘customizing’ button and enter the appropriate data.

3. Click on ‘write’ to find the ‘archive administration screen’. Enter the variant name. The variant determines the parameters with which the archiving program is to be started.

To create a variant: Enter a name for the variant, and choose Maintain. The program selection screen appears with available options and selection criteria. Enter the desired values and choose Variant -> Attributes. You go to the variant attribute maintenance. Enter the necessary data and save your entries.

3. Mention the spool parameters, the start time of archiving and execute.

Hi all,

I need the detailed procedure for archiving idocs. Suitable answers would be rewarded.

6 REPLIES 6
Read only

Former Member
0 Likes
13,866

Archiving IDocs

IDocs are archived in several tables in the database. To limit the size (and thus the access times) of these tables, that is to reduce the load on the database without losing any IDocs, they can also be stored in archives at the operating system level. These archives can then be moved to external storage media, for example optical disks (using ArchiveLink) or magnetic tapes.

Check these links for more details.

Archiving IDocs

http://help.sap.com/saphelp_nwmobile71/helpdata/en/dc/6b81ed43d711d1893e0000e8323c4f/content.htm

Archiving Processed IDocs

http://sap.ittoolbox.com/documents/popular-q-and-a/archiving-processed-idocs-2884

Archiving and Deleting IDocs

http://help.sap.com/saphelp_nw2004s/helpdata/en/dc/6b821443d711d1893e0000e8323c4f/content.htm

Read only

Former Member
13,867

Procedure for Archiving an IDoc:

• Search the IDoc’s (not only with the control or address information, but also with the data it contains) using transaction WE09.

• After searching the IDoc’s, we need to check the status of the IDoc’s we need to archive. Certain IDoc statuses are classified as archivable in the standard system, while others are not. The current status of an IDoc must be archivable before the IDoc can be archived.

We can archive IDoc’s with status which facilitates archiving. For example, an idoc which was not processed yet cannot be archived. And the idoc with the status code 53 (posted successfully) can be archived. So in order to archive an idoc we need to check the status of that idoc.

There are two ways to archive an idoc

1. Through standard report programs or

2. Through the central archiving transaction SARA.

Through standard report programs:

The following are the programs used for archiving IDoc’s

RSEXARCA – program for archiving.

RSEXARCD – program for deleting archived IDoc’s from the database.

RSEXARCR – program to read the IDoc’s from archive file.

RSEXARCL – Program to Retrieve IDoc’s from the archive into the database.

To archive idoc using report program RSEXARCA:

This program helps to archive the data .After archiving successfully, we need to delete the data in the database.

This report program has the following important select options for selecting IDoc’s to archive.

1. Time at which the control record was last changed

2. Time of IDoc creation

3. Current status

4. Logical message

5. Direction

6. IDoc number

7. Partner

The system displays the status after writing the archive file. After archiving use the program RSEXARCR to read the data of the archived file (After reading the archived file a log is generated with the fields of control record) and then use program RSEXARCD to delete the IDoc’s from the database.

To reload the archived IDoc’s into database:

To reload the archived IDoc’s into the system use program RSEXARCL.This program checks the client, preventing data to be loaded in the wrong client. It also checks whether the idoc number that is being reloaded already exists in the database.

The IDoc’s reloaded into the database have status 35(for inbound) and 71 (for outbound IDoc’s) i.e. status as ‘reloaded’. So when we start archiving again these IDoc’s are not archived. To archive these IDoc’s again we need to change the status of these IDoc’s.

Using the transaction SARA:

1. Enter the archiving object name (An archiving object name deals with related business data that is read from the database by a write program and deleted by the associated delete program after the data has been successfully archived).

2. To customize the object, click on the ‘customizing’ button and enter the appropriate data.

3. Click on ‘write’ to find the ‘archive administration screen’. Enter the variant name. The variant determines the parameters with which the archiving program is to be started.

To create a variant: Enter a name for the variant, and choose Maintain. The program selection screen appears with available options and selection criteria. Enter the desired values and choose Variant -> Attributes. You go to the variant attribute maintenance. Enter the necessary data and save your entries.

3. Mention the spool parameters, the start time of archiving and execute.

Read only

NemanjaSimovic
Active Participant
0 Likes
13,866

Although this is an old post...

I'm archiving with program RC1_IDOC_SET_STATUS (run with SE38). Just set to new status e.g. from 51 (Application document not posted) to 68 (Error - no further processing).

What I don't like is with this program you can't submit your comment.

Regards,

Nemanja