Understanding & Implementing ILM Part 1
Recently I was assigned to a prototype development which needs to consume ILM framework in ABAP on-Premise system. I have summarized the whole ILM topic into two separate blogs. The first one which we are going to discuss in this blog is to demonstrae the ability to automatically detect and destruct destroyable data (and its related component). Destroyable data could be defined as per customer or business scenario, its customizable. one such business scenario is data that are expired for more than one year could be defined as destroyable .
ILM stands for “Information Lifecycle Management”. ILM framework helps to manage data life cycle through a very simple configurable steps and minimal amount of coding and highly flexible for customer. This is very useful as well for GDPR where the purpose could be to delete personal data/information after the user has left the organisation.
one simple answer would be to remove the unnecessary data and lessen the load on our application and DB.
It’s important to mention it could be achieved without ILM framework, however advantage of using ILM framework can’t be ignored more so where time and less complexity is directly related to Total cost of Development.
- Auto-enabled Application logging
- Least amount of coding
- Customizable business scenarios for deciding the destroyable data
- ILM business function must be switched on : First thing first, you need to ensure ILM business function is switched on. For various reason is some organization it is not switched on. Check with system administrator first.
- Check ILM Business Function : To check if ILM is switched on or off. Go to transaction SFW5. Find ILM and you can see if its witched on or off.
Following are the main points that we will be covering in detail
- ILM Configuration
- Create a custom delete API that perform data and its component
- Embed the API into ILM based destruction program
ILM Configuation is to be done at two ends as shown in above figure, one being IRM_CUST which a developer has to do in order to enable the ILM framework, and second being IRMPOL and ILMARA which is at customer end. For latter developer has to provide consulting note to their respective customer where they can customize the destroyable data definition, this will be explained in part 2 of this blog. we have here explained customization that is to be done by developer for ILM to be operational.
Customization at Developer end:
1 Create a destruction program in SE38 namely SAM_ILM_DES. no coding yet just we need to create a program. you can name anything starting with z or y or your namespace.
2. Configuration for Destruction Object:
DOBJ configuration: Enter transaction DOBJ in command box. Create a new entry. Give any destruction object name associate your destruction program name (created above) with this destruction object.
3. Configuration for ILM Object
Transaction: IRM_CUST Here we create one ILM object and link the above created destruction object to this ILM object.
Double click on ILM Objects
press “NEW ENTRIES” and here enter you ILM Object Name
Define Available Time Reference fields which can be mapped to any time reference fields of your application table to be used for calculation of retention logic.
- ILM Program: Coding Embedding delete API into ILM framework backed program as shown below
- Add INCLUDE destroy_prg_standard before INITIALIZATION
- Under INTIALIZATION add PERFORM standard_texts_init.
- In START OF SELECTION event, a subroutine PERFORM main.
- Inside main, we need to add four subroutines that are mentioned below.
- All above steps can be seen in above screenshot of the program
Inside routine “main”, we will have following sub routines.
- FILL_WORKLIST – Here we can retrieve the data from main table from which is to be scope of data destruction. Let’s say GT_WORK_LIST
- You can now run this program in foreground
- Or you can schedule this program in background and it will check the data everyday which all data has expired and will delete it