Creating Alerts on the basis of status of the Background Jobs with the help of ABAP Query

By Gaurav Chawla, Infosys

Introduction

Many a times there is requirement such as user wants to know whether a background job was executed successfully or not. User wants to have updates or alerts or mails in case a scheduled job failed or aborted or executed successfully.  

For that purpose we can either write the entire code in ABAP or we can take help of ABAP Query. Writing a Code can be a cumbersome task as well as time consuming. With the help of ABAP Query our coding effort is saved and similar functionality can be achieved in very less time compared to writing an ABAP code.  

Steps to Generate Alerts

1.    Create an ABAP Query

With Help of SQ03 transaction create a user group

 

Using Button “Assign users and InfoSets”, we can authorize users who can execute the ABAP Query.

Using SQ02 transaction, Create InfoSet.  

 

To join two tables there is a button “Insert table” on next screen.  

Click on “InfoSet Maintenance” button in application toolbar.  

 

A Pop Up is displayed. Click on “Create Empty Field Groups” radio button and press enter.

 

Select a field group and insert fields into the field group by right click on fields and click on “Add field to field group”.

You can add other fields as well based upon what kind of output user wants.

For example in this case we want to find out the jobs that are started by a particular person and the status of the job. So we added fields “Initiator” and “State of background jobs” in field groups.  

Generate Info Set

 

Using Role/User Group Assignment, assign the User Group “ZABORT_UGRP” created above to InfoSet and press Save.  

Go to SQ01 transaction to create an ABAP Query.

With the help of ABAP Query we can avoid coding and get the results based on the data entered on the selection screen.

You can select the output format. By click on “Basic List” button in application toolbar you can select the fields to be displayed in output and on Selection screen.  

Click here to continue...

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image