Sep 07

“Transporting” scheduled jobs

‘Transport’ is a touch misleading. In this example, we aren’t using STMS to move a job from one AS/CI to another, but we aren’t recreating it from scratch either.


Our SAP servers are running on HP-UX hosts with Oracle 10g databases. Recently, the client underwent SPS application to production servers. The process called for the stopping of scheduled jobs during update. The jobs were to be restarted as directed by team leads. When a request to restart job was executed, it was unable to be completed because the required job had “disappeared”. The job in this scenario was over 100 steps with different programs and variants being executed. Due to time constraints and the possibility of incorrect data entry, manually recreating the job in SM36 was not an option.

It is possible to extract a job definition directly out of the tables in which it is stored and then reinsert it into another instance (i.e. copy the job definition from your Q box and drop it back in Production). For demonstration purposes we will call our source server Q01 and our destination server P01. The job used in this example will be OUR_LOST_JOB.

NOTE: The steps used in this tip may utilize commands that access and modify data in ways not explicitly endorsed by SAP. Therefore, the use of this tip should be done at your own risk.

  1. In Q01 verify that OUR_LOST_JOB is available by looking for it in SM37 or searching table TBTCP via SE16.
  2. Log into the Q01 unix host as q01adm ( <sid>adm ).
  3. Using your preferred text editor, create a file named ‘sm37exp.r3tr and enter the following statements adjusting entries to match your landscape:Export
    client=[source client]
    select * from tbtco where JOBNAME=‘OUR_LOST_JOB’
    select * from tbtci where JOBNAME=‘OUR_LOST_JOB’
    select * from tbtcp where JOBNAME=‘OUR_LOST_JOB’
    select * from tbtcs where JOBNAME=‘OUR_LOST_JOB’
    select * from btcctl where JOBNAME=‘OUR_LOST_JOB’
    select * from btcsev where JOBNAME=‘OUR_LOST_JOB’
    select * from btcuev where JOBNAME=‘OUR_LOST_JOB’
    select * from btcsed where JOBNAME=‘OUR_LOST_JOB’
    select * from btcued where JOBNAME=‘OUR_LOST_JOB’
    select * from btcevtjob where JOBNAME=‘OUR_LOST_JOB’
    select * from btcdelay where JOBNAME=‘OUR_LOST_JOB’
  4. As q01adm, execute the following command:
    R3trans –u 8 –w sm37exp.log sm37exp.r3tr
    This string creates the SM37export file which contains the actual job definitions, as well as sm37exp.log. Review the log to ensure a successful export (warnings are OK).
  5. Copy the SM37export file to P01 p01adm home directory (/home/p01adm) and make sure to chmod 777 to grant full permissions.
  6. Login to the P01 CI unix host as p01adm
  7. Use your favored text editor to create the file ‘sm37imp.r3tr’ with the following contents:
    client=[destination client]
  8. Execute the following command in /home/p01adm:
    R3trans –u 8 –w sm37imp.log sm37imp.r3tr
  9. Check the log to see if the import was successful
  10. Log into P01 and search for OUR_LOST_JOB via SM37. It should be under status: Finished.
  11. To recreate the job in “scheduled” status, execute menu “Job->copy”

The job has now been copied and is in status: “Scheduled”. From here you can either manually release the job or reschedule it for its proper frequency.


About The Author

Leave a reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

This site uses Akismet to reduce spam. Learn how your comment data is processed.