Background job with immediate start

Hi,
In my program, I have to create a background job with immediate start. I used function module 'BP_JOB_CREATE', but it does not start immediately.
Can anybody provide sample code for immediate job start.
Regards,
Nitin

Hi,
Use these function modules.
JOB_OPEN
JOB_SUBMIT
JOB_CLOSE
in JOB_SUBMIT function module u can pass to start the job immediately in export parameters PRIPARAMS structure  field name PRIMM which has to be set to 'X' to start immediately.
regards,
Santosh Thorat

Similar Messages

  • Restrict background jobs to immediate execution

    Hello,
    we have got a central jobmanagment and want to restrict background jobs to immediate execution.
    Of course users should be able to send processes in the background, especially when creating a list needs a lot of performance. But users should not be able to plan these jobs to a time in future or perodically.
    So, in authorization object S_BTCH_JOB I didn't find a solution - just JOB_ACTION can be restricted to "RELE", so that a user needs a release from another user. This is not what we want.
    Is there a possibility to restrict the execution in background to the Option "immediate". The options "Date/Time", "After job", "After event", "at operation mode" should not be possible.
    Regards,
    Julia

    Hello Julius,
    with searchterm "BTCOPTIONS" I can't find suitable notes or anything else, even with a search machine.
    But I found thread Restrict periodic scheduling in SM37 which describes exactly this problem.
    So I will ask in that thread again, because there haven't been any news since may.
    Regards,
    Julia

  • Background Job with User Name

    I am trying to submit report program in background job. I want to submit it with specific user name so I am submitting with user name as 'ABC'  as below
    data: user type sy-uname.
    user = 'ABC'.
    SUBMIT z_program AND RETURN
                 WITH matnr = matnr
                 WITH werks = werks
                 USER user
                 VIA JOB jobname
                 NUMBER jobcount
    But it creates job with current user(sy-uname) running the program and  not 'ABC'. How I can change it for specified user?

    SUBMIT z_program AND RETURN
    WITH matnr = matnr
    WITH werks = werks
    USER user
    VIA JOB jobname
    NUMBER jobcount
    AND RETURN.    "you forgot to return back
    Of course the user should be the one existing in the system. I guess there is no such ABC. Find the one which exists (use i.e. su01).

  • Schedule background job with different user

    hi ,
    i want to schedule a background job under a different user
    i have used the parameter AUTHCKNAM of 'job_submit'
    it is giving sy-subrc = 0 .
    but it is not working
    i have also used the FM 'bp_job_create' in place of 'job_open'
    it is giving sy-subrc = 0 .
    but not working as needed
    kindly help
    regards...

    hi
    Try this
    We can do that via SUBMIT statement:
    Go through the documentation os SUBMIT statement with addition:
    ... USER user VIA JOB job NUMBER n
    Schedules the specified report in the job specified by the job name job and the job number n. The job runs under the user name user and you can omit the addition USER user. The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT). This addition can only be used with the addition ...AND RETURN.
    OR
    go through this link , i hope this ll help you to solve your problem
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5f/ff2138faeb3807e10000009b38f889/content.htm
    Hope this helps.
    Thanks
    Tushar

  • View All Background Jobs with Class A

    Hi All,
    We have around 500 Background jobs scheduled on PRD system (CI and on the  rest DI's),
    Our requirement is how to generate  a list with All the backround jobs w.r.t their Job class (Any method /T-code navigation, function etc) so that I can get all the 500 jobs segregated w.r.t their job class( sm37 wont give selection condition using job class)
    Thanks a lot  for  your  respoonses.

    Just pull the list from table TBTCO
    Regards
    Juan

  • Table name for background job with report, variant and step user id list.

    Hello All,
    I need to generate the list of scheduled backgroung job with the list of Report Name, Variant, Step User Id called. Please any one tell the SAP Table name from which I can get these data.
    Thanks in Advance,
    Amit

    Hi Rohit,
    Thanks for your reply. But from TBTCO, i can't find program/report name and variant. Just the list of background job i can see.
    Regards,
    Amit

  • How to run a background job with the cloud_scheduler package

    Hi,
    Is the cloud_scheduler package able to run background jobs as documented? When you try to run a job in another session using:
    cloud_scheduler.run_job(job_name=>'MYJOB', use_current_session=>false);
    The call fails with:
    ORA-20002: Cannot run job MYJOB. Adhoc background execution is disallowed. Please enable the job instead.
    If you try to use cloud_scheduler.enable to run the job then the job does not run when scheduled.
    Rod West

    Hi Rod,
    Yes, I believe so. Here's a test case that I just ran successfully from SQL Workshop in my database trial service:
    create table myjob_test (aa timestamp with time zone);
    begin
        cloud_scheduler.create_job (
            job_name        => 'MYJOB',
            job_type        => 'PLSQL_BLOCK',
            job_action      => 'begin insert into myjob_test values (systimestamp); commit; end;',
            repeat_interval => 'freq=minutely; interval=3' );
    end;
    begin
        cloud_scheduler.enable ( name => 'MYJOB' );
    end;
    select job_name, state, run_count, failure_count, last_start_date, next_run_date, systimestamp from sys.user_scheduler_jobs;
    select * from myjob_test order by aa;Is the next_run_date in the past for your job? If it is, try disabling/enabling the job to "reinitialize" the job's schedule.
    -- Vlad

  • Scheduling a background Job with gaps in dates

    Hi Experts,
    I am having a requirement : A background job has to be scheduled for running a program every 15 minutes and for every month.But this job should not run from date 10th to 15th of every month.For example,In july month Job should start run from 01.07.2014 to 31.07.2014 excluding 10.07.2014 to 15.07.2014.
    Can we achieve this without a custom program and using SM36?
    Regards,
    Arun.

    Hello Arun,
    is it possible to define a factory calendar to you in the system, if you can define one then you can define the 10-15 the of every month as holiday.
    We can select the factory calendar above defined in the job. This can be found by clicking on the restrictions button in the start condition screen.
    in that start date restrictions, you can find 5 options in those you can pick the do not execute the periodic job on sunday and holidays.
    but this will effect the sundays which are falling in 1-10 th & 15-31st of each month, will that be OK ?
    if you do not want to try out the above all steps, then you can simply create 2 job running for each month
    1st one for 1-10th of every month.
    2nd one for 16th to end date.
    Let us know in case of any concerns on the same.
    thanks,
    Bhaskar

  • Running background job with class type "A"

    Hi All,
    Can anyone let me know is it possible to run an background job in R/3 with class type "A" with respect to a specific info package. Thanks.
    Regards,
    Ashok

    I do not think this is possible (ie unless you think of modifying SAP code).

  • Background job with FTP

    Hi,
    I have devloped a program which takes the required data in internal table and places the file in FTP.
    When i execute it manually, the file gets placed properly, but when i schedule the program in background, the program gets executed but the file dow

    Hi,
    You Must be using RFC destination as SAPFTP, when you see go to SM59 -> TCP/IP -> SAPFTP & double click on SAPFTP, go to  Technical Setting tab, you have 4 option in Activation Type. Select Start on Application Server Option and then save the setting. Now test the Background job.
    Regards
    Sanjeev Pallan

  • Monitoring multiple background jobs with CCMS

    Hi,
         Can multiple background job be monitored with the help of CCMS.If yes then    is it adviseable to go ahead with that or not?
         Say the number of jobs to be monitored are 1000 in SCM.....
         If yes plz suggest me how the same can be done ?
    Regards
    Siddharth

    Yes Multiple jobs can be monitored using CCMS .. You dont have to monitor all the jobs , you can restrict it by entering the job name in ALBTCMON . The following link will be helpful
    http://help.sap.com/saphelp_nw04s/helpdata/en/1c/48803d48de0610e10000000a114084/content.htm
    Thanks
    Prince Jose

  • Can I schedule a program as a periordic background job with dynamic viarent

    Hello experts, Can I schedule a progarm as a periodic background job run every day with dynamic condition (current day), if can,how?
    Best wishes,
    Evan

    Hi,
    You can do this to get desired results:
    Write a small new program that calls the program that you need to run daily by using submit .
    The new program can give input of current date to the called program.
    Now you can schedule the new program as a daily batch job.

  • BDC in background job with file upload

    I create one report BDC for Mass Upload, in the foreground i select the file and its working fine. when i am assigning  to background the job is create and released but the code is not execute. when i see the logs it show the error "there is no file".
    what is the problem?
                 i create variants and i declare it in the job creation. i thing the file path is the problem. the file is in presentation server while assign to background job it can't able to pick the file.
                 My requirement is, i need to pick a file for my network path and upload it to the sap database using BDC. can any one help pls!!!
    Edited by: sudhakar.ssm on Jul 19, 2010 1:10 PM

    Mr . Bala Duvvuri
    i know that but my requirement is different. i need to open a file in my network path, there it have a folder called DATA there every day they put a file. i need to upload it into sap Database. for that can u help me... when i search it in google it say i need to create a interface code with RFC Destination....         
               like that can u gave me a solution pls...

  • Background job with download

    Hi
    Is it possible to set a program , that contains the download , in background?
    If so, how?
    Thank U
    Narendra

    hi,
    You cannot download to the frontend in a background job because the GUI isn't available.
    You will have to use OPEN DATASET stmts and
    put the file on the Application server in the background
    and then use the transaction CG3Y in the foreground to download the file to the pc from the application server.
    regards,
    priya.

  • How to display more than 255 chars in background job with ALV Grid ????

    Hi All,
    I am using ALV grid with OO.
    I have used call screen for ALV grid display. I have to display more than 255 characters in width. While running it, I can see the list perfectly.
    But in background mode, the list is truncated after 255 chars.
    Can anybody help how to send complete list(width more than 255 chars) to spool.
    Thanks and Regards,
    Neha

    Hi SAP fan,
    <b>YES you can run the ALV report in background mode.
    To run the report in background do F9 instead of F8, then give immediate and save.
    Now goto Sm35 goto job overview and view the job listed
    Choose the job and press the spool button. It will show the list created on the next page. When u clcik the list u can see the ALV output.
    To see this the job should be in the finished status.
    How to define Periodic Jobs
    1.Execute transaction SM36
    2.Define Job name, Job class, Target server
    3.Click on 'START CONDITION' button
    4.Click on 'Date/Time' button
    5.Enter Scheduled start DATE & TIME. Check mark 'Periodic Job' field. Click on 'Period values' button and select 'Hourly' or 'Dialy' or 'Weekly' or 'Monthly' or Other period and SAVE. Go back to main screen.
    6.Click on 'STEPS' button and enter Program name and Variant under box 'ABAP Program'. Click on 'Print Specification' button and enter Printer name under 'Output device' and SAVE
    7.Click on SAVE button until you get message on bottom of the screen that describes 'Job XYZ saved with status: Scheduled'.
    8.Click on 'Job overview' button or execute SM37 transaction.
    9.Select the appropriate 'Job name', 'User name', 'Job Status' & Schedule date under 'Job start condition' and click on 'Execute' button or press F8.
    10.You will now see all your scheduled JOBS.
    <b>Case: 2</b>
    You can Run in Background but make sure it is alv list, not alv Grid FM. if you are uisng alv list not problem , but if you are using alv grid then you can code like this..
    if sy-batch = ' '.
    call 'REUSE_ALV_GRID_DISPLAY'.
    else.
    call 'REUSE_ALV_LIST_DISPLAY'.
    endif.
    if you are using OO alv then write this code..
    CALL METHOD cl_gui_alv_grid=>offline
                    RECEIVING e_offline = off.
        IF off IS INITIAL.
          CREATE OBJECT g_custom_container
                 EXPORTING container_name = g_container.
        ENDIF.
    <b>Case: 3</b>
    if you are using OO ALV.
    Just before creating the custom container check for the following condition.
    Batch or Web Reporting
    IF cl_gui_alv_grid=>offline( ) IS INITIAL.
    CREATE OBJECT o_custcontainer
    EXPORTING
    container_name = lc_custcontrol
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    OTHERS = 6
    ENDIF.
    You can see the output in Spool in transaction SP01.</b>
    Good Luck and thanks
    AK

Maybe you are looking for