Check The Job Status

Hi SAPsimhas,
My requirement is as below.
I will loop through an internal table and create some files with background processing method.(JOB_OPEN,SUBMIT & JOB_CLOSE)
Now once this job is triggered I need to check the status for that job after maximum 10 mins. Its not neccessary that each job will take 10 mins. only,It can be finished in 2 mins also.
Once the job is finished then I will XCOM that file.
So my question is how to code such timer which will check the job status for that job? I have a FM BP_JOB_READ which returns the job status.
Reply is highly appriciated.

Try this way
  do.
    call function 'SHOW_JOBSTATE'
      exporting
        jobcount         = p_jobc
        jobname          = p_jobn
      importing
        aborted          = v_aborted
        finished         = v_finished
        ready            = v_ready
        running          = v_running
        scheduled        = v_scheduled
      exceptions
        jobcount_missing = 1
        jobname_missing  = 2
        job_notex        = 3
        others           = 4.
    if v_aborted eq 'X'.
      exit.
    endif.
    if v_finished eq 'X'.
      select single * from tbtcp into wa_tbtcp1
                 where jobname eq p_jobn
                   and jobcount eq p_jobc.
      if sy-subrc eq 0.
        move wa_tbtcp1-listident to p_spono.
      endif.
      exit.
    endif.
    if v_count le 10.
      call function 'ENQUE_SLEEP'
        exporting
          seconds = 60.
      v_count = v_count + 1.
    endif.
  enddo.

Similar Messages

  • URGENT : Error 5 when checking the job status

    Hello Forum,
    While monitoring the Process Chains in BW 3.1, I got the following message in the <b>Information </b>Pop-up:
    <b>Error 5 when checking the job status</b>
    Could you please tell me what it means?
    Thank you,
    its my duty to assign points,
    raj

    Hi,
    Are you able to view the log after refreshing and clicking the tick mark button on this message or is it not letting you go into the log itself.
    Can you directly go to Log view thru Tcode RSPCM and see. Once you are inside try to find where exactly the process failed.
    Thanks,
    JituK

  • T code to check the job run status

    Hi Gurus,
    I am filling the setup tables for inventory, but i didn't run in background. I clicked on execute button, but suddenly i got disconnected from net and my server also.
    Now i have to check the job run status whether it is running or not.
    Request you to provide the suggessions.
    Thanks & Regards,
    Saketh

    Hi,
    if you ran job in background you can see at SM37.use proper time ,date and use id to get your job.
    if you ran on frond end then you won't see job.if your job was completed then you can see data at SE11 by using setup table name or you can see at t code NPRT by using name of the run.
    if you won't find your job then just delete your setup tables again and fill it.
    No issues.
    Thanks

  • Is there exist report to check the job start date restriction calendar ID?

    Hi There,
    In SM37, there are many jobs list there. If we choose one job of them, and click Jobchange, then we access in the screen for change the job status. Then click button Start condition, and there is a dialog which name is Stat time will pup up. And click button Date/Time, there will be a new button appears in the bottom. Click Restrictions, You will see a new dialog box which name is Star Date Restrictions. There is a field which name is Calendar ID in selection portion Factory calendar.
    Is there exist one report to check all the jobs calendar ID instead of to check one by one?
    Thanks!

    Hi,
    please have a look into table TBTCO, restricting by field CALENDARID.
    I hope this helps. Kind regards,
    Alvaro

  • TF244069: An error occurred while checking the provisioning status of the reporting database schema for a PWA instance.

    The command TfsAdmin ProjectServer /RegisterPWA causes next error:
    TF244069: An error occurred while checking the provisioning status of the reporting database schema for a PWA instance.
    Project Server returned the following error: "Server was unable to process request. ---> The request failed with HTTP status 401: Unauthorized.".
     (type ProvisionException)
    Exception Stack Trace:    at Microsoft.TeamFoundation.Sync.Provisioning.ProvisionPwaDBSchema.HandleSoapException(SoapException soapException, String errorResourceString)
       at Microsoft.TeamFoundation.Sync.Provisioning.ProvisionPwaDBSchema.IsDBSchemaProvisioned()
       at Microsoft.TeamFoundation.Sync.Provisioning.ProvisionManager.Provision()
    I installed SharePoint 2013 and Project Server 2013 as farm and TFS 2012 and my account has permissions everywhere. I read article
    http://msdn.microsoft.com/en-us/library/gg412653.aspx and gave full permissions for TFS account to SQL and Project, Project app pool account to SQL, but still have an error.
    How can I find out what exactly permissions are not enough???

    The problem was in claims authentication. Changed to Windows and all worked out.

  • What are the possible values for the JOB status?

    What are the possible values for the JOB status in the table TBTCP and significance for each?

    Hi,
    Have a look at include LBTCHDEF.
    The standard include from SAP.
    -> Definitions and Constants for Function group BTCH
    Kind Regards
    Raymond

  • When I try to sign into iCloud from Windows PC I get the message "You can't sign in because of a server error." When I check the iCloud status, all is Green.

    When I try to sign into iCloud from Windows PC I get the message "You can't sign in because of a server error."  When I check the iCloud status, all is Green.  What is the fix?

    Hi spillgar,
    If you are having issues signing in to iCloud from your Windows machine, you may find the following articles helpful:
    iCloud: Account troubleshooting
    http://support.apple.com/kb/ts3988
    iCloud: If you can’t sign in to iCloud.com
    http://support.apple.com/kb/ph2611
    Regards,
    - Brenden

  • How can I check the return status of a request using URLConnection?

    Hi,
    I am using the classes URL and URLConnection to connect to a remote server and make a POST request. The code extract is:
    URL u = new URL("http://.....");
    URLConnection con = u.openConnection();
    con.setDoInput(true);
    con.setDoOutput(true);
    con.setUseCaches(false);
    con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
    DataOutputStream out = new DataOutputStream(con.getOutputStream());
    out.writeBytes(........);
    out.flush();
    out.close();
    Next, I would like to check the return status of my request. I need to see if the server returned status 200 (OK) or an error (e.g. 404). Is there a way to check this?
    If you are aware of another way I can achieve this whole thing I would be grateful if you could let me know.
    Thanks very much for your help!

    URLConnection doesn't have a getResponseCode
    method...
    But I found a link
    http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_
    id=4191207
    that helped me found out that there is another class
    called HttpURLConnection:
    ((HttpURLConnection)conn).getResponseCode( )You should read the API:
    http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html#openConnection()
    "If for the URL's protocol (such as HTTP or JAR), there exists a public, specialized URLConnection subclass belonging to one of the following packages or one of their subpackages: java.lang, java.io, java.util, java.net, the connection returned will be of that subclass. For example, for HTTP an HttpURLConnection will be returned,..."

  • How to check the DTP status (i.e in active mode or not) for the Prior days.

    Hi SAP gurus,
    How to check the DTP status whether it was in active mode or inactive mode for the prior days ?

    Hi Aditya,
    Kindly have a look into below links,
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00dbbfa9-dba2-2d10-bc80-9d6489e4b1c7?QuickLink=index&overridelayout=true
    DTP request Overall status
    Hope this helps.
    Regards,
    Mani

  • Check the order status

    Hi,
    When I do the issue goods to production order,the system massage:Current order status 1000043 does not allow goods withdrawals,Check the order status.
    But how to check? I can't find the wrong.
    regards,
    Zhou.

    Zhou,
    The relesase is getting rejected.
    That's y the status is RELR
    Follow the path in CO02
    Goto-- Logs-- Release.
    Here you will get the reaason for the rejection of the release.
    It might be due to material unavailability.
    You must have done the settings in 'Checking control'.
    Execute T code OPJK.
    Select the combination of the plant, order type & business function 2 & click on details.
    In the next screen against 'Release material' it must be 3. Change it 1 or 2 & save.
    Now try to release the order. It will be released & GI can be done.
    Hope this helps you.
    SmanS

  • Check the system status

    Hi,
    I have a simple question for you..
    How can I check the system status when i save my order...
    The purpose is not save orders whith errors.
    Thanks,
    Hugo.

    Hi Hugo,
    You need not do anything with the status.
    Just create a BADI Implementation for the BADI definition ORDER_SAVE in SE19.
    In the method PREPARE, call the function module CRM_MESSAGES_CHECK_FOR_ERRORS to check for errors in the order. If there are errors in the order then call the function module CRM_MESSAGE_COLLECT to show the additional error message 'Order can't be saved as it contains error' and exit.
    You can also do any additional validation that you want. Save and activate the BADI implementation.
    Now create an order and see if the code written works or not.
    <b>Reward points if it helps.</b>

  • Checking the connection Status

    Is anyone using the cocoaDev NetSocket? I try difficulty in checking the connection status using NetSocket...i open the socket and the connection, but when i'm perfmorming some action that waits for a server response, there's no automatic timeout that control if the connection is up or down after many seconds waited by the same action...

    We are using Outlook 2010
    I have removed the entry in the LAB using ADSIEdit following this procedure:
    http://exchangeserverpro.com/remove-default-public-folder-database-exchange-mailbox-database/
    This has resolved the issue there. Why are you opposed to me running this in Production?
    Thanks
    shapi
    I wanted to verify that you weren't using any org forms first!
    Since you are using Outlook2010, why not remove the PF distribution on that 2007 OAB as well?
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Essbase Java Apis- Checking the Load status of Cube

    Hi all,I am using Essbase 7.1 Java Apis.I want to check the Load status of the Cube.I have used the following Api.Cube.getCubeLoadStatus() However there is problem with this Api.If the Cube is not loaded then when I use this Api for the first time, it shows the status as "Not Loaded".However subsequent calls to the same Api shows that the same Cube is "Loaded".Clearly use of this Api results in loading of a Cube which was initilally unloaded.(I belive, in Administrative console right click on Cube -> Stop results in unloading of the Cube)Please answer my following questions :1) Which Api should I use to check the Cube's load status without affecting its current load state.2)I tried using Cube.isActive() Api.However this Api throws an exception for all states of the Cube.3)What is the diffence between a "Loaded" Cube and an "Active" CubeThanks

    1) Which Api should I use to check the Cube's load status without affecting its current load state. <<I don't know the answer to this one.. It seems to me that it may be a bug. You should report this one to Hyperion Tech Support.>>2)I tried using Cube.isActive() Api.However this Api throws an exception for all states of the Cube. <<I haven't tried this one either..>>3)What is the diffence between a "Loaded" Cube and an "Active" Cube <<Finally one I think I can answer.. A loaded cube means, I believe, that the cube has been loaded by the server and is immediately available. An 'active' cube, on the other hand, is the terminology used to specify that a specific connection is connected to, and using, a specific cube. I know several of the VB/C APIs specify that you must set a cube active (on the connection) before you can use the API.Tim TowApplied OLAP, Inc

  • Check the wireless status (Tx/Rx SNR) on my iPhone4

    How can I check the wireless status (Tx/Rx SNR) on my iPhone4? Is there any internal indicator built-in?

    Hi Kgirl000,
    Welcome to the HP Support Forums. I see that you would like to print wirelessly to your Envy 4500 printer.
    When using the Wireless Direct network, you need to connect the devices to the network the printer is broadcasting to be able to print. I have included the description of what HP Wireless Direct is from the
    HP’s Wireless Printing Center.
    HP wireless direct is a new feature that allows your Wi-Fi capable devices (for example: smart phones, tablets, or computers) to make a wireless network connection directly to your printer without using a wireless router or access point. You connect to your printer’s HP wireless direct signal the same way you connect your Wi-Fi capable device to a new wireless network or hotspot.
    I suspect that is not what you are trying to accomplish. Let’s start by connecting your printer to your wireless network. This can be easily accomplished from the front panel of the printer. The steps can be found on page 53 of your User Guide in the section titled “To connect the printer”. You will need to know the name of your wireless network (that is the SSID) and the password to your wireless network.
    To switch your laptop from a USB cable connection to a wireless connection I have included the Installing the Printer Software for a Wireless Network Connection document. It has a different section for each of the operating systems. Within each of those sections is the instructions to switch to a wireless connection. Please click on your operating system and follow the instructions.
    You should now have no issues printing from your mobile devices when they are connected the same wireless network the printer is connected to.
    Please let me know how it goes.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Checking print job status

    Hi,
    In Leopard, when I print to any of my printers, an application with the name of the printer I'm printing to appears. If I want to check on the status of the current print job, I can't figure out a straightforward way to look at the jobs in that printer's queue. The only way I can accomplish this is to select "Show Printer List" from the "Printer" menu, which then opens the System Preferences dialog listing all of my printers, from which I can select the current printer from the list on the left and then click on the "Open Print Queue..." button. But this seems sort of a roundabout way to check my print job, considering that the current printer's "app" is already open. In the printer "app"'s "Jobs" menu, I have only "Delete Job", "Hold Job", "Resume Job" and "Hide Completed Jobs" as options. It would be great if there were a "View Jobs" option as well. I don't recall that checking print jobs was as convoluted in Tiger. Is there some trick here that I'm missing, or did the monitoring of print jobs become a bit more difficult to do in Panther.
    Thanks,
    Ken

    If you want to see the current queued jobs then click on the option to "Hide Completed Jobs" This makes the current jobs easier to see.
    If the completed jobs view is on, then the current jobs will be at the end of the list.
    Also see the CUPS jobs page here:
    http://localhost:631/jobs/

Maybe you are looking for

  • Does anyone have any suggestions for Ad blocking? I'm getting a lot of pop up ads while using Facebook from Safari.

           I'm getting a lot of pop up ads. mostly while using  Facebook. I'm running Safari on a Macbook Pro running Yosemite. Does anyone have any suggestions for an Ad blocker. I don't see anything in the App store.       I can't swear to it but I don

  • Best way to send files to another machine.

    What I am wondering is this. I go to project manager and choose to backup to an external drive a trimmed version of the project to be opened on another computer. My question is this. The first computer only had a a simple raid setup so media cache an

  • Broken QuickTime links in Safari

    Mac PPC G4 AGP OSX 10.2.8/Classic 9.2.2 QuickTime 6.5.3 Safari 1.0.2 (ver85.8.1) QuickTime links are broken in Safari....go to same page with IE or Netscape and works just fine. Odd! Anybody know how to fix this. I have 'Pacifist', but can't find Saf

  • Functionmodule: get includes from program

    Hello, I need a function module, the FM  supplies the Includes from this program . Does such a function module exist?

  • ITunes starts by itself and won't quit

    I have researched this topic and not found an answer. My system is an imac running 10.5.6 and itunes8. recently itunes launched for no apparent reason. we haven't used it in months. when i quit, even force quit, it immediately relaunches. we have not