Defining Job with multiple steps

This is a general question on SM36.
I have 4 programs that need to run as part of a job. I do not want this as a periodic job because these 4 steps needs to be done by the user when needed.
I defined a job and created 4 steps and saved. system showed the job is scheduled and then I released it. All the 4 steps ran successfully.
Now if I want to run again the same job, system is prompting me to create the steps again. I do not want to do that every time i want to run the job. how can I save this 4 steps under a job and just call the job name to schedule immediately on demand/when needed?

Swathi,
Create the job, leave the job with a status of  'scheduled' (no start conditions).
When the user wishes to run the job:  SM37 > select your job; then Job > repeat scheduling. The user will have to determine the trigger; presumably it will be 'Immediate'; however, any of the normal selections are possible.
This activity will start a copy of your scheduled job.  Your job remains with a status of scheduled.
Since it is so easy for a user to make a mistake and inadvertently release your job, you might want to create a backup copy.  SM37 > select your job; then Job > copy.  This will give you a screen where you can create a copy of your job, but with a new name, such as <yourjobname>_BAK.
Best Regards,
DB49

Similar Messages

  • Schedule a Job with multiple steps via ABAP Program

    Hi Friends,
    I want to create a report(Ex: ZREP) that will run another program(Ex: ZPGM) in background. What I need to do is, when I execute the report ZREP it should run the ZPGM automatically in background. This background execution should happen through JOB with multiple steps.
    Why i am mentioned steps is, i have 1000 records in ZTABLE and need to execute 100 records each in one step and need to proecess in ZPGM with selection parameters. So in my case my job should create with 10 steps and need to execute in sequential manner.
    FYI, In the ZREP selection screen i need to enter the records count/ interval to derive the job steps.
    Please guide how to go ahead? Thanks in advance for all the help.
    Regards,
    Raghu.

    Hi Raghu,
    You can try the following pieces of code:
    Loop at gt_table.   "This table contains 100 records previously appended
    w_jobname = c_job_emision   "Job Name.
        CALL FUNCTION 'JOB_OPEN'
          EXPORTING
            jobname          = w_jobname
          IMPORTING
            jobcount         = w_jobacount
          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.
    * Perform or create T_SELTAB with parameters options
    PERFORM Create_seltab_table.
    *Call second program.
    SUBMIT ZREP WITH  SELECTION-TABLE t_seltab AND RETURN.
    *Close Job.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = w_jobacount
            jobname              = w_jobname
            strtimmed            = c_x  "Immediate Start
         EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    ENDLOOP.
    Hope this helps.
    Regards
    Ernesto
    PS: Raymond Giuseppi was faster.
    Edited by: Ernesto Caballero on Mar 10, 2010 1:57 PM

  • Schedule Jobs with multiple steps via ABAP Program

    Hi,
    I need to schedule multiple programs via background jobs on a daily basis. Since all these jobs are to be run as a single job, the various programs have to be run as steps in a major job.
    I am however not very clear on how this can be done via an ABAP program ( the idea of a program is that various parameters to be passed to each program in the step can be entered dynamically rather than via variants).
    I am using the JOB_OPEN and JOB_CLOSE functions and submitting the programs with selection screen parameters dynamically passed to create a job. I need to do this for various programs as a job step (WITHOUT Variants being defined).
    Can anyone suggest any ideas for this? I have tried out JOB_SUBMIT Function but am not very confident I know what exactly it is for as it asks for a variant.
    Thanks very much,
    Preet

    Hi Preet,
    just to be sure: you know, that variants can be dynamical, too?
    It's quite usual to assign dynamical current date, but it's also possible to add / subtract value and even define own functionality.
    Maybe it's easier to implement a dynamical selection and handle static jobs.
    If you try to plan a job (online or with JOB_SUBMIT), you have to use variants - you can create (or change) them dynamical in beforehand. Only SE38, F8, F9 is creating a temporary variant, so that no saved variant is necessary.
    But if you end up creating variants dynamical, you can change one existing variant, too. Then you can use a static job definition (with periodical starting rule).
    So: have a look, if dynamic variants are enough, otherwise change variants per job.
    Regards,
    Christian

  • Job with multiple event schedules

    Is it possible to create a job with multiple schedules? Can you have multiple schedule names?
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'my_new_job2',
    job_type => 'PLSQL_BLOCK',
    job_action => 'BEGIN SALES_PKG.UPDATE_SALES_SUMMARY; END;',
    schedule_name => 'my_saved_schedule, my_saved_schedule2'); <------------------ like this?
    END;
    thanks.

    I am using oracle 10g and have installed the file arrival package. I want my job to run when multiple files arrive. I have created the file arrival event schedules. I know i can create chain event steps to respond, but my chain has to be running for the steps to respond to the events. I want the chain (or rather the job that starts the chain) to kick off when 2 or more files arrive.
    thanks.

  • Job with multiple variant

    Dear Friends,
    I have some jobs which has many variants. So it possible to create a job with multiple variants or only option is to create job chain.
    Please suggest.
    Thanks in advance.
    Regards,
    Jiggi

    Hi,
    You can submit the same job with different variant, but that is your runtime.
    Limitation is that you can't migrate all these runtime jobs.
    It is better you create different jobs with different variants, so that you have frexibility to run them independently, monitor and troubleshoot them, also migrate them to next environment (QA or PRD). And you can still create a job chain using all these independent jobs if require.
    Only creating Job Chain would be useful only if you want to run them in parallel or in sequence. (Not if you want to run them independently).
    Hope this help.
    regards,
    Sunil Rohit

  • One job with two steps - how to create one single spool?

    Hello experts,
    I have created two queries in SQVI. One is based on the table BSIK, the other on on BSAK.
    The report layout is the same in both queries.
    Now I schedule one job in SM36/SM37 with two steps corresponding to my queries.
    I want my second step to append the spool created in the first step. Is that possible?
    In order to do this I unchecked "New spool request" in the request attributes for the second step of the job.
    I use the same printer, the same format (X_65_80), but it doesnt work.
    The help on the field says
    ".... name, output device, number of prints and the format must match..." - What "name" do they mean?
    "In addition, the existent spool order must not already be competed. This can occur if a spool is released for output...." - I use "send to SAP spooler only" option, is that what thay mean? How cen you have an "uncompleted spool" in the job.
    If anybody knows ho to do this (without development!), please advise
    Best regards,
    Fatima

    Hi,
    Please do following steps :
    1. Go to transaction code SM36
    2. Do as per below screen shots
    You can see Job steps is empty
    Click on (Check and Save)
    Next Screen
    You can see one step created
    Click on Create
    You can see above it is showing as Step 2
    Give again program name and variant
    Click on (Check and Save)
    You can see two steps are created
    Go back (green arrow)
    You can see know SAP is showing 2 Step(s) successfully defined which was earlier blank
    Click on
    Next Screen
    Now schedule job as per your requirement.
    Prerequisite create variants for both the programs as we need to mention the same .
    Hope, this solves your issue else revert.
    Regards,
    Tejas

  • How to define job with different username

    Friends,
    How can I define a job with another username . Or how can I change a job running with a user name to another username. Please advise.
    Thanks.

    You can change the ID of the user than is used to run each step of the job, but not the user that created the job. In SM37 go into the job of interest (the next scheduled job) choose Job -> Change. From here choose the steps and go into each job step by choosing Change, the first field in the pop-up holds the user ID that will be used to run that step when the job is executed.
    The user ID that created the job will still show in the SE37 job overview, it it nolonger plays an active part in the job.
    ~As found in forum

  • Creating Job with CmdExe Step failed with error Reason : 5

    Hi, I setup a job with Type = Operating System (CmdExec) and Run as 'SQL Server Agent Service Account' , it failed to run with Message below :
    Message
    Executed as user: PROD\sqlserveragent. The process could not be created for step 4 of job 0x5A83AE4A12AEF649888E85F4072604F6 (reason: 5).  The step failed.
    1. I couldn't find what is meaning of Reason 5 here.
    2. This step used to work previously and it 'not working' suddenly these few days. I wondering anyone make the changes but I am not able to trace it. Any guide to troubleshoot would be helpful.
    Thanks .

     Operating System ... (reason: 5).  The step failed.
    Operating System Error code 5 = Access denied, seems to be a permission issue.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • SQLPLUS: define variable with multiple lines

    Hi All,
    I need define a varaible with multiple lines as following:
    define schema_name = 'aaa',
    'bbb',
    'ccc';
    select * from tb_test where sName in &schema_name;
    However, it seems SQLPLUS dose not like the way I define the variable. What I want to do is to select * from tb_test where sName in ('aaa', 'bbb', 'ccc'). I would like to use multiple lines in the define.  Any suggestion?
    Thanks,

    Hi,
    If the substitution variable contains special characters, such as spaces or single-quotes, then enclosed the whole value in double-quotes, like this:
    DEFINE  schema_list = "'aaa', 'bbb', 'ccc'"
    If you really need linefeeds in the value, then you might have to use COLUMN ... NEW_VALUE (or OLD_VALUE) to set the value.  For example:
    COLUMN schema_list_col NEW_VALUE schema_list
    SELECT  '''aaa'', ' || CHR (10)
         || '''bbb'', ' || CHR (10)
         || '''ccc'''     AS schema_list_col
    FROM    dual;

  • Job with Multiple Schedule of same time & only one is executed, Why

    Hi ALL,
    I've Created a package to notify report in email  as excel, which is using a path to render report and save it as excel.
    This package was need to be schedule every first day of month and on every Friday even at morning 7 AM.
    So logically these are two events.
    But if we see on 1 May 2015 we have Friday and plus first day of month
    So technically this should fail.
    either for IO operation for render &
    storing data over same location with same file name.
    To replicate this i created two three schedule
    Below is the job history, job is invoked by only one schedule
    Question-
    1) Why one one schedule execute?
    2) why "sched2" only , it could be "sched3" only or "DentalOperationStackAndRank-Sched1" Only?
    Another this i result into error if different job executing same package at same schedule.
    FYI- package is deployed at database level
    HS

    Hi HS,
    As described in this
    article, more than one job can run on the same schedule, and more than one schedule can apply to the same job.
    And I make a test about your scenario, when configuring a SQL Server job with three schedules that reference same dates and times, my job behaves as yours that only one schedule is executed, but the job is invoked by schedule2 or schedule 3 in my environment.
    It is a normal behavior of SQL Server job in my opinion. For more details about such scenario, you can track the job following this
    blog.
    However, when I configure three jobs that run on the same schedule, everything works well and the three jobs all run successfully.
     I recommend you configure three different jobs that execute same package at same schedule .
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • User defined Variable with multiple value

    Hi Experts,
    customer requirement is the following:
    Build a layout in which to have in Lead Column the cost center characteristics, but not all cost center in master data but only those chosen by user with manual input. To achieve this goal i have created a variable of type characteristics (associatd to cost center CH) with replacement type "user defined values", then i have put this var in planning level. I have created a layout with Cost Center in Lead Column and set "all possible ch combination" in additional setting.
    Thanks to the varable created, the user can enter Cost Center value, but the problem is that he cannot select more than one single cost center value, for example:
    User want to see in layout CosCen1 and CosCen4, by now he can set variable in order to see the entire range from CosCen1 to CosCen4 (included all intermediate Cost Center) or to see only one between those 2 Cost Center, but it's not possible (or better i don't know how to..) to select both cost center and display the layout with ONLY those 2 Cost Center in Lead Column (CosCen1 and CosCen4).
    In other word, is it possible to set a variable with more than one single value without using range from-to?
    If not, does exist an alternative?
    Thanks in advance.
    Fabio

    Hi Fabio,
    It works as follows.
    let's say you have 3 multiple single lines for your cost center variable.
    once you are in the folder, select any single value & the layout is ready for planning with the corresponding cost center.
    now, select the "Cost center variable row" in the header of the folder within section "Name of Variable" & click on "Trash Can" icon to "Delete Selection" of variable.
    this basically deletes all the entered selections (3 entries) & displays for all.
    It works this way, because we don't have "resriction of values required by user".
    if am not wrong & correct me if am wrong,
    overall, this is nothing but equal to "planning level not restricted with any variable".
    I just tested this & the flaw in this is that, it is not only displaying for all the initially entered 3 lines but it displays for each & every cost center irrespective of the variable selections.
    hope it is clear.

  • Identify origin of job with multiple instances running

    Hello,
    I have this scenario.
    There is a job (JOBA) that has 2 steps. 
    The first step executes Home ZProg 'A' which will use data that is unique to this run. It will create some TVARV information related to this run. (job name and number)
    The second step executes SAP Prog B (RFEBKA00), which will submit a different Job (RFEBKA00-EL BANK STATEM), which, at a point, executes SAP Prog C (RFEBBU00).  This program will call User Exit ZXF01U01, which will read the TVARV table and use the information written by ZProgr 'A' .
    This would not be complicated at all, except for one issue:
    There could be more than one JOBA running concurrently, so the User exit somehow needs to identify if the current call of the User exit is coming from the correct JOBA.
    I hope that you can help me tosolve this problem.
    Thanks!

    I forgot to say that all these jobs run with just one Batch ID (00BATCH). 
    Having said that, I think that I got a solution.
    I think that by using a different Batch Id (00BATCH01) in JOBA and accessing table TBTCO from the user exit I can identify if the UE is being executed from the correct job, since the batch user id will be propagated when the new job is submitted.
    I think I can work with this option.
    If anybody knows of a different way.  Please go ahead and let me know.
    Thanks.

  • Any ideas on a cleaner way to write this? - run through a function with multiple steps; if any step fails, restart the function from the begining

    Basically there are 3 different functions for various "tests"; they each return "1" if the test passes and "0" on failure.  A "master" function calls these 3 functions in the desired order and keeps a counter
    of tests that pass.  The counter has to be 1 to proceed to step 2, has to be 2 to proceed to step 3, and when it's 3 the loop closes.
    This approach is giving the expected results, but I was wondering if anyone has ideas on a cleaner approach?  What I really wanted to accomplish was to have the 3 tests past in succession and to provide an overall pass and proceed to the next step;
    and also to exit the function if any step fails rather than running through each step before trying again.  If the script were to for example loop through the 3 tests and wait until each one passes, tests 1 and 2 might pass, but then 3 might fail
    a few times and finally pass before the script exits.  I did not want to allow for that scenario to count as an overall pass.
    Function Test1 {
    If PASS Return 1
    If FAIL Return 0
    Function Test2 {
    If PASS Return 1
    If FAIL Return 0
    Function Test3 {
    If PASS Return 1
    If FAIL Return 0
    Function TestAll
    [int]$counter = 0
    $Check1 = Test1
    If ($check1 -eq 1) {$counter++}
    If ($counter -lt 1) {Exit}
    Start-Sleep -s 15
    $check2 = Test2
    If ($check2 -eq 1) {$counter++}
    If ($counter -lt 2) {Exit}
    Start-Sleep -s 15
    $check3 = Test3
    If ($check3 -eq 1) {$counter++}
    If ($counter -lt 3) {Exit}
    Return $counter
    Do {$STATUSCOUNT = TestAll}
    While ($STATUSCOUNT -lt "3")

    This is cleaner:
    Function Test1 {
    If PASS Return 1
    If FAIL Return 0
    Function Test2 {
    If PASS Return 1
    If FAIL Return 0
    Function Test3 {
    If PASS Return 1
    If FAIL Return 0
    Function TestAll{
    while($true){
    while($true){
    $counter=0
    if(($counter+=Test1) -ne 1){break}
    if(($counter+=Test2) -ne 2){break}
    if(($counter+=Test2) -ne 3){break}
    return
    Write-Host ('try again' + $counter) -fore
    TestAll
    Of course all of your test functions have syntax errors.
    \_(ツ)_/

  • Recording with multiple steps captures in 1 slide!

    Hi,
    I've been recording Captivate demos for the last few days with no issues. Today, I launch Captivate, preceed to record and when I hit "End", Captivate edit screen shows 1 single slide! It captures the last action, which is clearly not enough. Whats going on? I didn't change any settings...
    Sabrina

    Not full motion. One slide appears, and its 3 seconds, despite my 1 min of recording.

  • Scheduling a job with multiple output formats.

    Urgent!!
    Basically while scheduling a job in BI Publisher we specify an output format. It can be PDF, CSV, HTML or so… Is there a way to specify more than one output format while scheduling a job.
    Thanks in advance.
    Ashok

    you have to re-publish them.
    for a run, you can have only one output .

Maybe you are looking for

  • Flash Charts - How to manipulate the #data# replacement string in XML

    I have a problem with the XML file for a flash chart. I am trying to display a 2dColumn chart of an SQL query with the general form: select null link, x as name, sum(y) as value from z group by (x); this generates multiple rows, which are displayed a

  • My screen flash in photo booth is not working..any help here?

    Even though that the screen flash is enable but everytime I try to use it...it's the same..i mean no flash effect at all. Any help guys?

  • How do I define a start point to Cover Flow, in OS X 10.6?

    I'd like it to display all my video's preview, after the first 5 seconds, instead of the very beginning. This was available in one of my office's Mac stations, but no one knows how it was defined to work that way... Thanks!

  • Meaning of WARNING

    I sent a complaint to Readers Digest using Safari and got the following: ERROR: register_globals is enabled in your PHP environment! Warning: Cannot modify header information - headers already sent by (output started at /home/kbrown21/public_html/wp-

  • Error in startup: SQL Writer

    Hi all, I got this error message everytime i restart my Lenovo T400. How do i resolve this problem? Error Details: SQL Writer SQLDUMPER library failed initialization. Your installation is either corrupt or has been tampered with. Please uninstall the