In a major retail site or store, data from point of sale (POS), the front-end system in the retail industry, is stored in multiple SAP tables and shares relevant data as a single POS database, known as an information structure (info structure). Because the database grows rapidly, it slows the SAP retail system and requires archiving of info structures. Learn how to improve SAP for Retail performance by archiving sales and transactional POS data and having it available for retrieval if necessary. This works for all info structures, including S920, S906, and S907.
Key Concept
Data archiving moves unwanted data from a place where space is required to a place from where it can be extracted in case it is needed in the future. SAP provides a way of archiving standard objects and tables through transaction code SARA, but there is no way of archiving info structures, which store data received from outside the SAP system. SAP provides archiving functionality for some standard objects, such as site, article, purchase order, deliveries, and bills of material. However, for many objects there is no standard transaction or program for data archiving, including archiving information structures. We explain the process of data archiving of info structure S920 as an example. Info structure S920 holds the critical data for every sales transaction. Therefore it grows very quickly and requires timely data archiving.
This example requires that you have an SAP for Retail system that receives point-of-sale (POS) data. This process requires some understanding of SAP materials management (MM).
Note
We focus on archiving standard and custom info structures. We do not describe generic archiving, but an archiving process specific to IS Retail in which data is received from POS and stored in the form of info structures.
Because there is no standard functionality, we explain the end-to-end process of archiving an info structure. This process archives all the data in the info structure and makes it search efficient.
The data archival process can be broken into five activities.
- Manage
- Write
- Store
- Delete
- Reload
Manage
Management consists of several steps and is done in preparation for all the other activities in the process. First, you verify if it’s the correct time to archive the info structure. Choose an information structure. Our example assumes that the use of transaction code MCG3 (sales analysis) is causing a performance issue and that you need to get rid of older or redundant data. Execute transaction code MCG3 to view all the info structures for all the retail sites in the organizational structure (Figure 1).

Figure 1
All the information structures for all the retail sites in the organizational structure
Double-click the S920 info structure. In the standard Analysis screen (Figure 2) enter some parameters such as site or POS controller and click the execute icon
. If the execution takes longer than usual, this means the performance has deteriorated because of a space crunch and we need to create some space by archiving old data. After completing this archiving exercise, you notice the performance improvement while executing it with the same parameters. We recommend that you always note the execution time after every archiving to benchmark the system performance for the same info structure.

Figure 2
The standard analysis screen for an info structure
Execute standard analysis for an info structure in the background by clicking the F9 key on your keyboard. The auto job is scheduled to run in the background with the runtime of total completion (i.e., the time needed to finish the background job). To view the logs, execute transaction code SM37. You see the logs in the screen that appears (Figure 3).

Figure 3
Job logs
To create an archiving object for an info structure, execute transaction code AOBJ. In the Cluster Maintenance screen (Figure 4) select MC_S920 and then click the details icon
.

Figure 4
The cluster maintenance initial screen
In the next screen (Figure 5) create an object by clicking the New Entries button. In this example MC_920 was already created. Any new object created appears in the Archiving Object list in Figure 4. In this step you define a write program, a delete program, and a reload program for an object. You use these programs in the data archiving of info structure 920. In case you want to use a custom program for write, delete, or reload, you can define it here (Figure 5). After you click the save icon in Figure 5, the system takes you back to the initial cluster maintenance screen (Figure 4). In this screen you see the newly created object in the Archiving object list.

Figure 5
The initial Cluster Maintenance info structure screen
Now you verify if the object is available for archiving. After you save the object, you use transaction code SARA to access it. Type in the object name and press Enter. The info structure name is automatically displayed as shown in Figure 6.

Figure 6
MC_S920 is enabled for data archiving actions
To maintain technical settings for customization for archiving, define the file path for the content repository. The content repository is the file server in which the info structure is archived. Execute transaction code SARA > Customization > Archiving Object-Specific Customizing: > Technical Settings (Figure 7).

Figure 7
Technical settings for the content repository
Click the execute icon beside Technical Settings under the heading Archiving Object-Specific Customizing as marked in Figure 7. In the screen that appears (Figure 8) you specify the object name that you need to archive, the variants of delete program RMCA9202, and the settings for the Content Repository.

Figure 8
Customizing view for archiving
In the Object Name field enter the name of the object to be archived (e.g., MC_S920). (The information for info structure S920 and DB table S920 is populated automatically.) In the Logical File Name field, enter a name for the file. We use the name ARCHIVE_DATA_FILE_WITH_ARCHIVE_LINK. Click the save icon.
We recommend using the following parameters in the variant screen (Figure 8), but you can change them to meet your business needs:
- Maximum size of the archiving file in the database: 100 MB. The smaller the file size, the quicker the file transfer and retrieval.
- Maximum number of data objects: Blank (it populates 0). If it is blank than no object check is carried out and file transfer is quicker. If we give some number here then it will check for those many objects within the table.
- Delete Jobs: Not Scheduled. This will allow users to create the delete job manually instead of automatically.
- Content Repository: Enter the name of your server in the window in which archived data will be stored (e.g., RS).
- RS Start Automatically: RS is a content repository and can be enabled by clicking the name and selecting the Start Automatically check box.
- Sequence: Store Before Deleting. Select the Delete Program Reads from Storage System box.
To check the status of any sessions, execute transaction code SARA. In the initial screen for archive administration (Figure 6), click the Management button. The next screen shows an overview of sessions for archiving and reloading (Figure 9).

Figure 9
A management view of archiving
Double-click any of the archive sessions shown in this screen (for example, 000612 -001MC_S920). The status of the archiving session is listed in the next screen (Figure 10).

Figure 10
Status of archive session
Write
The writing activity consists of organizing and arranging data to prepare for writing archive files. First, you maintain the write variant. To complete this step, execute transaction code SARA, and in the initial screen for archive administration (Figure 6), click the Write button. In the next screen (Figure 11) click the Maintain button.

Figure 11
Archive Administration: Create Archive File
In the next screen (Figure 12) enter the information about the data to be archived. The dates can be set depending on the retention period that the company decides for how long the data can be retained in the system. After you click the save icon, the system returns you to the Archive Administration: Create Archive Files screen (Figure 11).

Figure 12
Create a variant to write an archive file
In the Archive Administration: Create Archive Files screen (Figure 11) click the execute icon. The program is executed in the background. To verify the write sessions, the write job creates an archive file based on the variant that you executed. You can view the status of archiving sessions by following menu path SARA > Management. The status of jobs created by store session can be checked by executing transaction code SM37.
Store
In store mode, you create archiving files to the content repository. Execute transaction code SARA. In the screen that appears (Figure 6), click the StorageSyst. button. A pop-up screen appears as shown in Figure 13.

Figure 13
Archive Administration store/retrieve archive files
Click the Store files button in the pop-up screen. In the next screen (Figure 14) you can check all the files that are to be stored by clicking the Archive Selection button. In the Archive Administration pop-up screen select the header session box (the box in the first row) to select all the available files. Click the enter icon
.

Figure 14
Archive Administration store files
After the pop-up screen closes, click the execute icon in Figure 14 to create a job in the background. The status of the store session can be checked in management (Figure 9). The status of jobs created by the store session can be checked by executing transaction code SM37. Once the storage job is completed, the archived file is stored in the content repository RS that you defined earlier (Figure 8).
Delete
In delete mode, you delete data from the information structure. This activity erases all redundant data. You should be careful in choosing selection parameters so that you do not accidentally delete the wrong information.
We recommend a test run to ensure all the parameters are good. Deletion is very critical, and deleting the wrong data may require a lot of tedious data reload activity. To maintain deletion variants, execute transaction code SARA and follow menu path > Customization > Archiving Object-Specific Customizing: > Technical Settings. This path takes you back to the screen shown in Figure 8. Click the Variant button beside the TEST option (Figure 15).

Figure 15
Maintain the deletion variant
In the next screen (Figure 16) select the Test run indicator and then click the save icon. When the delete program is executed, the background job is created, but no deletion actually happens.

Figure 16
Maintain variant report with option test
For the actual run, uncheck the Test run indicator and save the variant by clicking the save icon (Figure 17). Now when the deletion functionality is executed, the jobs created actually remove the data.

Figure 17
Maintain the variant report with the option to delete when Test run is unchecked
To execute the deletion program to create deletion jobs, execute transaction code SARA and click the Delete button (refer back to Figure 6). In the next screen (Figure 18) click the Archive Selection button. In the pop-up screen select the files that you want to delete by checking the box beside the name of the session. For our example, we can select the 002704-001 check box.

Figure 18
Archive Administration: Execute Delete Program
For the actual run, uncheck the Test run indicator and save the variant by clicking the save icon (Figure 17). Now when the deletion functionality is executed, the jobs created actually remove the data.

Figure 17
Maintain the variant report with the option to delete when Test run is unchecked
To execute the deletion program to create deletion jobs, execute transaction code SARA and click the Delete button (refer back to Figure 6). In the next screen (Figure 18) click the Archive Selection button. In the pop-up screen select the files that you want to delete by checking the box beside the name of the session. For our example, we can select the 002704-001 check box.

Figure 18
Archive Administration: Execute Delete Program
Reload
Figure 19
Figure 19
Reload archive sessions
In the next screen specify the date range and the site details to retrieve the information structure data (Figure 20).

Figure 20
Maintain the reload variant
After you save the variant by clicking the save icon, the system returns you to the screen to reload archive sessions (Figure 19). To execute the reload program click the Archive Selection button. A file selection pop-up screen for Archive Administration: Select Files for Reload Program appears (Figure 21).

Figure 21
Reload archive sessions with Archive Selection
In the pop-up screen check all the files to be reloaded by clicking the check box below the Sessions and Files heading. In our example we selected file 0001548. When you click the enter icon
the pop-up screen closes. Click the execute icon in the main screen of Figure 21. This creates a background job that can be seen using transaction code SM37.
To check the status of reloading, go to transaction SARA > Management > Sessions Reloading to see sessions in progress (Figure 9). The status of the jobs created by the delete session can be checked by executing transaction code SM37.
Test Results
You can check the results of archiving statistical data from information structure S920 using transaction code SM37 and by opening the spool created. In transaction code SM37, enter your user ID from which the job was created. The background jobs appear (Figure 22).

Figure 22
Background job created
To open a spool, click the job spool icon beside the job listed in the third row of Figure 22. The opened spool appears in the next screen (Figure 23).

Figure 23
Spool display of an archiving job
Validation
Validation is done by using transaction codes, checking the spool output, checking factors that may cause an archiving job to fail, and conducting a risk impact analysis. Once the archiving session is completed, you can use the transaction codes listed in Table 1 to validate that the data is archived and therefore no longer available in the system.
Program name | Program description |
RMCY9200 | Standard analysis for information structure S920 |
RMCY9205 | Standard analysis of information structure S920: display selection |
RMCY920F | Sample program for generating standard analyses: form routing |
RMCY920T | Sample program for generating standard analyses: analysis data |
RPM916A | Sales tax report |
RPM916B | Sales tax report |
RPM917A | Price reduction sales report |
Table 1You can validate the archived data through the statistics on written data objects for the corresponding archive file key in the spool output, which can be verified through transaction code SM37.
Failures are rare due to a data issue, but they can be caused by the following factors:
- Authorization issues: If user has no authorization to run the job, then the job fails. This can be corrected by providing the necessary authorization to the user and then rerunning the job.
- Content repository issue due to connectivity: Restore connectivity and rerun the failed job.
If the archive session does not complete and the job fails halfway through the session because of some issue, an incomplete archival session is created for the Archive file key. If this happens, schedule a rerun job to pick up the incomplete archive session to process it. In the archival process, the file is always archived, stored, validated, and then deleted from the table, so you need to reschedule the same job that failed. This can be done by copying an existing job or re-creating it by the same process described earlier.
Runtime Analysis
Runtime analysis analyzes the deletion or reloading jobs and determines the reasons why jobs fail. It is available in the job log and can be retrieved through transaction code SM37 (Figure 24). The SAP system automatically derives the background job names, with DEL for Deletion jobs, WRI for Write jobs, STO for storage jobs, and REL for Reload jobs.

Figure 24
Jobs with runtime duration display
For other info structures you can archive the data the same way shown for S920. Table 2 lists various info structures.
Info structure | Function |
S905 | Copy of S105: Movements |
S906 | Copy of S106: Stock |
S907 | Custom movements and stock |
S920 | Extend S120 |
Table 2 Info structures and their functions
Sandeep Kumar
Sandeep Kumar is a lead consultant with Infosys with more than 17 years of experience working in the automotive, aeronautical, and hi-tech manufacturing industries. He specializes in implementing SAP in the manufacturing industry domain. He holds a master's degree in financial management and a bachelor’s degree in production and industrial engineering.
You may contact the author at skumar0518@gmail.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.
Manojkumar Radhakrishnan
Manojkumar Radhakrishnan is a consultant at Infosys. He has more than nine years of experience in implementation, upgrades, and production support in the areas of SAP-MM, SAP for Retail, and data archiving.
You may contact the author at manoj.plm@gmail.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.