Background Job Scheduling

Hi,
  I am scheduling a report to run in background.
In this report it is creating background jobs automatically for different company codes.
It submits the 1st background job and waits until it finishes.
Then 2nd job starts in background and continues with other jobs.
At end it finishes all the jobs and closes.
Now my problem is.
1.       Whether is it possible for us to submit all the jobs at 1 time. And execute at same time. Ie., 1st, 2nd job will start at same time.
2.       If possible how can we do that.
What I have written is
loop at companycode.
Create job name.
call fun 'Job_Open'.
submit xxxx user sy-uname via job job_name numer job_count
to sap-spool
spool parameters l_spool_parameter
without spool dynpro
with companycode
with ......
and return.
endloop.
Please help ASAP, urgent.

hi praveen,
Job Scheduling Explained
Definition
Before any background processing can actually begin, background jobs must be defined and scheduled. The scheduled time for when a job runs is one part of the job’s definition. There are several ways to schedule jobs:
From Transaction SM36 (Define Background Job)
With the "start program in the background" option of either Transaction SA38 (ABAP: Execute Program) or Transaction SE38 (the ABAP editor)
Through the background processing system’s own programming interface. (Many SAP applications use the internal programming interface to schedule long-running reports for background processing.)
Through an external interface.
Scheduling Background Jobs   
Use
You can define and schedule background jobs in two ways from the Job Overview:
·         Directly from Transaction SM36. This is best for users already familiar with background job scheduling.
·         The Job Scheduling Wizard. This is best for users unfamiliar with SAP background job scheduling. To use the Job Wizard, start from Transaction SM36, and either select Goto ® Wizard version or simply use the Job Wizard button.
Procedure
       1.      Call Transaction SM36 or choose CCMS ® Jobs ® Definition.
       2.      Assign a job name. Decide on a name for the job you are defining and enter it in the Job Name field.
       3.      Set the job’s priority, or “Job Class”:
·         High priority:      Class A
·         Medium priority: Class B
·         Low priority: Class C
       4.      In the Target server field, indicate whether to use system load balancing.
·         For the system to use system load balancing to automatically select the most efficient application server to use at the moment, leave this field empty.
·         To use a particular application server to run the job, enter a specific target server.
       5.      If spool requests generated by this job are to be sent to someone as email, specify the email address. Choose the Spool list recipient button.
       6.      Define when the job is to start by choosing Start Condition and completing the appropriate selections. If the job is to repeat, or be periodic, check the box at the bottom of this screen.
       7.      Define the job’s steps by choosing Step, then specify the ABAP program, external command, or external program to be used for each step.
       8.      Save the fully defined job to submit it to the background processing system.
       9.      When you need to modify, reschedule, or otherwise manipulate a job after you've scheduled it the first time, you'll manage jobs from the Job Overview.
Note: Release the job so that it can run. No job, even those scheduled for immediate processing, can run without first being released.
Specifying Job Start Conditions
Use
When scheduling a background job (either from Transaction SM36, Define Background Job or CCMS ® Jobs ® Definition), you must specify conditions that will trigger the job to start.
Procedure
Choose the Start condition button at the top of the Define Background Job screen.
Choose the button at the top of the Start Time screen for the type of start condition you want to use (Immediate, Date/Time, After job, After event, or At operation mode) and complete the start time definition in the screen that appears.
For the job to repeat, check the Periodic job box at the bottom of the Start Time screen and choose the Period values button below it to define the frequency of repetition (hourly, daily, weekly, monthly, or another specific time-related period). Then choose the Save button in the Period values screen to accept the periodicity and return to the Start Time screen.
Once you’ve completed specifying the job start conditions, choose the Save button at the bottom of the Start Time screen to return to the Define Background Job screen.
No job can be started until it is released, including jobs scheduled to start immediately. Since releasing jobs can be done only by a system administrator from the job management screen (Transaction SM37) or by other users who have been granted the appropriate Authorizations for Background Processing, no unauthorized user can start a job without explicit permission
Managing Jobs from the Job Overview
Use
The Job Overview, or Job Maintenance, screen is the single, central area for completing a wide range of tasks related to monitoring and managing jobs, including defining jobs; scheduling, rescheduling, and copying existing jobs; rescheduling and editing jobs and job steps; repeating a job; debugging an active job; reviewing information about a job; canceling a job's release status; canceling and deleting jobs; comparing the specifications of several jobs; checking the status of jobs; reviewing job logs; and releasing a job so it can run.
Procedures
To display the Job Overview screen, choose CCMS ® Jobs ® Maintenance or call Transaction SM37. Before entering the Job Overview screen, the system first displays the Select Background Jobs screen. You'll need to complete this Job Selection screen to define the criteria for the jobs you want to manage. Once you've selected jobs to manage, you can choose from a wide range of management tasks:
To copy a single existing job, choose Job ® Copy.
To reschedule or edit job steps or attributes of a single job, choose Job ® Change. A job step is an independent unit of work within a background job. Each job step can execute an ABAP or external program. Other variants or authorizations may be used for each job step. The system allows you to display ABAP programs and variants. You can scan a program for syntax errors. You can also display the authorizations for an authorized user of an ABAP job step.
To repeat a single job, choose Job ® Repeat scheduling.
To debug an active job, choose Job ® Capture: active job. Only a single selection is allowed. If an active job seems to be running incorrectly (e.g., running for an excessively long time), you can interrupt and analyze it in debugging mode in a background process, and then either release it again or stop it altogether.
You will be able to capture a background job only if you are logged on to the SAP server on which the job is running. To find server information in the Job Overview, select and mark the job, then choose Job ® Job details.
To review information about a job, choose Job ® Job details. Details displayed can include:
current job status
periodicity, or the repetition interval
other jobs linked to the current job, either as previous or subsequent jobs
defined job steps
spool requests generated by the current job
To cancel a job's "Released" status, select the job or jobs from the Job Overview list and choose Job ® Release -> Scheduled.
To cancel a job from running but keep the job definition available, select the job or jobs from the Job Overview list and choose Job ® Cancel active job.
To delete a job entirely, select the job or jobs from the Job Overview list and choose Job ® Delete. Jobs with the status of Ready or Running cannot be deleted.
To compare the specifications of more than one job, select the jobs from the Job Overview list and choose Job ® Compare jobs.
To check the status of jobs, select the job or jobs from the Overview Job list and choose Job ® Check status. This allows you to either change the job status back to Planned or cancel the job altogether. This is especially useful when a job has malfunctioned.
To review job logs, select a job or jobs with the status Completed or Canceled from the Job Overview list and
regards
karthik
reward me points if helpfull

Similar Messages

  • Internal error occurs in background job scheduling

    Hi Experts,
    We are facing an error message "Internal error occurs in background job scheduling" while trying to execute a custom report(Z report) in background in SA38.
    Please find the following observation on our side on this message.
    1) This message is not coming for only one report not for others.
    2) SU53 screen shot shows that SE38 check is failed, but the weird thing is not happening for other report.
    3) Persons having SE38 auhtorization are able to run this report.
    Please advise.
    Thanks in advance,
    Viven

    What is the message ID and number? Have you tried OSS search and debugging?
    What does this program do, in a nutshell?

  • Regarding Background Job scheduling for file to file scenario

    Hi Guru's
    Good morining all of u
    I have one doubt on ...
    can we do background job scheduling for file to file scenario?
    Please give me response as early as possible.
    thanks and regards
    sai

    background jobscheduling for file adapter...
    you can schedule the file adapter according to your requirement as follows:
    In the  Communication Channel Monitoring Locate the link Availability Time Planning,  In Availability Time Planning, choose the Availability time as daily and say create, give the time details, select the communication channel in your case file adapter , goto the Communication Channels tab and filter and add the respective channel, save it
    /people/shabarish.vijayakumar/blog/2006/11/26/adapter-scheduling--hail-sp-19-

  • About Background job scheduling

    One file will be coming from oracle system. it would be stored at a particular path.
    I want to schedule for background job processing. how to do.

    Hi,
    You need to write a Program to place the file in the Application server, then only you can schedule a background job, you need to use the OPEN dataset, CLOSE DATASETS to do this one, then you can schedule the job .
    To schedule a job in the background job, look at the below links
    Re: background job schedule
    http://aspalliance.com/1129_Background_Processing_SAP_R3_System
    Regards
    Sudheer

  • Hi any one please explain background job scheduling

    Hi any one please explain background job scheduling . Good answer can be rewarded.
    Thanks

    Background jobs are pgms that are scheduled to be run in the Background without user interaction. So this can be done only for Type 1(executable) Program and not for Module-Pool Programs. Typically, a variant is defined and the pgm is run using the same.
    The transaction code is sm36 -Define Background job. Using the Start Condition tab you can define when you want the job to run (specific time or if it has to follow after a particular job is done etc.,) Using the Step tab you can assign the pgm name and variant.
    After the job is scheduled, you can check the status in sm37, along with the Job log and Spool.
    For more info:
    http://help.sap.com/saphelp_bw30b/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm

  • Background job scheduling for report

    Hi can any one explain me how to do background job scheduling for report periodically for every 15 min.

    Hi Rajesh thanks for your brief explanation.
    but I am new to abap so I can't understand exactly will you please make it clear for the below program
    REPORT  zklj.
    data: begin of itab occurs 0,
          partner  type but000-partner,
          type     type but000-type,
          BU_SORT1 type but000-BU_SORT1,
          end of itab.
    select partner type from but000 into table itab.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = 'd:\al1\ahaj.xls'
        FILETYPE                        = 'DAT'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = ' '
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = '400'
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
      WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
      SHOW_TRANSFER_STATUS            = ABAP_TRUE
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab.

  • Background job scheduling problem in APO

    Hi fellow SDNers,
    i am going through this peculiar problem of background job scheduling:
    scenario is like , i have an CSV (excel file) in aplication server which would load data into the infosource, which i have scheduled to run in backhround (in infopackage) ,after event is triggered (option in scheduling tab of infopackage...THE SCHEDULING OPTIONS)
    now everything seems to be fine.. but the data is not getting loaded...?? could u lease help me out..how to load data from excel file (in background), after an event gets triggered.
    thanks in advance,
    Rohan

    hi Alexander,
    i am triggering the event from BP_EVENT_RAISE FM in APO  by passing the  event id... this would automaitically raise the event...just like sm64
    Thanks
    Rohan

  • What is the spool, what is its role in background job scheduling

    Hi,
    I want to know what is meant by Spool request and spool number generated.
    Tell about transaction SP01.
    How it is linked to Background job scheduling.
    thanks.
    sam.

    Hi,
    Refer this link.
    https://www.sdn.sap.com/irj/sdn/inf?rid=/library/uuid/7a5f4061-0a01-0010-c9bc-a4e4cb100438
    About SP01.
    Printing does not work in SAP. There is a printer definition for your local printer, but it does not work. Presuming that you use the program SAPLPD on your computer.
    Boot your computer and start only the SAPLogon and the SAPLpd program.
    Delete all of your old print jobs in the SAP system (Transaction SP01).Generate only one new print job.
    Check that there is enough resource in your computer. Check the free memory (Win 3.1x) and the free disk space (The lists are temporarily saved on your disk).
    Open the SAPLPD and read the print log in the window. The printer definition must correspond with the parameters shown here.
    Check that the standard printer is on the same lpt (Win 3.1: Control panel, Printer) as defined for the printer (usually lpt1).
    In Transaction SP01 read the protocol of your print job. Do not generate new print jobs! Wait till the SAP system changes the status of the print job.
    If you can not find the print job in SP01 anymore, then the print job was successfully printed out. If it didn't come out on your printer and the SAPLpd didn't indicate an incoming print job, then the connection was realised with another PC. Then SAP printer definition you used, does not correspond with your computer.
    Scheduling Background Jobs:
    1.        Background jobs are scheduled by Basis administrators using transaction SM36.
    2.        To run a report in a background, a job needs to be created with a step using the report name
    and a variant for selection parameters. It is recommended to create a separate variant for each
    scheduled job to produce results for specific dates (e.g. previous month) or organizational units (e.g.
    company codes).
    3.        While defining the step, the spool parameters needs to be specified
    (Step-> Print Specifications->Properties) to secure the output of the report and help authorized users
    to find the spool request. The following parameters needs to be maintained:
    a.        Time of printing: set to u201CSend to SAP spooler Only for nowu201D
    b.        Name u2013 abbreviated name to identify the job output
    c.        Title u2013 free form description for the report output
    d.        Authorization u2013 a value defined by Security in user profiles to allow those users to access
    this spool request (authorization object  S_SPO_ACT, value SPOAUTH).  Only users with matching
    authorization value in their profiles will be able to see the output.
    e.        Department u2013 set to appropriate department/functional area name. This field can be used in
    a search later.
    f.        Retention period u2013 set to u201CDo not deleteu201D if the report output needs to be retained for more
    than 8 days. Once the archiving/document repository solution is in place the spool requests could
    be automatically moved to the archive/repository. Storage Mode parameter on the same screen
    could be used to immediately send the output to archive instead of creating a spool request.
    Configuring user access:
    1.        To access a report output created by a background job, a user must have at
    least access to SP01 (Spool requests) transaction without restriction on the user
    name (however by itself it will not let the user to see all spool requests). To have
    that access the user must have S_ADMI_FCD authorization object in the profile with
    SPOR (or SP01) value of S_ADMI_FCD parameter (maintained by Security).
    2.        To access a particular jobu2019s output in the spool, the user must have
    S_SPO_ACT object in the profile with SPOAUTH parameter matching the value used
    in the Print Specifications of the job (see p. 3.d above).
    3.        Levels of access to the spool (display, print once, reprint, download, etc) are
    controlled by SPOACTION parameter of S_SPO_ACT. The user must have at least
    BASE access (display).
    On-line reports:
    1.        Exactly the same configuration can be maintained for any output produced
    from R/3. If a user clicks u201CParametersu201D button on a SAP Printer selection dialog, it
    allows to specify all the parameters as described in p. 3 of
    u201CScheduling background jobsu201D section. Thus any output created by an online report
    can be saved and accessed by any user authorized to access that spool request
    (access restriction provided by the Authorization field of the spool request
    attributes, see p. 3.d of u201CScheduling background jobsu201D section).
    Access to reportu2019s output:
    1.        A user that had proper access (see Configuring user access above) can
    retrieve a job/report output through transaction SP01.
    2.        The selection screen can be configured by clicking u201CFurther selection
    criteriau2026u201D button (e.g. to bring u201CSpool request name (suffix 2)u201D field or hide other
    fields).
    3.        The following fields can be used to search for a specific output (Note that
    Created By must be blank when searching for scheduled jobu2019s outputs)
    a.        Spool request name (suffix 2) u2013 corresponds to a spool name in p. 3.b in
    u201CScheduling background jobsu201D section above).
    b.        Date created u2013 to find an output of a job that ran within a certain date range.
    c.        Title u2013 corresponds to spool Title in p. 3.c in u201CScheduling background jobsu201D
    section above).
    d.        Department - corresponds to spool Department in p. 3.e in u201CScheduling
    background jobsu201D section above).
    4.        Upon entering selection criteria, the user clicks the Execute button   to
    retrieve the list of matching spool requests.
    5.        From the spool list the user can use several function such as view the
    content of a spool request, print the spool request, view attributed of the spool
    request, etc. (some functions may need special authorization, see p.3 in
    Configuring user access)
    a.        Click the Print button   to print the spool request with the default attributes
    (usually defined with the job definition). It will print it on a printer that was
    specified when a job was created.
    b.        Click the u201CPrint with changed attributedu201D button   to print the spool request
    with the different attributes (e.g. changing the printer name).
    c.        Click the u201CDisplay contentsu201D button   to preview the spool request contents. A
    Print    and Download   functions are available from the preview mode.
    Exporting the Contents of a Spool Request
    Use
    You want to export the contents of a spool request as a text file to the SAP GUI working directory or to a directory of your choice. The content of the spool request is downloaded as plain text without, for example, graphics, images, or specific fonts.
    The following procedures are irrelevant for the PDF-based form printing integrated as of SAP Web Application Server 6.40, since the print data can be opened and stored as a PDF. See also Displaying and Printing PDF-Based Forms.
    Procedure
    Exporting to the SAP GUI Working Directory:
    Choose Spool Request ® Forward® Export as Text.
    The entire text is stored in your SAP GUI working directory in ASCII format.
    A file of this type is named using the following pattern:
    .txt
    Example: ABC0000004327.txt
    You require appropriate authorization for this function.
    Exporting to a Directory of Your Choice:
    With this method of exporting a spool request, the content of the spool request is first displayed and you then download the screen list as a text file to the directory of your choice.
           1.      Select the spool request to be exported and choose  Display Contents.
           2.      In the case of SAPScript/Smart Forms documents, activate list display by choosing Goto.
           3.      Choose System ® List ® Save ® Local File.
           4.      Choose one of the available formats and confirm your choice.
           5.      Choose a directory and save the spool request.
    By default, only the first 10 pages of a spool request are saved in a file. You can increase the number of pages to be saved by choosing Goto ® Display Requests ® Settings and making the desired entries in the Display Area group box.

  • Data capturing in background job scheduling

    HI,
    I hava a specific requirement in background job scheduling.
    in my layout i have to show <b>pagenumber / total number of page numbers.</b>
    for that iam useing a variable with value '$$$' and iam replacing this variable with total number of pages..
    when we run in foreground it is working fine. but in background the variable is not being replaced..
    how can i modify the data in spool..

    REPORT ztest no STANDARD PAGE HEADING
                                     MESSAGE-ID zfi
                                     LINE-COUNT 65(1)
                                     LINE-SIZE 165.
    DATA:        v_sum(3)  TYPE c VALUE'$$$'.
    CONSTANTS:  c_slash    TYPE c VALUE '/'.        "Stores /
    parameters : p_1 type c.
    START-OF-SELECTION.
      WRITE : 'Hi'.
      SKIP 80.
      WRITE : 'Helloo'.
    END-OF-SELECTION.
    *To print the total no. of pages in report heading.
      PERFORM f_replace_totpage.
      TOP-OF-PAGE
    TOP-OF-PAGE.
    Display Standard Report Header
      PERFORM f_report_header.
    *&      Form  f_replace_totpage
         To print the total no. of pages in report heading.
    FORM f_replace_totpage .
      DATA: l_tot_page(3) TYPE c,
            l_pgcnt TYPE i,
            l_licnt TYPE i VALUE '3'.
    Assign value of total number of pages into l_tot_page.
      l_tot_page = sy-pagno.
    To replace the value of v_sum ($$$) by total number of pages after
    reading the content of fourth line of each page.
      WHILE l_pgcnt LE l_tot_page.
        l_pgcnt = l_pgcnt + 1.
        READ LINE l_licnt OF PAGE l_pgcnt.
        REPLACE v_sum WITH l_tot_page INTO sy-lisel.
        MODIFY LINE l_licnt OF PAGE l_pgcnt.
      ENDWHILE.
      CLEAR: l_tot_page,
             l_pgcnt,
             l_licnt.
    ENDFORM.                    " f_replace_totpage
    *&      Form  f_report_header
          Report Header display
    FORM f_report_header.
      FORMAT COLOR 1 INTENSIFIED ON.
    Text-246 - Page:
    WRITE:/1 text-247, 45 text-241, 110 text-242, 150 space.
    WRITE:/1 text-243, sy-repid, 110 text-244, sy-datum, c_slash, sy-uzeit,
             150 space.
      WRITE:/1 text-245, sy-uname, 110 text-246, sy-pagno,c_slash,v_sum,
             150 space.
      FORMAT COLOR OFF.
      ULINE.
    ENDFORM.                    " f_report_header

  • Background Jobs scheduled through ABAP Editor

    Dear SRMer's
    System Info : SRM 5.0
    Can you please let me know what is the tcode to check Background jobs scheduled through the ABAP Editor(SE 38) or through SA38 tocdes in SRM.
    Points will be rewarded for answers.
    Thanks in advance,
    Bobby

    Hi Bobby,
    Try this steps...
    1.  Log on to the appropriate SAP instance and client as either the user ID owning the job or an administrator ID.
    2.  Go to transaction SM37.
    3.  On the Simple Job Selection screen, fill in the Job name field or use any of the screens filtering options to produce a list from which you can see the job you want to view.  In order for all occurances of a job to be viewed, all statuses of the job should be checked “on”.  Click on the Execute button.
    Regards
    Rajesh.

  • Doubt on background job scheduling

    Hi all,
    I have one background job scheduled where vf03 tcode is executed.
    I want to know what are the documents updated through this backgroung job schedule.
    Can i know thru SM37 what r the documents updated in the table by running this background job?
    Regards
    cnu

    Hi
    Take the PROGRAMNAME from the table TBTCP related to Background job and
    from the program logic it will be known that what tables are get updated.
    generally when we are using VF01/02 tcodes the tables like VBRK and VBRP are get updated.
    Reward points for useful Answers
    Regards
    Anji

  • Background job scheduler

    Hi,
    How to check the background job scheduler is running / activated ? Is it a Dialog process? where to see the program name? ( RSBTCSEXE ?)
    Thanks,
    Raj

    Hi Ruchit,
    Thanks..I have already gone through some of the OSS Note, including 923228. My problem is, I am unable to confirm, if my system is using program RSBTCSEXE or it is changed to dynamic scheduler per note-923228. I dont see entry in BTCOPTIONS table for dynamic scheduler.
    Which ID program RSBTCSEXE is running  and where to check?
    Thanks,
    Raj

  • Background Job Scheduling Status

    Hi All,
    I have a requirement in which I want to schedule background jobs using SUBMIT for different Company Codes.
    Consider there are 3 company codes (U001, U002 and U003). In this case there will be a main job for U001 and another job for U002 is dependant on the first job (U001) and this U002 will get executed immediately the U001 is completed successfully. If unsuccessful, next job need not to be run. Also I have to keep the main program active till all jobs finishes.
    Kindly help me with getting the status of the job run which will decide the next job run.
    Thanks
    Natasha Garg

    SUBMIT ZXXXX AND RETURN. "main job for U001
    IF SY-SUBRC = 0.    "means job is success.
        SUBMIT ZXXXX AND RETURN. " job for U002
    ENDIF.
    NOTE:
    We can not keep the success fully finished job as active for the next job to get succed.
    To do Same, we can create a job using JOB_OPEN and make the same run in different steps. So the second step (U002) runs if the first step (U001) is success. It suits for your requirement.
    Edited by: Thomas Zloch on Dec 20, 2010 10:33 AM - please use code tags for code only

  • Background Job Scheduling of Program RSEIDOC2

    Hi Folks,
    Can we schedule program RSEIDOC2 as background job? This program is used by Transaction Code WE02.
    If it is possible then please let me know how can i do the same. Currently I am trying to schedule this with SM36 but when executing with SM37 then it is moving to canceled status. So please let me how it can be done??
    Thanks and regards,
    Siddarth

    Please refer to the SAP documentation [Scheduling Background Job|http://help.sap.com/saphelp_nw70ehp2/helpdata/EN/c4/3a7f87505211d189550000e829fbbd/frameset.htm]
    Regards
    Suresh

  • How to Cancel a ACTIVE background Job scheduled in SM37.

    Hi Friends,
    I have scheduled a Background job. The job is ACTIVE now. How can I cancel this job?
    Regards,
    Viji

    There is a last ditch method for jobs that don't get canceled for some reason or the other
    Go to SM50 - first try canceling the job from there
    If that doesn't work, note down the Process ID (PID) of the job
    Take direct OS access to your system (You would need your Basis person for this) and terminate the job
    If the server is Windows based, you can end it using the task manager and end that process id

Maybe you are looking for