Schedule background Job Programatically at specified date and time

Hi Everybody,
how can i schedule a job  in background programatically for a spefic date and time ?
Thanks and Regards
srikanta

Hi Chandrasekhar,
my requirement is :
in selection screen there will be two run mode :
1) Run in Foreground
2) Run in Background
If user selects  ' Run in Background ' option , a block will open where user can give
job schedule date  and
job schedule time.
Based on this date and time program will be scheduled in background.
I have used like this :
CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname                = v_jname
        SDLSTRTDT              = p_date
        SDLSTRTTM              = p_time
      IMPORTING
        JOBCOUNT               = v_jcnt
     EXCEPTIONS
       CANT_CREATE_JOB        = 1
       INVALID_JOB_DATA       = 2
       JOBNAME_MISSING        = 3
       OTHERS                 = 4.
where v_jname is jobname
          v_jcnt   is jobcount
          p_date is  schedule date ( taken screen value)
         p_time is  schedule time ( taken screen value)
but the job is sxcheduling immediately
Give suggestion.
Thanks in advance.
Srikanta

Similar Messages

  • Schedule background job programatically

    Hi,
    I want to schedule background job programatically  .
    Also, I want to specify the scheduled start time & start date .
    Please suggest .
    Moderator message - This question has been asked and answered many times before. Please search before posting.
    Edited by: Rob Burbank on Apr 16, 2009 12:27 PM

    Hi
    Please check this link
    [http://help.sap.com/saphelp_46c/helpdata/en/fa/096ee5543b11d1898e0000e8322d00/frameset.htm]
    Thanks,
    Hari

  • There is something wrong with the volumes buttons in my macbook pro, every time i pressed the one who raises the volume, it leads me to the screen where (i do not no what its called) the background is black with the date and time and a calculator.

    There is something wrong with the volumes buttons in my macbook pro, every time i pressed the one who raises the volume, it leads me to the screen where (i do not no what its called) the background is black with the date and time and a calculator. However, when i lower it, my safari tab goes out of the screen. What do you guys think i should do? I'm getting very nervous.

    hey HAbrakian!
    You may want to try using the information in this article to adjust the behavior of your function keys to see if that resolves the behavior:
    Mac OS X: How to change the behavior of function keys
    http://support.apple.com/kb/ht3399
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • GoTodate goes to point at or NEAR (??) the specified date and time

    Hi,
    From documentation:
    " GoTodate goes to point at or NEAR (??) the specified date and time"
    so i want to know, please, what does it mean Near the specified time and the reasons about that
    Thank you in advance

    Hi Khaled,
    The exact time point depends on the history option for tracking changes to data in version-enabled tables,
    as set by the EnableVersioning procedure (or modified by the SetWoOverwriteOFF or SetWoOverwriteON procedure):
    NONE: The read-only view reflects the first savepoint after in_date (or the latest data in the workspace if there is no such savepoint).
    VIEW_WO_OVERWRITE: The read-only view reflects the data values in effect at in_date.
    VIEW_W_OVERWRITE: The read-only view reflects the data values in effect at in_date, except if in_date is between two savepoints and data was changed between the
    two savepoints. In this case, data that had been changed between the savepoints might be seen as empty. To ensure the most complete and accurate view of the data, specify the VIEW_WO_OVERWRITE history option when version-enabling a table.
    The following example scenario shows the effect of history option on data seen after gotoDate. Consider the following table:
    Employee( NAME varchar2(30) primary key, MANAGER_NAME varchar2(30));
    Now assume the following sequence of events:
    1. Time=t1: The row ( 'SCOTT', 'ADAMS' ) is inserted into the table Employee.
    2. Time=t2: Savepoint SP1 is created.
    3.Time=t3: The MANAGER_NAME value for SCOTT is changed to Baxter.
    4.Time=t4: The time point that will be specified as in_date (in step 7) occurs.
    5.Time=t5: The MANAGER_NAME value for SCOTT is changed to Chang. (Thus, the value has been changed both before and after in_date since the first savepoint and before the second savepoint.)
    6.Time=t6: Savepoint SP2 is created.
    7.Timw=t7: A DBMS_WM.GotoDate(t4) operation is xecuted, specifying the time point 't4' in step 4 as in_date.
    The data seen after gotoDate for different history options is as follows:
    NONE: The row ('SCOTT', 'Chang') is seen. This is because the first savepoint after the specified instant is SP2. Note that in this case, after step 5 the versioned table has two rows for the primary key 'SCOTT': ('SCOTT', 'ADAMS') and ('SCOTT', 'Chang').
    VIEW_WO_OVERWRITE: The row ('SCOTT', 'Baxter') is seen.
    After step 5 the versioned table has three rows for the
    primary key 'SCOTT':
    ('SCOTT', 'ADAMS'),
    ('SCOTT', 'Baxter') and
    ('SCOTT', 'Chang').
    This is because each change is done in a new copy of the row.
    VIEW_W_OVERWRITE: No row is seen for 'SCOTT'.
    The updates in steps 3 and 5 are done in the same copy of the row, and the update in step 5 overwrites the update in step 3. As a result, after step 5 the versioned table has two rows for the primary key 'SCOTT':
    ('SCOTT', 'ADAMS') and ('SCOTT', 'Chang').
    Since the value in effect at the specified instant (i.e., 'Baxter') has been overwritten,no row is shown for 'SCOTT'.
    Regards,
    Ram
    Workspace Manager Group

  • How do I programatically set the date and time of my FP-2000 in LabVIEW RT?

    I checked out the following knowledgebase document which has a tool for setting the system time, but I also need to set the date:
    http://zone.ni.com/devzone/explprog.nsf/ 6c163603265406328625682a006ed37d/ 37175dbc3696a1ac86256a850051097d?OpenDoc ument
    How can I do this?
    -Jim

    That is great, Steven. I also found a solution using GetSystemTime and SetSystemTime which are functions in kernel32.dll that get and set the system date-time. This function call worked on the FP-2000 that I have and should work on RT-Embeded systes, as well.
    -Jim
    Attachments:
    GetSystemTime.vi ‏16 KB
    SetSystemTime.vi ‏14 KB

  • How to capture the date and time of  a background job

    Hi experts,
    How to capture the date and time of  a background job?
    How to find whether it is runned succesfully or not?
    If it is not successful how to put error message?
    ASAP
    Thanx in advance,
    Sudha

    To Display the STATUS of the JOB which is exectued in background
      CLEAR : wa_jobsteplist.
      REFRESH : i_jobsteplist.
      WRITE:/ 'DISPLAYING JOB STATUS'.
      CALL FUNCTION 'BP_JOB_READ'
        EXPORTING
          job_read_jobcount           = w_jobcount
          job_read_jobname            = w_jobname
          job_read_opcode             = '20'
        JOB_STEP_NUMBER             =
       IMPORTING
         job_read_jobhead            = wa_jobhead
       TABLES
         job_read_steplist           = i_jobsteplist
    CHANGING
       RET                         =
       EXCEPTIONS
         invalid_opcode              = 1
         job_doesnt_exist            = 2
         job_doesnt_have_steps       = 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.
    To Display the status text as per the status type
      CASE wa_jobhead-status.
        WHEN 'S'. WRITE: / 'Scheduled'.
        WHEN 'R'. WRITE: / 'Released'.
        WHEN 'F'. WRITE: / 'Completed'.
        WHEN 'A'. WRITE: / 'Cancelled'.
        WHEN OTHERS.
      ENDCASE.

  • Date and time for background job

    Hi,
    I am creating a program with out selection screen . This program runs based on date and time . so I need to create a table
    with date and time fileds.
    Program runs based on FROM DATE FROM TIME  TO DATE  TO TIME....... FROM DATE and FROM TIME  will get it from ztable and TO DATE & TO TIME values as SY-DATUM & SY-UZEIT. In the end I will update sy-datum and sy-uzeit values in the custom table to get the values ( Use it for from date from time ) for next run of the program.
    This program is mainly used for background job so how do we get the values of from date and from time for the first run of the program ? how do we update the latest date and time details by deleting old date and time details.
    Thanks ,
    Vinay.
    Edited by: Vinay parakala on Apr 22, 2010 9:18 AM

    First of all, I'll suggest to maintain TVARVC instead of doing it in custom table unless you need a complete log.
    As per my understanding, you are trying to fetch some records based on the time period(Delta loads).
    So, you will do an initial run to load the complete data then you will run it for time periods. For example,
    1st Load- 01/01/1991(earliest date possible) - today's date say 03/22/2010
    2nd load- 03/22/2010 - today's date
    so on............
    You have to move the to date values to from date values and to date value needs to be updated by the latest one for each load.
    Do you have any dependency on background job? Please let me know if my understanding is correct or specify your requirement in detail.

  • How to transport variants and scheduled background jobs

    Hi all
       Could anyone let me know if  variants be transported .
       also can scheduled background jobs transported.
    Thanks in advance

    Hi,
    Run the program RSTRANSP and give the name of the program and the variant name.
    It will create a transport request for the variant.
    the rest of the process is the same as is the case with all other transport requests.
    Regards,
    Raghu
    Message was edited by:
            Raghu Reddy

  • Schedule background job

    There is a background job that currently runs every 1 min.
    How can we schedule it to run only from 9am to 6pm everyday?
    (Could not find any options in SM36 for that one!)
    Any inputs will be highly appreciated.
    Thanks
    Prasad

    Prasad,
    Please follow the below steps:
    1. Go to SM36 give the job name i.e. ZABC_MYJOB
    2. Click on Steps (Upper left corner - 2nd Button) and assign the ABAP report name .i.e. RSUSR002, Check and Save.
    3. Click on Start Condition (Upper left corner - Ist Button), click Date/Time and specify the Start Date and Time.
    4. Select "Periodic Job"  and click on Period values now click on Other Period
    5. Now input 1 in the Minute Box. , and check and save.
    6. Again Check and Save. and Again Check and Save.
    7. Now save the job.
    This job will run after every 1 minute.
    Thanks
    LK

  • Error in Schedule Background Job for Deadline Monitoring of swu3

    While Auto Customization swu3 i am getting error message 'Output device "" not known' in 'Schedule Background Job for Deadline Monitoring'
    Please advice what could be cause of it

    the earlier problem of background job was solved by changing the  output device assigned to user wf-batch .
    regarding the transport request :
    when i was trying to execute the step : "Schedule bakgrd for missed deadlines " MANUEL it was giving me an option of SAVE AND SCHEDULE . which was creating the transport request . but when i executed it automatically it worked fine without asking a request to me ... i don't know why )-: ... probablly we can specify a different interval then the standard of three minutes and which will be transported (it's just a guess) . i have  executed it  automatically ...
    well thanks all for u r help

  • Is it possible to delete a running background job programatically?

    Hi Gurus,
    is it possible to delete a running background job programatically? if yes how can we do that?
    Thanks in advance

    Or as sais by Sandeep you can use that fm.
    Before calling that select the required data from table TBTCO and pass to the fm.

  • Schedule Background Job :  Remove delivery Block in Sales order

    Hi Gurus,
    I have a requirement to select all sales orders as per a condition and remove delivery block at
    VA02-> Go to -> Header -> Status
    For that I have to write a program which will be run only in background and i have to schedule background job for the same.
    I have a parameter at selection - No of records
    If no of records = 500 , I have to submit 500 jobs ie one job each for each sales order for removing delivery block.
    I need to know
    1) Which function module/bapi I can use to remove delivery block at sales order header level.
        For blocked delivery the status is 'BSTK" . to remove block i need to change status to "RSTK".
    2) How to schedule a background job for my program and how to submit one job each for each sales   order.
    Regards
    Avi.

    Hi Avi,
    Would like to seek for your advice. I am facing the same scenario too which is to delete the delivery block but is deletion of the delivery block is done in the user exit MV45AFZZ. The subroutine which needs to have the extra logic of deleting the delivery block is USEREXIT_SAVE_DOCUMENT_PREPARE.
    Need your advice on how do you solve this scenario? Thanks in advance.

  • Schedule background job using system variant

    Dear gurus,
    We're planning to schedule background job using system variant, for example, current fiscal year and current posting period (transaction AFAB). Is it possible? So for example, for this month, "Posting Period" value will be 6, and then next month will be 7.
    Can you tell me how to do this, if I want to set up the schedule only once?
    Thanks for your help.
    Best Regards,

    done using abap

  • Schedule Background Jobs

    Hi
    Gurus
    What is Schedule Background Jobs and whatu2019s the use of Schedule Background Jobs
    How it will worku2019s
    Please give me detail Information about Schedule Background Jobs
    Many Thanks
    Mahi

    Hello Mahi,
    The BackGround job - "Program" thats runs in SAP Server and not depend any user interface.
    like Antivirus program on your local station that runs (scaning your computer all the time)  without any user interface (becide tray Icon) and unless you going to Running Proccess on your computer you don't know that it working.
    Schedule BackGround Job its any backGround Job that you schedule to run any time you want and you can make it run recursivly.
    you can go to Transaction SM36 to schedule your Programs.
    Good Luck
    Eli Steklov
    Please Reward Points if it Helped

  • Schedule Background Job whenever new message WVINVE

    Hi All,
    I have following requirment:-
    Schedule Background Job with a ABAP program,
    whenever new message type WVINVE posted in SAP inbound.
    I am confused in "Event" which i select in SM36.
    Or, is there any other method to trigger a background report, whenever WVINVE03 IDOC posted in SAP system & create physical Inventory document.
    regards
    Umesh

    For triggereing a background job, when ever a message type WVINVE is posted. You need to create a
    Background Job with the the program and mark the Job Event periodic. Secondly you need to trigger that event from the Inbound processing program or Function module which processes the message type using the Function module <b>BP_EVENT_RAISE</b>. so when ever a message type is processed it will trigger the event which inturns trigger the Job.
    Hope this will Help.

Maybe you are looking for

  • Emagic mt4 and intel iMac does not work with 10.4.5

    Hi there, after updating my iMac on 10.4.5 my MT4 does not work any longer. It is still shown in the system profiler! But that`s it! After I`ve installed the latest driver (emagic v1.7), it was not shown in the audio/midi preferences. On my G4 with 1

  • REPORT TO CHECK DIFFERENCE G.R DATE AND U.D DATE FOR A INSP LOT

    Hi I want to track how many dates it has been taken to clear a insp lot for a G.R. So I am looking for a report which shows these days or a report which have G.R date and U.D for inspection lot. Please guide if there are any reports for this. Thanks

  • Crashes once week to a blue screen

    The PC crashes for example while reading a webpage and displays a blue screen that Windows has found error and shutdown to prevent damage, then it reboots. Happens randomly perhaps once every week in the last months. Drivers are checked. Event manage

  • Is it normal to have a letter J engraving on the corner of my macbook pro near the LED indicator?

    I just noticed this while cleaning mac. I'm just wondering what it means.

  • Cookie from a servlet?

    hi i cant able access my cooke from servlet can any body help me out here below the code ================================== import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class PrintCookies extends HttpServlet public vo