Sunday, 8 June 2014

Automatic IDOC and Batch Job Monitoring Configuration

Automatic IDOC and Batch Job Monitoring Configuration
Step by Step procedure  to automate IDOC and Batch Job Monitoring.
 can be implemented.

Ø  Setting Idoc failure Alerts with Spool Recipients:
1.       Go to SE38 and execute the program RSEBWE02.
  
2.       Choose the Criteria on which, the error Idoc needs to be reported in a mail.
a.       Example: China  Idoc Failure for Current date. Build the selection criteria to choose the same

  i.    Exclude all Success and Waiting status. 
b.      Include all China message type.

3.       Save the entry as a Variant with, Dynamic selection for date as Current date. (Example CHN_ERR)


4.       Note. One variant will correspond to one email alerts. So the variant needs to be saved as per the required monitoring criteria.

5.       Go to Transaction SO23 and create a Distribution list to which alert email needs to be sent.
a.       Example Click create Button

Fill DL name (Example CHN_ERR)

Maintain email Ids in DL tab and Save the DL


6.       Go to Tcode SM36; Create a Job for running the report program and sending the mail.
a.       Choose a descriptive name for the Job name. The name of the job will be the Subject of Email (Example Create a Job CHN_IDOC_FAILURE_ALERT)


b.      Choose the step with program RSEBWE02 and the variant saved earlier with the required monitoring criteria.


c.       Choose Spool list Recipient and enter the required Distribution list to be alerted.

d.      Give F4 in recipient and Choose the DL


e.      Save the Job CHN_IDOC_FAILURE_ALERT. This can be set to run based on when monitoring needs to be done.

7.       Testing the Alert monitoring for the example above
a.       Creating an Error Idoc for today by copying and old error Idoc 000000xxxxxxx in WE19. Idoc xxxxxxx is now in error for current date.


b.      Run the Scheduled Job CHN_IDOC_FAILURE_ALERT to check whether the error idoc is reported in the email.


c.       Go to Transaction SOST check for the email.

                                                              i.      The Email Subject will be Job CHN_IDOC_FAILURE_ALERT, Step 1 and it will have an html attachment with the same name with the content of the error details.

d.      Mail will be received in Outlook.

e.      HTML mail content with the Idoc error details.

8.       Note:   
a.       Email will only get triggered when there is an Idoc available which matches the criteria not for all runs of the program. That is email is only created when there is an output for the report and a spool is created.
b.      The alert mail will only contain details which is available in the output the report RSEBWE02. That is it won't have details on the data within Idoc segment or the specific error detail message.
c.       All monitoring criteria which can be set up as variant in the report can be used for monitoring.
d.      There is no control to avoid resending the same error. Unless the Idocs status has been reset the alert email will be send with the same idoc.

Ø  Setting Idoc failure Alerts with Spool Recipients:
1.       Go to Transaction SQVI and create a quick view query joining table TBTCO and TBTCP.
a.    Join Condition
b.      Selection Screen fields 
c.       Selection Screen fields

2.       Go to SE38 and execute the generated program say .xxxxxx_xxxxxxxMONITOR.


3.       Choose the Criteria on which, the fail Jobs needs to be reported in a mail.
a.       Example: Japan Job Failure for Current date. Build the selection criteria to choose the same
                                                   i.      Set Job status as 'A'.

b.      Include all  China Jobs.

4.       Save the entry as a Variant with, Dynamic selection for date as Current date. (Example CHN_ERR)


5.       Note. One variant will correspond to one email alerts. So the variant needs to be saved as per the required monitoring criteria.
6.       Repeat the Procedure from Step 6 Onwards from Idoc failure Alerts and setup the Job with Quick view Query program.
7.       There is no control to avoid resending the same error. Unless the variants are setup in such a way to scan for failure for different time intervals.



4 comments: