Translate

How to maintain and monitor background jobs via SAP

The following document provides general procedures for creating, maintaining, and monitoring background (batch) jobs in SAP.  The procedures explain the most basic and common activities.  However, the creation and maintenance of SAP background jobs can become quite complex, and much of the detail is beyond the scope of this document.

AUDIENCE

All system maintenance personnel should review this document.

REFERENCES

For more information the following sources are recommended:
BC - System Administration Guide, Chapter 4: Managing Background Processing
SAP Extended Help (Select Extended Help from the Help menu while in transaction)

PROCEDURE

Creating a Background (Batch) Job in SAP

  1. To create a background job in SAP, enter the Define Background Job screen by using transaction code  SM36 or menu path System ® Services ® Background jobs ® Job definition.
  2. Enter a descriptive job name in the Job name field.  See document 15020 for naming conventions and reference.
  3. Enter the background job priority in the Job class field.  The different priority levels, from highest to lowest, are A, B, and C.  The job class determines how the background jobs are queued.  Jobs that are absolutely crucial should be classified as A, those that must run, but can be delayed without causing great disruption to operations should be classified as B, and jobs that the least imperitive to business functions (such as most reports, for example) should be classified as C.
  4. Enter the host (server) that will run the background job in the Target host field.  Click the down arrow on the right side of the field to get a listing of possible entries.  If this field is empty, the job will run on the host (server) that you are logged into.
  5. To schedule the background job, click on the Start time pushbutton.  This will bring up the Start Time pop-up window.
  6. There are several scheduling options:
  • Immediate   This option will be used on several occasions:   
      - When a job is run on request by a user.
      - When a job fails and must be restarted.
      - For some monthend jobs or jobs with dependencies on other platforms, they may need
      to be run when resources are available, or there predesessor jobs finish.
  • Date/Time   The date and time the job will release.  It may not start until resources are            available.  If a job is scheduled to be periodic, it will release at that time the next day,       week, month, etc based on the selected period.
  • After job      Jobs with dependencies will be scheduled to release upon completion of its       predecessor.  A status indicator may be checked.  If it is, the successor job will only release if the predecessor finishes completeley.
  • After event  Jobs may be set to release after pre-defined events are raised.  These events can           be coded into ABAP/4 programs.
  • At operation mode    These jobs will release when operation mode switching completes.  This would be useful  if many batch jobs need to be released around the same time.  They can be set to release when the operation mode switches a number of dialogue sessions to batch, ensuring adequate resources.
To schedule the background job according to one of the options, click the corresponding pushbutton at the top of the window.  After the selection, the appropriate entry fields will become active in the window.  The two most common options will probably be Immediate and Date/Time.
To schedule a background job to run immediately, click the Immediate pushbutton, and then the active Save button.  No additional entries are required.
To schedule a background job according to a specific date and time, click the Date/Time pushbutton.  Several fields will appear.  Enter the desired values in the Scheduled start fields.  Entries in these fields are required.  The background job will be released at this data and time but may wait in a queue.  To prevent a job waiting in the queue from running after a certain time, enter the desired values in the No start after fields.  The values in the Date fields should follow the default format for the login ID used.  (To determine this format, use transaction SU50 or menu path System ® User profile ® User defaults to see the user defaults.)  The values in the Time fields should be in military format.
When either the Immediate or Date/Time options are chosen, the Periodic job click box will appear at the bottom of the screen.  Click this box if you want to run this job at periodic intervals.  Options for periodic scheduling appear when the Period values pushbutton is clicked.  The background job will run at periodic intervals after the first background job runs.  In addition, a Restrictions pushbutton will appear.  In the Restrictions window, there are several options.  Click only on workdays to limit the days the job releases on.   You limit these days by specifying a calendar at the bottom of the window.  Separate calendars for Monday to Friday, Monday to Saturday, Everyday, and others will be created.  One of four buttons must also be set.  Always Execute will cause the job to releasee according to its period valued REGARDLESS OF ANY WORKDAY/CALENDAR RESTRICTIONS.  This is the default value, but it should almost always be changed.  Cancel Job will simply cancel the job on non-workdays.  Move to previous day will release the job on the workday previous to the date determined by the period value.  Move to next workday will release the job on the next available workday. To schedule a background according to the other options, use the F1 function key to obtain more information.
  1. After entering all the scheduling information, click the Save pushbutton.  This will bring back the Define Background Job screen.
  2. Click the Steps pushbutton to bring up the Step List and Create Step 1 windows.  These windows define the program(s) that will run in the background. 
  3. To run an ABAP/4 program, click the ABAP/4 pushbutton. 
10.  Enter the name of the ABAP/4 program in the Name field and, if necessary, enter the variant in the Variant field.  A variant specifies the set of parameters that an SAP program needs to execute.  To get a list of variants that have been created for a program click the Variant list pushbutton.  (Variants may defined in the ABAP/4 Program Development: Initial Screen using transaction code SE38 or menu path Tools ® CASE ® Development ® Program maintenance ® ABAP/4 development.)
11.  When an ABAP/4 program uses write statements, these write statements are printed, rather than displayed on a screen , when the program runs in the background.  The print job will use the print specifications of the login ID used.  (To determine these specifications, use transaction SU50 or menu path System ® User profile ® User defaults to see the user defaults.)  To change the print specifications, such as the printer, click the Print specifications pushbutton.
12.  Note that external programs on the UNIX platform may be executed using the SAP scheduler.  This will probably not be too common, but to do so, click the External program pushbutton.  Enter the information in the Name and Parameter fields.  For more information, use the F1 function key.
13.  Once the background program has been defined, click the Save pushbutton.  This will save one “step,”  which will now appear on the Step List screen.
14.  A background job may execute more than one program.  To specify additional programs, click the Create pushbutton on the Step List screen and repeat numbers 9 through 13 above for the Create Step 2 screen and so on.  The Step List screen also allows the list of programs for a background job to be changed using the different pushbuttons at the top.
15.  After the programs for a background job have been completely specified, click the icon with the green arrow to return to the original Define Background Job screen.
16.  Click the Save (yellow folder) icon to save the background job definition and submit it.

Maintaining and Monitoring Scheduled Background Jobs

  1. To maintain or monitor SAP background jobs, enter the Select Background Jobs screen by using transaction code  SM37 or menu path System ® Services ® Background jobs ® Job overview.  The window is a selection screen.  A listing of background jobs will appear according to this window.
  2. The following fields are available to query all background jobs.
  • Job name - To find a particular job, enter the job name in this field.  To find all job names, enter *.
  • User name - To find jobs created by a particular user, enter the user ID in this field.  To find jobs by all users, enter *.
  • Start From/To Date/Time - To find jobs with start times in a particular interval, enter the beginning of the interval in the From Date and Time fields and the end of the interval in the To Date and Time fields.  The beginning or end of the interval may be left open.  The values in the Date fields should follow the default format for the login ID used.  (To determine this format, use transaction SU50 or menu path System ® User profile ® User defaults to see the user defaults.)  The values in the Time fields should be in military format.
  • Start at event - To find jobs that were triggered by an event, enter the event in this field.  Leave the field blank if it is not applicable.
  • Jobs Status - To find jobs with a particular status, select the click box associated with each status.  More than one status may be chosen.  Select all click boxes to get a listing of jobs, regardless of status.  The statuses include:
    • Scheduled - This status applies to background jobs that have been defined by users who do not have the authority to kick them off.  These jobs must be released by users who do have this authority or else they will not run at their start times.
    • Released - This status applies to background jobs that will run at their start times.
    • Ready - This status applies to background jobs that have been kicked off at their start times but have been queued to run.
    • Active - This status applies to background jobs that are currently running.
    • Finished - This status applies to background jobs that completed normally.
    • Cancelled - This status applies to background jobs that ended abnormally.
    • Jobs without start date - To find jobs without a start date, select this click box.
    • Jobs with previous job - To find jobs with previous jobs, select this click box.
The number of jobs selected will decrease as more criteria are chosen.  To find more information on possible entries for each field, select the field and select the F1 function key.
  1. Once the selection criteria have been specified, click the Execute pushbutton.  This will bring up the Job Overview: Alphabetic screen, which gives a listing of jobs that satisfy the criteria with the status of each job.
  2. By default, the jobs are listed alphabetically.  To sort the list by different criteria, select Sort from the Edit menu.
  3. Click the Refresh pushbutton to update the information listed on the overview screen.
  4. To maintain a specific background job or obtain information about it, select the job by clicking its job name in the list.  The following pushbuttons provide several options:
  • Job log - Click this pushbutton to display the results of a completed background job.
  • Display - Click this pushbutton to display general data about a job.
  • Release - Click this pushbutton to release a scheduled job.  A user may schedule a job, but if the user does not have the proper authorization, the job remains in scheduled status.  It will not run until, an authorized user has released it.  Jobs created by authorized users are automatically released.
  • Spool list - Click this pushbutton to display a background job’s spool requests (print/fax jobs).
  • Steps - Click this pushbutton to display a background job’s Steps List (the programs that it will or has run).
Other options are provided in the Job menu.  These include:
  • Schedule job - Select this to cancel, release, or repeat an existing job.
  • Copy - Select this to copy an existing job to a new one.
  • Delete - Select this to delete a job.
  • Change - Select this to change or modify the definition of a job that has not run yet.
  • Capture - Select this to capture a job that is currently running and run it in the current on-line session.
  • Cancel job - Select this to cancel a job that is currently running.

1 comment:

zone-i said...


Your Welcome sir.

Labels

sap hana hana database aws s4 hana hana db s4hana conversion steps sap hana azure bw4hana hana migration s4hana migration sap cloud migration steps sap hana migration steps sap hana migration to azure s4hana sap fiori fiori performance fiori erp s4 hana fiori sap fiori app sap fiori client sap fiori launchpad sap s4 hana fiori cisco ecc AI SAP AI abap dumps hana sap S/4HANA S/4HANA Conversion best sap ui5 & fiori training configuration database fiori tutorial on webide free sap ui5 & fiori training s/4 hana sap dumps sap fiori tutorial sap ui5 sap ui5 & fiori sap ui5 & fiori tutorial sara ui5cn 2367245 - Troubleshooting performance issues with SAP BPA Amazon free tier for SAP AWS setup Experience CALL_FUNCTION_NOT_FOUND CCMS Configuration and Use Create New Data Class in SAP (Oracle) Critical top SAP Abap dumps DHCP Clients Not Receiving IP Addresses Download Stack.xml HAN-DB HAN-DB-ENG High CPU Usage Due to Excessive Process Switching How To How to Start and Stop SAP Hana Tenant Database How to change SAP Hana Sql Output results are limited to 5000 Records How to perform SAP Dual Stack Split - Netweaver Inactive Objects in SAP Intercompany transactions in SAP AP / AR : Cross Company Code Transaction Interface Flapping Due to Duplex Mismatch KBA LOAD_PROGRAM_LOST MSSQL shrinking transaction log file Migrating to SAP hana database NAT Overload Causing Internet Access Failure Note 500235 - Network Diagnosis with NIPING OSPF Adjacency Not Forming PRINCE2 Foundation Sample Questions Preparing for S/4HANA Conversion and the MUST know items Push to Download Basket S/4HANA Migration Cockpit S/4JANA SAP BI Support Data Load Errors and Solutions SAP BI/BW Landscape SAP BPA SAP Basis SAP Basis Automation SAP Business Objects SAP CPS SAP Certification SAP FI Certification SAP FI Certification Sample Questions SAP HANA Admin - Cockpit SAP HANA DB Engines SAP HANA Database SAP HANA terminate session connection disconnect cancel kill hang stuck SAP Hana DB restore SAP Hana Numeric Error Codes SAP Landscape SAP Language installation SAP MM and Purchase Order Tables SAP Maintenance Planner SAP Note 500235 SAP R/3 Glossary SAP Readiness Check SAP S/4HANA 1709 Installation Files SAP S/4HANA 2023 SAP S/4HANA 2023 Installation SAP S/4HANA 2023 running SAP S/4HANA Installation SAP Scheduling SAP Solman 7.2 CHARM: SAP Support Package Stack Strategy SAP Support package SAP Upgrade SAP support stack upgrade SP stacks STORAGE_PARAMETERS_WRONG_SET SUSE/SLES/Kernel versions Setup of S/4hana 2023 TSV_TNEW_PAGE_ALLOC_FAILED TSV_TNEW_PAGE_ALLOC_FAILED error Transaction ID Unable to download an SAP Note Unix/Linux Command That Are Helpful For SAP Basis Upgrading SAP Kernel Without Downtime Upgrading windows server 2008 to windows server 2019 What is OSS Notes? SAP SNOTE Tutorial accounting agile ale idoc ale/edi archive FI documents audit auditing auditor aws aws cloud basic type bluefield approach ccms ccmsidb charm copilot datavard dbacockpit download sap note download snote edi idoc electronic data interchange enable sap archiving objects erpprep ffid firefighter fraud functional hana admin how to apply sap security note https://www.erpprep.com/ idoc install install sap fiori installation interfaces intermediate document internal control license key linux version materials management messsage niping test order type port prince2 agile prince2 agile practitioner purchasing quick info s4 hana sap abap dumps sap abbreviations sap activate certification sap activate project manager sap authorization sap aws sap brownfield sap ccms sap ccms configuration sap erp sap error sap grc sap greenfield sap internet demo system sap license sap maintenance certificate sap material management sap meaning sap mm sap mm consultant sap monthly security note sap netweaver sap network diagnostic sap niping sap note sap oss sap patch day sap performance sap performance issue sap purchase order sap s/4hana sap sales and distribution sap sap otc sap sd sap sd certification training sap sd course sap sd jobs sap sd module sap sd online training sap sd training sap sd tutorial sap sd tutorial for beginners sap security sap security note sap snote sap snote tutorial sap solution manager sap sql segregation of duties separation of duties sles slicense smc snote snote in sap system sod conflict solution manager solution maneger stop start hana database suse linux techie trex two step upgrade required waterfall