SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, code samples and tools and downloads for ASP.Net, SQL Server, R Script, Windows, Windows Phone, AWS, SAP HANA and ABAP, like SAP UI5, Screen Personas, etc.

Install SAP Free

Create Scheduled Job using SAP SM36 Transaction

This SAP tutorial shows how to create scheduled background job using SM36 transaction and configure job start time to run every time a specific SAP event is raised using Start time configuration. I used SAP event to trigger background job in a case where I could not submit ABAP report in Update mode during output processing.

This solution is prepared for a case where an invoice is created and an interface document should be immediately send to third party company. So the easiest way was to define a new output type for the related billing document type. The print program only raise SAP event which triggers background job. And the job submits ABAP program which sends output data.

Of course it is also possible to process outputs periodically like every 15 minutes or every hour, etc. But this case is for immediate processing after billing document is created on SAP system.

Create SAP Job

In this SAP tutorial, this section is showing how to use SM36 SAP transaction to create a scheduled SAP job to execute certain ABAP programs periodically. Users can define the start time of a background job to a certain SAP event.
Let's start to define a new SAP job by calling transaction SM36 first.

SAP transaction code SM36
SAP SM36 transaction code is used to create new job in SAP systems

The initial screen of SM36 transaction will enable the SAP user to define the name of the background job. After you enter the name of the background job, press Save button on toolbar menu.

define background job in SAP using SM36
Define background job in SAP using SM36 tcode

Define Job Steps

After you save the background job definition, you will be directed to the next step where you define what will the job do. SAP users can execute an ABAP program, an external program or an external command using this recently created background job.

step detail in SAP job definition screen
SAP background job can run ABAP program, external program or external command

Since I want to run ABAP program using SAP job, I entered the name of the ABAP program on the first option area. Although I did not provide any program variant, you can choose one of the variants created for target ABAP program to use with this SAP background job.

After you check entered data is valid using the Check button, continue to next step by pressing Save button at the bottom of the screen.

Existing steps defined within the background job is shown as a list on the next screen.

SAP background job step list
Background job step list

Create Job Start Condition and Start Time

Now you can go back and define start conditions which will trigger job defined as a background job in SAP system. Press the Start Condition button in the job definition screen.

SAP job definition screen Start Condition button
Define Start Condition for background job

When Start Condition button is pressed, Start Time definition screen is displayed.
There are 5 options for users to choose for SAP. These are Immediate, Date/Time, After job, After event and At operation mode. Within above listed 5 start time options, I will choose "After Event" start time option for the case ilustrated in this SAP tutorial.

define start time of SAP background job
Defining start time for background job

Since I want to run this background job right after I raise an event in an ABAP program, I will define the start time using After event option. Continue to process by pressing After event button on screen. When After event button is pressed, related section on the screen will be enabled for data entry.

Within After event section, in the Event textbox, I enter the name of the SAP event I've created before. I did not supply any parameter. Because this process will be repeated each time a new output is created, it will work numerous times. So I mark the Periodic job option. Otherwise if you do not mark Periodic job option, your job will be created as a one time job.

execute SAP job each time after SAP event is raised
Choose After Event start time option to execute SAP background job each time after event is raised

Check your configuration and save using the button at the bottom of the dialog screen. When you are redirected to job definition main screen, press Save to save all changes related with your new SAP background job. Following message will be displayed to indicate all changes are successfully saved

Job SAP_job_name saved with status: Released
Message no. BT112

SAP Tutorials

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table

Meetup Sunumu 1 meetup

Related Articles and Tutorials(http://www.kodyaz.com/sap-abap/create-scheduled-job-using-sm36-sap-transaction.aspx)
Free Adobe LiveCycle Designer Download
Complete List of SAP Modules
Convert Smartform to PDF in Print Preview Mode
Create Business Object in SAP
Delete All Data from SAP Database Table
How to Upload Data to SAP from Excel File using alsm_excel_to_internal_table Function Module
Upload Data from Excel File in ABAP using TEXT_CONVERT_XLS_TO_SAP
Email Spool Request using SAPOffice - Spool to PDF
How to Create SAPScript Text using SO10 Transaction Code
How to Display SAP Graphics using SE78 Transaction Code
SAP Tutorial - Convert Spool Request to PDF File using RSTXPDFT4 ABAP Report
ABAP Debugging using Log Point and Break Point
ABAP Runtime Error ST22 Transaction using Short Dump Analysis
ABAP Shared Memory Objects Tutorial with Sample ABAP Code
Add Web Dynpro Applications to SAP Favorites Menu
ABAP Authority-Check Object For User Other Than Current
Call Function Module using RFC Destination in ABAP
Change Fields for Selection in SE11 ABAP Data Browser
Compare Code in ABAP using SE39 SplitScreen Editor
Connect SAP from Eclipse using ABAP Project
Convert the table using the Database Utility (SE14)
Convert Sales Unit into Text using Function Module in Target Language
ABAP Code Inspector Check Variants for HANA Migration Optimization
Create SAP Dynamic Variant using Date Calculation
Create Scheduled Job using SAP SM36 Transaction
Create Search Help in ABAP for Web Dynpro Component
Create Transaction Code for Web Dynpro Application
Create SAP Transaction to Maintain ABAP Table using SM30
Create Transport Request for Text Translations using RS_LXE_RECORD_TORDER
List Locks in SAP system using SM12 Transaction Code
Prevent DYNPRO_SEND_IN_BACKGROUND Error in Background Process
Enable Remote Debugging in ABAP using RSRDEBUG
How to Execute SAP Program in Background Task
Export Graphics from SE78 SAP Form Graphics Administration using ABAP program
How to Export IDOC as Excel and Save as Local File from WE02 Transaction
Export SAP Spool Requests as PDF using SP01 Transaction
How to Find SAP Role Users Assigned for Transaction Code
Export SAP Data to Fixed Length Text File
How to Delete Standard Text using SO10 SAP Transaction
How to Find User Exits in ABAP Codes of SAP Transaction
How to Transport SAP Graphics using SE78 Transaction
Import and Export SO10 Standard Text using RSTXSCRP ABAP Program
Main program for include RV61Bxxx not found
Business Document Service Error: Error when accessing graphic (BDS), RC = 5
Get SAP Document Flow using SD_DOCUMENT_FLOW_GET ABAP Function Module
SAP Purchase Order Tables, Transaction Codes and Output
How to Set Start Transaction in SAP GUI
Graphics White Background Displayed Grey on SAP Smartform Output
Export Table Contents into Text File and Download File
SE63 Smartform Translation and Export using SLXT Program
Search and Find SAP Transaction Code using SE93 or SEARCH_SAP_MENU
Unicode Character Problem in IFS File Interface
Web Dynpro Text Translation using Assistance Class
Transport Variants of an ABAP Program into Workbench Request
TVAP Item Category and SAP Table TVAPT for Text Translations
Unlock Objects Locked in Request or Task using Transport Organizer Tools
Update Database Table Data using ABAP SE16N_INTERFACE
VF31 SAP Transaction to Reprocess Billing Output Messages
Function module is not released for the Internet

Copyright © 2004 - 2020 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems