Skip to Content

I have been doing SAP Data Archiving the old-fashioned way for quite some time. Submitting a job and watching it run and waiting for it to complete.  It is the equivalent of watching a pot of water and waiting for it to boil – “a watched pot never boils”.   I finally came to the conclusion that there has got to be a better way to monitor these jobs.   

So, I started doing some research and came across 2 SAP supplied background events (transaction SM64):

Now came the tricky part.  I needed some way to get notified that these events occurred.  And, SAP Archiving jobs are not scheduled like other jobs.  When you schedule the archive write job via the ADK (Archive Development Kit), there is a “sub” job that actually kicks off the archive write job, so, monitoring these jobs can be complicated.  I also did not want to get a notification for EVERY archiving job (write, store, delete) – as that would be a lot of notifications.

I decided to go with getting a text message when an archive write job completed.  For most transaction data archive objects, I do not have them configured to automatically submit the relative delete job.  I have a window (a small window) where I can schedule jobs.  So, I want to be able to control when, and how many, archive delete jobs get scheduled. 

The next step was the actual notification.  I had help – someone wrote a quick Perl Script that would send a text message.  I chose to have the following message sent – “Get out of bed and check archiving job”.  All the archiving people that read this will be able to relate to that message. 

The final step is tying it all together – the Perl script with the completion of the archive write job.  To do that, a SAP external command was set up via transaction SM49. 

The Parameters for operating system command was configured to point to where the Perl script is located.  Save the external command.

Then, schedule the monitor job/program via transaction SM36:

Click on Step -> External command:

Enter the name of the external command that was previously created.  Also, enter the Operating system and Target server. 

Save and then click on Start Condition:

Click on After event:

From the drop-down, select the event you wish – in this case SAP_ARCHIVING_WRITE_FINISHED.

If you leave the Parameter field blank, this will execute the external command (in this case the text message notification) after every archive write job.  If you want to submit it for specific archive write jobs, you can wait until after the archive write job has started and then enter the archive session number in the parameter field.  This would limit the notification for just that specific archive write job.

Then save this job.  You will get the following message:

This job will then get kicked off after an archive write job has completed successfully. 

 Hope this helps someone as it helped me.

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Former Member

    good ..but reading this makes no sense without this pearl script ..as to develop and get people for that will take extra effort. It will be good if you can share that as well ,I  fell it wont be that big also.

    Thanks in advance

    (0) 

Leave a Reply