Email SLG1 errors for Employee / Org Replication to users
To track and email Replication related errors and send it to the end users / support team members on a periodic basis. This feature is a nice to have feature where the users have a comfort not to go to the slg1 transaction or to open the data replication monitor in EC frequently. This feature comes in handy when the errors occurs in data replication and the team wants it to flow to their inbox.
This can be done in following ways:-
- Build an application using BTP or ABAP with some dashboard for having a good visual flavor.
- Build an abap application to tap the SLG1 log and email it to the users
In this blog we will cover the point number 2 sated above.
The approach is as below.
Create an Aabap Program to read the SLG1 logs using built in function modules.
- Below screen or some more options can be added.
- Here you will need to do a selection for the object and sub object that appears on the SLG1 screen
- In our example the object ECPAO_IN and sub-object EE has been selected
The screen also has time restriction as to how much back in time the user wants the log to be retrieved.
The last section of the screen is the email related parameter.
Here we have enhanced two things
- The body text we have added a selection from the SO10 text
- Recipients of this email can be added in the selection for Recipients, this can be utilized as the system limits.
This program can be scheduled in the background for any frequency or can be also linked with some event that occurs post replication program run.
Below function modules can be referred and used
The message type “E” can be filtered and then those selected messages can be formatted as per need and sent to the email body.
This is a small but very useful utility for error monitoring for employee / org replication. This can be further enhanced for the email body or email attachment formatting as needed.