How can we let the program run in backgroud automatically?

normally,we need to find peak off time run big program
that read pooled table and slowly.
How can we let the program run in backgroud automatically?
BTW:before that pop a window just give runner a notice.

Here is an example, try this one.
REPORT ztest.
PARAMETERS: p_vbeln LIKE vbak-vbeln,
            p_bkrun NO-DISPLAY.
DATA: ls_vbak LIKE vbak.
DATA: v_answer,
      v_jobcount LIKE tbtcjob-jobcount.
  IF p_bkrun IS INITIAL.
*-- not background processing
    CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
         EXPORTING
              textline1      = 'This may time out.'
              textline2      = 'Do you want to run in background?'
              titel          = 'Warning!!!'
              cancel_display = space
         IMPORTING
              answer         = v_answer.
    IF v_answer = 'J'.
*-- run in the background
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname          = 'ZTEST'
           IMPORTING
                jobcount         = v_jobcount
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
*-- submit the program in the background
      SUBMIT ztest
        WITH p_bkrun = 'X'
        WITH p_vbeln = p_vbeln
        USER sy-uname
        VIA JOB 'ZTEST' NUMBER v_jobcount AND RETURN.
*-- close the job
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                jobcount             = v_jobcount
                jobname              = 'ZTEST'
                strtimmed            = 'X'
           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 'W' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      EXIT.
    ELSE.
      CLEAR v_answer.
    ENDIF.
  ENDIF.
  CHECK v_answer IS INITIAL.
  SELECT SINGLE * FROM vbak
                  INTO ls_vbak
                 WHERE vbeln = p_vbeln.
  IF sy-subrc <> 0.
    WRITE:/ 'Invalid Order Id.'.
  ENDIF.
END-OF-SELECTION.
  CHECK v_answer IS INITIAL.
  IF p_bkrun IS INITIAL.
    WRITE:/ 'Here is the result running the program in foreground.'.
  ELSE.
    WRITE:/ 'Here is the result running the program in background.'.
  ENDIF.
  WRITE:/ ls_vbak-vbeln,
          ls_vbak-vkorg.

Similar Messages

  • How can I let the program pause 3 second?

    Please tell me the method and how to write the program!

    Put this in your code :
    Thread.sleep(3000);

  • How can I let the program stop 3 second?

    as title

    try {
      Thread.sleep(3000);
    }catch(InterruptedException ex) {
    }This works, but is very simplistic. We can't advise you better without more information.

  • How can I make a program run in the background?

    I'm working on a custom console program. I plan to have the commands as seperate applications and create a server/client relationship so they can communicate with each other. However whenever I call a command I don't want to have a console window pop up, flicker out, etc. I want it to look like it's one complete app. So I'm wondering how can I have the app run in the background?

    If you're using a unix system, use the "&" argument (or character, what is its name anyway?) at the end of the command line.
    I think you can use javaw in the MS-Windows world.

  • How can I start the program without the run button

    How can I start the program the instant i open the vi?
    without the use of Run.
    Thanks
    Solved!
    Go to Solution.

    Under vi properties, execution, click run when opened like in Jeff's screen capture below . Don't post any code set to run when opened to the forums!
    =====================
    LabVIEW 2012

  • A gap between letters started to show in my indesgn files. tried to undo with tracking, the paragraph settings. nothing helped. it ruins the fluent view of the document. how can i restore the program so that doesn't happen?

    a gap between letters started to show in my indesign files. tried to undo with tracking, then with the paragraph settings. nothing helped. it ruins the fluent view of the document. how can i restore the program so that doesn't happen?
    for example: say i write a paragraph. then, in a weird some sort of way an involuntary gap suddenly appears between different letters of random words(i did not recognize any pattern to the gap appearing) throughout the entire paragraph. once i've double clicked on that paragraph, and made a minor change, lets say tapped a 'space' key, and then clicked ctrl+z to undo, it has aligned(or fixed) the entire paragraph and made it look ok again. i've tried numerous ways to undo the entire thing, but cannot find the reason. i've been working for a few years and there's no reason why this thing all of a sudden should happen right now.
    if anyone has stumbled on something like that and can advise, i would welcome it.
    MNS-KG
    Vadim

    yep...i'm typing with hebrew. i'll make a printscreen with the settings you've asked for@:
    if you look closely you'll see that almost every line has a single letter apart. in hebrew there is no usually a singe letter structured words.

  • PSE remains active in background after exit. How can I stop the program completely?

    PSE remains active in background after exit. How can I stop the program completely?
    Is there any command line option to force PSE to stop completely after exiting the GUI?
    Opening the Windows Task Manager and killing the PSE process is not a solution!
    (Context: I want to start PhotoshopElementsEditor.exe from another program with an image filename as command line argument. This other program waits in background until PhotoshopElementsEditor.exe has finished and pops up again after that. Since PhotoshopElementsEditor.exe continues to run silently in background, the other program will never come back.)

    Hi - having the same problem with PSE process not ending on exit. Have you had any luck in resolving the issue?
    Any advice would be appreciated. TIA

  • I would like to read a text file in which the decimal numbers are using dots instead of commas. Is there a way of converting this in labVIEW, or how can I get the program to enterpret the figures in the correct way?

    The program doest enterpret my figures from the text file in the correct way since the numbers contain dots instead of commas. Is there a way to fix this in labVIEW, or do I have to change the files before reading them in the program? Thanks beforehend!

    You must go in the labview option menu, you can select 'use the local
    separator' in the front side submenu (LV6i).
    If you use the "From Exponential/Fract/Eng" vi, you are able to select this
    opton (with a boolean) without changing the labview parameters.
    (sorry for my english)
    Lange Jerome
    FRANCE
    "Nina" a ecrit dans le message news:
    [email protected]..
    > I would like to read a text file in which the decimal numbers are
    > using dots instead of commas. Is there a way of converting this in
    > labVIEW, or how can I get the program to enterpret the figures in the
    > correct way?
    >
    > The program doest enterpret my figures from the text file in the
    > correct way since the numbers contain dots instea
    d of commas. Is there
    > a way to fix this in labVIEW, or do I have to change the files before
    > reading them in the program? Thanks beforehend!

  • How can I find the program which is calling my SAPscript??

    How can I find the program(std/Custom) which is calling my SAPscript form??
    Regards,
    Shashank.

    Hi
    check in NACE transaction or TNAPR table
    reward points to all helpful answers
    kiran.M

  • How can I set the program to automaticaly send recieved email addresses to my address book?

    As the question asks, how can I set the program to automatically add new email address from messages to my address book. Other email programs can be set up to do this. If this can't be done in Firefox, why not. It's the best email program otherwise.

    First off Firefox is an Internet browser and does not deal with email addresses or have an address book to add them to. Secondly I cannot think of a good reason to add the address of each piece of spam to the Thunderbird address book.
    There are addons that will pick out addresses from incoming email and add them to the Thunderbird address book. I suggest you search through the add on list for one that fits your needs.

  • I took out a trial of Fireworks CS6, but for some reason a .dll file has been deleted off my computer. How can I download the program again?

    I took out a trial of Fireworks CS6, but for some reason a .dll file has been deleted off my computer. How can I download the program again?

    Hello
    you could have a look there Download CS6 products
    Hans-Günter

  • I have Lotus Traveler installed on my S5. It's having problems and I want to uninstall it but I'm unable to. How can I uninstall the program?

    I have Lotus Traveler installed on my S5. It's having problems and I want to uninstall it but I'm unable to. How can I uninstall the program?

    Are you unable to uninstall it from the app manager in the main settings menu?  How about long pressing the app in the app drawer and dragging up to the notification bar?  Does the app have a phone admin property checked in Settings-Security-Phone administrators?  Sometimes, if it does, apps will not uninstall until unchecked.

  • How can I organise the program dashboard the way that it does not open automatically and very quickly other programs?

    How can I organise the program dashboard the way that it does not open automatically and very quickly other programs?
    Thanks for an answer
    Reinhard Voegele
    Switzerland

    If you hold down the option key while in dashboard you can close many of the programs.
    To disable it from opening automatically, or unintentionally:
    1) go to System preferences -> mission control.
    2) Deselect any mouse shortcuts
    3) Remove it from hot corners, if it is active.

  • I downloaded the free trial for Adobe XI Pro but now I cant find it on my computer or figure out how to use it. The only thing I see that downloaded is Adobe Download Assistant. How can I access the program?

    I downloaded the free trial for Adobe XI Pro but now I cant find it on my computer or figure out how to use it. The only thing I see that downloaded is Adobe Download Assistant. How can I access the program?

    Assistanttolindsey the Adobe Download Assistant will download the installation files for Adobe Acrobat Professional XI.  By default they are saved to your download folder.  You can begin the installation process from there.

  • How can i compile the program?

    hi,everybody:
    I have a program which include the next statments:
    public void println(boolean flag)
    throws IOException
    Object obj = lock;
    obj;
    JVM INSTR monitorenter ;
    print(flag);
    newLine();
    obj;
    JVM INSTR monitorexit ;
    break MISSING_BLOCK_LABEL_26;
    Exception exception;
    exception;
    obj;
    JVM INSTR monitorexit ;
    throw exception;
    how can i compile the program?
    thanks

    Hi,
    I'm trying to figure out how to use this decompiler, I have downloaded it to windows 2000 platform and it unzips to 1 file with extension "1-bin" - OS doesn.'t know what to do with and neither do I ;) - I'm starting out on something here and this tool would be useful.
    Thanks for any install instructions you might have.
    mufc1999
    Hi,
    I've had a similiar problem with decompiling certain
    classes. Try the following decompiler,
    http://jrevpro.sourceforge.net, after using this one,
    the code decompiled fine, this tool is also a
    disassembler and quite a nifty one i might add. :)
    Hope this helps!
    Have Fun!

Maybe you are looking for