2007 Jul 30 1:01 PM
what is difference between background and fore ground processing of a report. what are the various methods to execute a report in back ground. and when we need schedule a report in back ground how shall we handle selection screen parameters.
thanx in advance.
2007 Jul 30 1:03 PM
<i><b>Hi
Purpose</b></i>
SAP background processing automates routine tasks and helps you optimize your organizations SAP computing resources. Using background processing, you tell the SAP System to run programs for you. Background processing lets you move long-running or resource-intensive program runs to times when the system load is low. It also lets you delegate to the system the task of running reports or programs. Your dialog sessions are not tied up, and reports that run in the background are not subject to the dialog-step run-time limit that applies to interactive sessions. For more information, see Background Work Processes Explained.
The SAP System offers sophisticated support for background processing. You can choose from a variety of methods for scheduling and managing jobs. You can run both SAP-internal and external programs. And, for easier scheduling and management, you can run related programs as job steps within a single background processing job, allowing a single background job to accomplish a complex task that consists of multiple processing steps.
The system includes sophisticated tools for managing jobs and diagnosing problems that occur, including a graphic monitor and a powerful and easy-to-use job programming interface for developing your own background-processing applications. There is also a job scheduling wizard that automates basic background job definition and can walk novice users through the entire process.
Finally, the background processing system has an interface to external management tools so you can integrate your SAP background processing into an external tool. Certified implementations of this interface are available for several external system management tools.
<b>Monitoring Background Processing</b>
You can track background processing activity in your SAP System with both list-oriented and graphical monitors.
<b>The list-oriented monitor (Transaction SM37)</b> offers an administrator full control over background processing. From the main monitor screen, you can display current status and job details, change or withdraw scheduling and releases, display job logs, and use debugging and error-analysis tools. With appropriate authorization, you can also display the spool requests generated by ABAP job steps
<b>The graphical monitor</b> (Transaction RZ01) is specialized for system operators. It provides a Gantt-chart view of background processing, showing all completed, active, and released jobs on a timeline across all available background servers and work processes and tracking previous job performance so that repeated jobs are always shown with Gantt chart lengths that reflect previous run times
Background processing is done using SM37.
To handle selection screen elemets, you can define dynamic variants for it.
Thanks & regards
Ravish Garg
<b>REMEBER REWARD POINTS IS THE BEST WAY TO SAY THANK YOU</b>
2007 Jul 30 1:05 PM
Hi,
<u><i>Background Processing</i></u>
There are two ways for you to handle,
one manually setting up the job through SM36 which is better and convinient,
secondly through program using FM's JOB_OPEN, SUBMIT, JOB_CLOSE.
Find below steps in doing both:
Procedure 1:
1. Goto Trans -> SM36
2. Define a job with the program and variant if any
3. Click on start condition in application tool bar
4. In the pop-up window, click on Date/Time
5. Below you can see a check box "Periodic Job"
6. Next click on Period Values
7. Select "Other Period"
8. Now give '15' for Minutes
9. Save the job
In SM37 u can check the status of the jobs that u have assigned to background...
Here u mention the job name or the report name to check the status of the job...
After mentioning the job name or program name u just execute it.. ( without any name also u can execute then it gives u all the jobs set by your user name..
the status colud be released,active,finished etc..
Procedure 2 via Program:
Below is a sample code for the same. Note the ZTEMP2 is the program i am scheduling with 15mins frequency.
DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
L_RELEASE(1) TYPE c.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = 'ZTEMP2'
IMPORTING
JOBCOUNT = P_JOBCNT
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SUBMIT ZTEMP2 VIA JOB 'ZTEMP2' NUMBER P_JOBCNT
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
WITH DESTINATION = 'HPMISPRT'
WITH IMMEDIATELY = SPACE
WITH KEEP_IN_SPOOL = 'X' AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = P_JOBCNT
JOBNAME = 'ZTEMP2'
STRTIMMED = 'X'
PRDMINS = 15
IMPORTING
JOB_WAS_RELEASED = L_RELEASE
EXCEPTIONS
CANT_START_IMMEDIATE = 1
INVALID_STARTDATE = 2
JOBNAME_MISSING = 3
JOB_CLOSE_FAILED = 4
JOB_NOSTEPS = 5
JOB_NOTEX = 6
LOCK_FAILED = 7
INVALID_TARGET = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope the above helps you.
Regards
Reshma
2007 Jul 30 1:05 PM
Hi,
In background processing, the SAP System automatically runs any report or program that you can start interactively.
When you schedule a job in the background processing system, you must specify:
The ABAP report or external program that should be started
The start time
The printing specifications
The background processing system starts your job and runs the program(s) that you specify. Afterwards, you can check whether your job was executed successfully and display a log of any system messages.
<b>Running a report in the background does not tie up the SAP sessions you are currently working with</b>.
When you start a report interactively, your current SAP session is blocked for further input for as long as the report runs.
When you start the report in the background, running the report does not influence your interactive work with the SAP System.
<b>You can shift the execution of reports to the evening or other periods of low load on the SAP System.</b>
You can schedule a report or external program to run at any time that the SAP System is active. You can also set up reports to run automatically on a regular basis (for example, on the last day of each month).
<b>Background processing is the only way you can execute long-running jobs.</b>
To prevent tying up system resources with interactive sessions for long reports, the SAP System has a built-in time limit on interactive sessions. If a single ABAP report runs for more than 5 minutes continuously in an interactive session, the SAP System terminates the report automatically.
The background processing system executes long-running ABAP reports more efficiently. Often, such reports are automatically scheduled for execution in the background. In this case, you do not need to schedule them for background processing yourself.
http://help.sap.com/saphelp_nw2004s/helpdata/en/4a/2d513897110872e10000009b38f889/content.htm
Regards
Sudheer
2007 Jul 30 1:05 PM
Background jobs run in a background work process that is different from dialog work processes. Background processing lets you move long running or resource-intensive program runs to times when the system load is low.
Here are the few points for consideration:
1. Limited Run Time: The Dialog work process has a run-time limit that prevents users from interactively running especially long reports. By default, the system terminates any dialog work process in a transaction that exceeds 300 seconds. Although this limit can be changed by Basis consultants but this is recommended. And if we talk about Background work process, there is no such limit applies to it.
2. Background work processes allocate memory differently than dialog work processes so that background work processes can become as large as they need to in allocated memory to allow for processing large volumes of data.
Regards,
Pavan
2007 Jul 30 1:05 PM
Hi
We use Background processing to utilise the system resources correctly
Certain reports which will display huge data may consume lot of system time
so if we run those reports during the day time in fore ground it will consume time and slow down the system causing the users inconvience.
So we generally schedule those kind of reports to run in the night time by setting the time correctly
see the doc
Create a Variant for the Program and
Schedule JOB in background:
Go to SM36 create a Job
click on Start Condition
Click on DATE and TIME enter date scheduled Start and END times
click on Period Values
Click on HOURLY/WEEKLY etc
CLick on RESTRICTIONS also to use further criteria.
so your job will be scheduled and run as per your requirement.
and in SM37 Transaction check the status of that JOB
Check this link for scheduling jobs..
http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
<b>Reward points for useful Answers</b>
Regards
Anji
2007 Jul 30 1:05 PM
2007 Jul 30 1:05 PM
At transaction SE38 click Program -> Execute -> Background.
In order to execute your program in the background, you need to specify a variant.
You can schedule the program to run once at a certain time or periodically every month, week, days, hours or minutes.
Regards,
Pavan
2007 Jul 30 1:06 PM
background is used when u want to post data to SAP without user interaction where as foreground is used to post data to SAP with user interaction...
CALL Transaction can be both background as well as foreground
Normally, Session methods are background jobs.
2007 Jul 30 1:06 PM
hi
The basic difference between foreground and background is,
foreground means, the process execution is shared between your SAP GUI session on your local PC and the application server. Whereas background process uses the resources of application server, i.e., runs on application server.create background job:
example
CALL TRANSACTION 'F-02' USING bdcdata MODE 'E' UPDATE 'S'
MESSAGES INTO messtab.
hope it clears ur doubt
plz dont forget to reward points if useful
2007 Jul 30 1:10 PM
hi
This link may be helful to you
http://help.sap.com/saphelp_nw04/helpdata/en/73/69ef3055bb11d189680000e829fbbd/frameset.htm
<b>reward points if helpful</b>
Regards
2007 Jul 30 1:13 PM
Hi,
see help.sap.com
http://help.sap.com/saphelp_nw04s/helpdata/en/d1/f4f3393bef4604e10000000a11402f/content.htm
a background job is a way of assigning tasks which take a long time to run to time slots when the load on the server is low. so these tasks dont run immedietly.
All the best !!
Regards
Aparna