Skip to Content
Technical Articles
Author's profile photo Maya Chowdhury

Using SAP S/4HANA’s Data Aging For System Optimization

SAP S/4HANA is a unique system, but how it handles memory and data usage is nothing short of remarkable. In older systems, tables and processing could be created and manipulated, with each database being loaded and unloaded dynamically. SAP S/4HANA’s approach is similar. Data is stored in databases or main memory. The data within the memory module is known as “Hot” data, while that within the database is known as “Cold” data. Typically, when S/4HANA wants to use a bit of data, it will load it off the disk volume out of Cold storage and into the Hot main memory. When processing is completed, the system will unload the data and store it in Cold storage.

Understanding Data Aging

All the data within a system isn’t necessary for everyday task completion. On the contrary, most data can be safely stored and only accessed when needed. Data aging examines what data the business uses regularly and seeks to keep it active in Hot storage. Older, less pertinent data can be saved as Cold storage. Historical data can be stored in an off-premises backup, allowing the system to free up memory and become more efficient. Knowing what to keep and what to store is at the core of data aging. But how do we do this in SAP S/4HANA?

Step 1: Enable Aging

Enabling aging for the data set is as simple as adding the profile parameter “abap/data_aging = on” in the default profile.

Step 2: Activate the Business Function

Next, we’re going to switch on the data aging business function (DAAG_DATA_AGING) using transaction code SFW5.

Step 3: Set Up Authorizations

Within SAP S/4HANA are two roles for data aging. They are:

Ø  SAP_DAAG_ADMIN is the administrator role that enables activation of data aging objects, execution of data aging runs, creation of partitioning objects, Assignment of tables to those objects, and the development of partition ranges for partitioning objects.

Ø  SAP_DAAG_EXPERT allows a user to activate data aging objects and schedule Data Aging execution runs.

These are the prerequisites for setting up data aging and enabling all the system’s needs to make it happen flawlessly. The steps from here are focused on the actual task of data aging.

Step 4: Listing Objects

We’ll first list the objects by using transaction code DAGOBJ. This will provide us with a table detailing all objects and whether they’re active or inactive for data aging. 

Step 5: Data Analysis and Partition Determination

Next, we’ll run the transaction code TAANA. We’ll select Table Analysis. This view gives us a snapshot of our data, its age, and how much space it occupies which is like finding a solution to solve this problem without photoshop. Using this snapshot, we can plan what information we’ll keep around and what we’ll send to storage.

Step 6: Create Partitions

To create a partition for the data we’re housing, we’ll run transaction code DAGPTM. If you try to do anything before you’ve made a partition, the system will give you a warning. The report we open through the transaction code DAGPTM shows us the current tables, their partition (if any), and details about the partition. At the start, none of the tables are partitioned. The system must have two partitions for a data aging run to occur. One is dedicated to the current iteration of the table, and the second is the historical partition. No data aging runs can be done if these partitions don’t exist.

When creating partitions, we need to ensure that the partitions are sequential and that no date gaps exist. One of those partitions needs to cover the current date. We don’t need to worry about creating the Hot partition since it will be done for us by the system. Within the view opened by the transaction code, we’ll locate Manage Partitions and select it. Next, we’ll choose the partitioning object and set the range. We’ll choose Propose Partition Range and then Set Partition Ranges. Finally, in the Schedule Job window, we’ll Execute the job.

Step 7: Activate Data Aging Objects

We’ll once again run transaction code DAGOBJ to pull up the data aging objects view. We’ll then select the object we want to activate and click Activate to get it going. If we examine the columns in the table, we’ll notice a new one named “_DATAAGING” added.

Step 8: Maintaining Residence Time

How long are we going to keep data as Hot data? This is a question a company like Joy Organics has asked itself. Managing residence time gives us a solution to this. Run transaction code SLGR and change the period for maintaining data as Hot data.

Step 9: Create Aging Group

We’ll next open the data aging run view through transaction code DAGRUN. From the menu, we’ll select Go to-> Edit Data Aging Groups. Select New Entries, create a Data Aging group and save that group. The data aging group you just created should be visible from the list. Select it and then select the data aging objects you’d like to add to the group from the dialog structure. Don’t forget to save your entries.

Step 10: Execute a Data Aging Run

While still in the DAGRUN view, we can head over to Schedule New Job. We can also use the Go to->Schedule New Job entry in the menu bar. Enter the data aging group that you want to schedule. Choose the maximum runtime. This runtime is in minutes and describes how long the Data Aging run has before stopping. You can also add additional parameters to the job if you so desire. Finally, we’ll hit Execute to start the run.

Data Aging Successfully Implemented

For data aging to be of use to a company, it needs to be run over a scheduled period. Databases should be constantly monitored and data sent to Cold storage if it is no longer viable to keep it on hot storage. The system should become more efficient with time as memory space is freed up for other uses through this constant improvement.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Andreas Baldauf
      Andreas Baldauf

      Hello Ms. Chowdhury,

      According to SAP Note 2869647 "Guidance for use of Data Aging in SAP S/4HANA", it seems that SAP no longer recommends the use of Data Aging:

      SAP Note 2869647 - Conclusion:

      • For technical and logging data, direct use of NSE is recommended.
      • For application data, use of Data Aging can normally not be recommended - Data Archiving (with or without ILM) remains the most important means to manage information lifecycle.

      Best regards,