Skip to Content
author's profile photo Former Member
Former Member

Program Run at Server

Dear All experts,

Do anyone know any ideas how to we set the program run at server ? Even though we close our pc ...

Let take a simple example ..... i got program with a screen ,which creat at se80 with two button , "Start " n "Stop". When i press the star button , the time start couting .... after i off my pc , but the program is running with couting at server without stop counting ... Next day , i open back this program .. the couting still running , it will STOP when i press stop button

Normally the program will terminate when we close our pc rite ? Now i want to make my program continue running when I close my pc.

Thanks for help...

Thanks .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Sep 18, 2009 at 03:43 AM

    You can do this way.

    If sy-ucomm eq 'START'.
      call function JOB_OPEN . " So background job will created
      ..
      ..
      call function SUBMIT_JOB
    ...
    ..
      call function JOB_CLOSE
    ..
    ..
    

    Then store the job name in a custom table

    Then you switch on your PC again

    if sy-ucomm eq 'STOP'
    CALL FUNCTION 'BP_JOB_ABORT' " with job name from custom table
    

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 18, 2009 at 03:44 AM

    if possible you will run the program in background mode... in any selection screen give your values and hit F9 to execute in background.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2009 at 04:30 AM

    first thing about running at server we call it as background program scheduled... so create a back ground job we use tcode SM36. and SM37 to display it.

    and from your program, where you have that start and stop button you can trigger a background job which will start counting

    and on press of stop you can close the background job and see the result.

    though i think its easy to calculate time by storing it in some ztable when you press start and when you press stop just retrieve that value and calculate the time difference...

    case sy-ucomm.
      when 'START'.
         ztable-time = sy-datum.
         insert ztable.
       when 'STOP'.
         select time from ztable up to 1 rows.
               timediff = sy-datum - ztable-time.
               write : timediff.
          endselect.
          delete ztable. "->the database table is free again to start a new time,
    endcase.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.