Anda di halaman 1dari 10

Background jobs are simply a sequence of SAP programs which are executed step by step automatically in the background.

They can be scheduled to


run run automatically at pre-defined days or with a pre-defined frequency.
1. COMPONENTS OF A BACKGROUND JOB:
In order to set up any background job we need to have the following information:
- The program to be executed
- The variant to be used for the program. The variant defines the input parameters which will be used by the program. The variants can be set up for
each program using the T Code SE38.
- The user ID with which the program is to be executed. The user ID is very important from an authorizations point of you. By using the correct user ID
for a particular program being used in the job, we can restrict the users who can run that job successfully.
2. SETTING UP A BACKGROUND JOB:
You have already stated that you know about setting up of simple background jobs. A simple background job can be set up by going to a T Code or
program in SAP, entering the selection paramters and then selecting the menu path Program --> Execute in background. This sets up a simple, single
step background job which can then be montored using T Code SM37.
To set up background jobs with multiple steps, we can use the T Code SM36. To use the T Code SM36, we need the same 3 sets of information as
mentioned above and the same is defined for every step of the job.
The various steps of a multiple step job run sequentially, i.e. step 002 starts once step 001 has been finished successfully, step 003 starts once step
002 is finished and so on till the last step is finished successfully.
3. OUTPUT OF A BACKROUND JOB - EMAILING IT TO AN EMAIL ID
The output produced by a background job is called spool and it can be emailed, if required to an email ID or a distribution list containing multiple email
IDs by defining the spool recepient of the job.
This can be defined while setting up the job in SM36. Once this setting is done, the spool i.e. the output produced by the job is emailed to the email IDs
mentioned in the spool recepient once the job has completed successfully.
4. DEBUGGING A JOB FAILURE
There are multiple occassions when a background job might fail. The reason for the same can be found using the job log which is availabe in T Code
SM37. Go to T Code SM37 and display the job. Then select the job log which will show the execution log of the job.
We can scroll down to the point where the job gets cancelled and then double click on the line to display the detailed ABAP dump which shows the
reason for the job failure.
The ABAP dump can also be seen using the T Code ST22. Usually ABAP dumps are technical in nature so ABAP consultants can analyze the same
and identify the exact cause of the job failure.
Hope this helps strengthen your understanding further on background jobs.

Batch job for billing


created by Santosh Verma on Jan 10, 2013 10:01 AM, last modified by Santosh Verma on Jan 10, 2013 7:11 PM
Version 3
inShare

Hi All
There are many Open discussion regarding Batch Job for Billing which inspired me to create this
document for associates who wants to understand how Batch job works in SAP ?How can we schedule Invoice in
background to automate the Billing Process.

There are the steps to Keep in Mind when want to automate the billing.

1.
2.
3.
4.

Create Billing Variant (VF04)


Create Job-Sm36 using Job Wizard
Recipient address for Spool list recipient.
Specify Start Condition
Scheduled

Released

Ready
Active
Finished
Cancelled

The job steps but no start


conditions have been defined.
The job definition is complete
and the job is waiting for the
start conditions to be fulfilled.
The job is in its start phase,
which normally takes only a
fraction of a second.
This status is of no interest for
the end user. However, it is
useful for error analysis by
SAP support.
The job is being executed.
The job is finished without
errors.
The job execution was
terminated due to an error.

5. Automated Job execution as defined in Start Condition


6. Check for Periodic or restriction for this job.
6. Report for Number of documents created and Error log.
1.

1. Create Variant for Invoice:Here you define the most suitable conditions or Pr-requisite to Generate the Invoice .it can be on Billing Type/Sales Org Level /Dis.
Channel or the combination of all.
VF04

Test 01 Variant Created .

2. Create Job:Job Wizard Tab- Create.

Click On Continue

Define if using ABAP program or External Program

To know the Program Name:VF04-SYSTEM-STATUS

ABAP- Program Step- Write the program name

Specify the Names, you want to send spool

Create Job Start Condition

Define if you want to run this Job Periodically or you have any restriction like (Sunday, Sat )etc.

Click on Continue

Status and my Own Jobs Can be checked in MY OWN JOBS

Here you can see how many jobs are active from individual user along with its status.
If you require to see the error log and Report for number of documents created after Job Run it can be traced via T-Code V.21
A.

V.21 :- Log for Collective Run.

Execute .it will show the screen along with number of documents successfully created along with error.

Select the Group and click on Documents. It will show you number of Invoices created.

Now Select the Notes or Shift+8. It will show you invoices with Error log.

You can also see the individual invoices and failing reasons so go ahead and do the required changes to get the invoicing done.
This is end of job scheduling in background .Please leave your valuable feedback.

3093 Views (edit) Products: sap_erp_sales_and_distribution Topics: enterprise_resource_planning

Average User Rating


(12 ratings)
My Rating:

Accessing the Background Processing System


Procedure
The table below shows how you can access the background processing system.

Point of
Departure

To Schedule a Program

The ABAP Editor Choose Program


You can start ABAP
Background.
programs and reports
either interactively or as
background jobs.

Result
The system
displays the ABAP
job scheduling
screen.

Elsewhere in the Choose System


The system
SAP System
Services Jobs Define job.
displays the
You can schedule an ABAP This is an alternative to job scheduling standard job
program or external
by way of the ABAP Editor.
scheduling
program as a background
screen.
job.
You can schedule
an internal (ABAP)
or external
program to run.
An SAP
application
Often, long-running
reports are scheduled
automatically or
semiautomatically for
background processing.

Choose the appropriate report using


the menu or a function key. The SAP
application schedules the report as a
background job.

Check the job log by executing the above program in sm37

Your program is
scheduled to run
in the
background.

Anda mungkin juga menyukai