Background Job Hanged but no work process assigned

Hi,
Background job has hanged When i see in SM37. But no work process assigned to this job. All work process are waiting status.
What could be the reason. What is the resolution process.
Thanks,
Dayakar

How did you come to a conclusion that the bg job is hangend.
What is the status of the job. ? I guess  Job defined, but not yet eligible to run even if the start condition has been fulfilled so it should be in Scheduled status.

Similar Messages

  • Background Job hangs!

    Hello Friends,
    I am encountering a problem with background jobs which has driven me crazy.
    The background job hangs and when I try to debug it using the JDBG command the results are surprising.
    When the program control reaches a particular PERFROM statement, then no matter what command I give (F5, F6 or if I double click on any of the variables) it hangs. When I press F5, it should atleast go in to the corresponding FORM, and hang during some processing or it should go into an infinite loop but this is not the case. The system hangs even when I press F5 on the PERFORM. The FORM routine exists in the program, so that possibility is ruled out.
    Actually the job processes records of a custom table, this problem starts with a particular record and if I skip the processing of this record then it happens with almost all the records after this one. Also, this does not happen every time the job is run, but whenever it does, it starts with a particular record.
    When the system hangs then even if I try to stop the transaction by right clicking on the task bar then it has no effect, the only way to close the session is by using the 'Windows task manager'.
    I tried transaction SM50, but there were no changes on that screen for this particular session indicating that it has hanged.
    Please let me know if you require any more information.
    Thanks and Regards,
    Haseeb.

    Hi,
    Debug it in Sm66.
    kishore.

  • Background job hanging reasons

    background job hanging reasons

    Could you provide little more detail of the issue you encountering.
    One of the reason could be 100% utilization of the CPU, all your background process might being used in parallel.
    Check the load in the transaction st03n
    To prevent this you may want to use load balancing on various application servers using the transaction smlg.
    You may also want to define a flow of the the jobs, like job B should start after job A has completed.
    Let us know more details of the environment to allow us to help you better
    Thanks & Regards
    Abhinav

  • In background job  how commit & rollback work works?

    Hello Friends,
         My requirement is, to fetch all sales order items based on some condition and load them into one table say OCC1 in job J1. Now the second requirement is to upload the job information J1 with job name, user name, end date in second table say OCC2 in job J2.
         My question is if there is some error I found while processing job 2 I have to rollback entire work which means I have to remove all records those I have inserted in to table OCC1. Can any one suggest me how to handle such problem? Some how I am able to create two job and update the tables. However, what about rollback work? Whether there is an implicit commit work after every background job? I am working on SAP 4.6C version.
    Thanks,
    Amol C.

    I think by using just ROLL BACK work it will not rollback your first job's data.
    You need to make some mechanism which can delete the data from OCC1 if the J2 got error.
    Regards,
    Naimesh Patel

  • Background job finishes but error Error While Updating Material into Standard SAP5678

    Dear
    we run background job which finishes successfully but when we sqw logs it shows
    Error While Updating Material into Standard SAP5678
    Kindly share the reasons
    Regards

    This is an ERP Upgrade space and you should consider raising threads in the right space for prompt replies. Next time consider using SAP NetWeaver Administrator space for issues like these. Also you should consider closing your previous thread with the correct answer for future reference.
    What I see is a custom job. You should check what the job does and also the trace file of the work process and the consult with the application team or the developer for more information. Unfortunately with that screenshot there is nothing much we can advice you.
    Regards
    RB

  • Background job finished but flat file not created in the Background

    Dear all,
    ZHR_CSD program is scheduled to run daily at 00:01:00. This program is generating the flat file in the folder CSD/HR.
    when i  schedule this program to run immediately it is generating the flat file.
    But when i schedule this program in Background it is not generating flat file .
    Regards

    Hi,
    As suggested by Eric, your Z Program is probably using GUI_DOWNLOAD Function Module.
    GUI_DOWNLOAD or any other GUI function modules (FM) will only run in foreground, not in Background.
    Ask your developer to code that Z Program with OPEN DATASET logic, if its possible.
    The Reverse situation is well described in [this thread|Background Job assigment with variant in SM37 , for Textfile uploading], please refer it to get some relative information for the same.
    Regards,
    Bhavik G. Shroff

  • Configure background job  for collective outbound delivery processing

    Hello Gurus,
        I want to  Create a background job to be executed during off-peak hours for collective outbound delivery processing.  will you please give me step-by-step configuration ?
    thanks very much!

    To set up a batch job for delivery creation use SM36 T-code.
    Input batch job name say - ZSD_CREATE_DELY_SALES_ORG
    Select class = C or B.
    Set up by / created by = BATCHADMIN or your id
    Program Name = WS_DELIVERY_UPDATE
    Varient = (as per your requirement - say for a particular sales area and plant)
    Click on "Check" icon and "Save".
    Go to the main page, select icon "Schedule a Batch job".
    Give detils like daily, weekly or periodic or Immediate.
    Enter date and time accordingly. Save it.
    Same thing applies for Invoice creation batch job.
    Use program name:RSBDCSUB
    All other steps remain the same.
    Hope this will help you out !
    Regards,
    Rajesh Banka

  • Background job cancelled , where as working fine in foreground

    Hi,
    In selection screen , I have a to provide a file name and execute the program.
    When I execute in foreground its working fine, but where are when I execute in background with variant it shows invalid file name and job cancelled in long text.
    Please suggest me what would be the problem and possible solution.
    Thanks,
    Ameer

    Hi Ameer,
    Add the following condition for running the prgram in Background.
    *****To upload file*********
    IF sy-batch = 'X'.  "-----> If backgroung execution option is selected.
    OPEN DATASET p_filename FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    WHILE sy-subrc = 0.
          READ DATASET p_filename INTO wa_struc.
          APPEND wa_struc TO itab_struc.
    ENDWHILE.
    CLOSE DATASET p_filename .
    ENDIF.
    *****To download file*********
    IF sy-batch = 'X'.
       OPEN DATASET p_filename1 IN TEXT MODE FOR OUTPUT ENCODING DEFAULT.
       IF sy-subrc = 0.
        LOOP AT itab_struc INTO wa_struc.
          TRANSFER wa_struc TO p_filename1.
        ENDLOOP.
        CLOSE DATASET p_filename1.
      ENDIF.
    ENDIF.
    Hope this addresses your issue.
    Regards,
    Arnab

  • I recently purchased some scripts and saved them as actions but wont work with assigned function key

    i could use some help ....i recently purchased some scripts to help automate things i do with scrapbooking.... i am using cs4 and have vista...i have made actions to make it easy to use the scripts.... i have assigned function keys to make it easy to use the actions... but it doesnt seem to work with the function keys...i can run the actions by pressing that arrow/button on the bottom of the action palette but when i hit the f key nothing happens..when i first got the scripts it did work.... but now it doesnt....i deleted the actions and made them again but still dont work with f keys...what could be the problem and what do you suggest i do...others who have purchased these same actions seem to be able to use them with the f keys.... thanks for any thoughts and suggestions

    think i may have solved it myself and passing this dum thing along....on my keyboard is flock...i mustve hit it and the keys were locked...so i hit it and now they work.... oh dear.

  • Insert Into @temptable hangs but #temptable works

    I have a simple temp table declared as a table variable. This is used on nearly 50 deployed databases and works fin. However, on one server, 2008-R2 as are all the others, the Insert statement hangs.  If I change to a #temptable the exact same code
    works.  Is there a configuration setting that would account for this behavior.  This is what the code looks like;
    On all my other servers this works fine.  On one server it would hang until I modified it to use CREATE table #Counts.
    declare @Counts table
    CountOf varchar(10), StatusID bigint, StatusName varchar(30), TheCount bigint
    insert into @Counts
    Select
    'Files' as CountOf,
    sc.StatusID as StatusID,
    sc.StatusName as StatusName,
    count_big(*) as TheCount
    from
    dfFiles f with (nolock)
    join dfFolders d with (nolock)
    on d.folderid = f.folderid
    join dfVolumes v with (nolock)
    on v.VolumeUID = d.VolumeUID
    and v.MachineName = @MachineName
    join dfStatusCodes sc with (nolock)
    on sc.StatusID = f.StatusID
    group by sc.StatusID, sc.StatusName
    union all
    Select
    'Folders' as CountOf,
    sc.StatusID as StatusID,
    sc.StatusName as StatusName,
    count_big(*) as TheCount
    from
    dfFolders d with (nolock)
    join dfVolumes v with (nolock)
    on v.VolumeUID = d.VolumeUID
    and v.MachineName = @MachineName
    join dfStatusCodes sc with (nolock)
    on sc.StatusID = d.StatusID
    group by sc.StatusID, sc.StatusName

    Supposedly, this is a query-plan issue. As you may know the optimizer works from the statistics sampled from the data and from this it makes an estimation of what is the best plan. Since the data profile may be different in different database, the query
    plans may be different in different databases.
    And of course, the set of avilable indexes may be different in different databases too.
    So what has this do with temp table vs. table variables? The presence of a table variable precludes a parallel plan, whereas there is no such restriction with temp tables.
    Thus, you need to look at the query plans to see what is going on. Make sure statistics are up to date, and also check that this server has the same indexes as the other server.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Background job finished but Error sending data

    Dear all,
    report is running in my prod server . once this report completed sapuser get mail . when i check the job status it shows
    Job started
    Step 001 started (program GP4CF9U420G825I4P7DU8XY49WH, variant CUSTOMEROUTSTD, user ID S2K_BASIS)
    Spool request (number 0000012259) created without immediate output
    Error sending data (4)
    Job finished
    one more clarity i required
    this report should goes to 4 SAP users . how can i configure this report to 4 sapusers
    kindly suggest me

    > Step 001 started (program GP4CF9U420G825I4P7DU8XY49WH, variant CUSTOMEROUTSTD, user ID S2K_BASIS)
    > Spool request (number 0000012259) created without immediate output
    > Error sending data (4)
    I'd check SCOT/SOST for any errors. Also check the syslog (SM21).
    > this report should goes to 4 SAP users . how can i configure this report to 4 sapusers
    Create a distribution list (SAPoffice-Inbox - environment - distribution list) and enter that as addresse for the output.
    Markus

  • What is work process

    What is Process ? For SYnchronous and Asynchronous updates where do data store temporarly ? and for local update also?
    Regards,
    Prasad

    hi,
    <b>work process</b>
    Work processes execute the individual dialog steps in R/3 applications. The next two sections describe firstly the structure of a work process, and secondly the different types of work process in the R/3 System.
    <b>Types of Work Process</b>
    <b>Dialog Work Process</b>
    Dialog work processes deal with requests from an active user to execute dialog steps.
    <b>Update Work Process</b>
    Update work processes execute database update requests. Update requests are part of an SAP LUW that bundle the database operations resulting from the dialog in a database LUW for processing in the background.
    <b>Background Work Process</b>
    Background work processes process programs that can be executed without user interaction (background jobs).
    <b>Enqueue Work Process</b>
    The enqueue work process administers a lock table in the shared memory area. The lock table contains the logical database locks for the R/3 System and is an important part of the SAP LUW concept. In an R/3 System, you may only have one lock table. You may therefore also only have one application server with enqueue work processes.
    <b>Spool Work Process</b>
    The spool work process passes sequential datasets to a printer or to optical archiving. Each application server may contain only one spool work process.
    The services offered by an application server are determined by the types of its work processes. One application server may, of course, have more than one function. For example, it may be both a dialog server and the enqueue server, if it has several dialog work processes and an enqueue work process.
    You can use the system administration functions to switch a work process between dialog and background modes while the system is still running. This allows you, for example, to switch an R/3 System between day and night operation, where you have more dialog than background work processes during the day, and the other way around during the night.
    hope it will help u
    chetan vishnoi

  • Force FM execution on batch job work process

    Hi!
    Is it possible to asynchronously start FM execution on batch job work process?
    Additions:
    CALL FUNCTION func STARTING NEW TASK taskname.
    CALL FUNCTION func IN BACKGROUND TASK.
    starts FM execution just on another dialog process.
    Context of requirement:
    There is a program that may be logically splitted into two parts:
    - dialog part where data is collected from user input
    - BAPI call with a tons of parameters(structures, internal tables) formed on user input
    So the problem - system dump by timeout during BAPI execution.
    The only solution is to execute BAPI functionality on work process without timeout limitations - batch job work process.
    There may be two approaches:
    - pass parameters to report and schedule its execution in background job. But here arise question how to pass these dynamic parameters? SAP memory doesn't available for background job work process and "SUBMIT WITH FREE SELECTIONS texpr" seems to be intended for LDB or anyway not for such purposes.
    - force FM execution on background job work process - so how if it possible?
    Appreciate your suggestions.
    Regards,
    Maxim.

    Hi Maxim,
    Look at this example program where the user can run it online to enter the input values in the selection screen and then the program just goes into background mode, basically achieved by submitting the same program again skipping the selection screen. This is one more option for you.
    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.
    Let me know if you have any questions.
    Srinivas

  • Background Job is not running in KW

    Hi All,
    I have problem with background job.
    I am working on Knowledge warehouse server.
    And I am scheduling background job to upload contents.
    But background job is not finishing at proper time.
    And while displaying trace it is giving following error.
    ERROR => BtcCleanUp: BtcLgAp-call failed (rc = 4) [btcjcntl.c   1251]
    Please help me to resolve this.
    Regards,
    Payal patel

    Hi Juan,
    I have tried with process as well as instance restart.
    It didn't help me.
    Hi Santosh,
    Following is the part of trace file (level -2).
    First line shows error.
    Tell me if you need any other log file.
    L  *** ERROR => BtcCleanUp: BtcLgAp-call failed (rc = 4) [btcjcntl.c   1251]
    M  read msgserver-list from MBUF
    M  ThSemRq (4, 1, 0, 0)
    M  ThSemRel (4, 1)
    M  ThSetBtcName: found batch server sapbl4_KW7_00                          
    M  ThScheduler2: server name: sapbl4_KW7_00                          
    M  ThISendMsg: send message (5) to server (wp) with name >sapbl4_KW7_00                           <
    M  ThISndName: send to name: >sapbl4_KW7_00                           <
    M  ThISend: (tm/type/info = 10/0x2000/0x0, mode_deleted=0)
    M  ThRqOutCheck: o.k.
    M  abap strategy ROLL / O.K.
    M  ThNewWpStat (type=0x2000, task_switch=0, inline_hold=0, hand_shake=0, debug=0, ..)
    M  ThNewWpStat: new state of T10/M0 = 0x3c
    M  ThISend: new wp stat: 0x0
    M  Adresse   Offset  Message by name (one way)
    M  -
    M  06C60600  000000  00000000 05000000 255f4556 454e545f |........%_EVENT_|
    M  06C60610  000016  53434845 44554c45 52202020 20202020 |SCHEDULER       |
    M  -
    M  ThMkReq: send output to canceled mode
    M  make DISP owner of wp_ca_blk 180
    M  DpRqPutIntoQueue: put request into queue (reqtype 0, prio LOW, rq_id 19358)
    M  -OUT- sender_id WORK_PROCESS      tid  10    wp_ca_blk   180     wp_id 10
    M  -OUT- action    SEND_MSG_ONEWAY   uid  11    appc_ca_blk -1      type  NOWP
    M  -OUT- new_stat  NO_CHANGE         mode 0     len         268     rq_id 19358
    M  -OUT- forward   DIA              
    M  -OUT- req_info  CANCELMODE MSG_WITH_REQ_BUF MSG_WITH_OH
    M  nihsl-getHostAddr: got hostname 'localhost' from operation system
    M  nihsi-getHostAddr: hostname 'localhost' = addr 127.0.0.1
    M  nihsl-getServNo: got servicename 'sapdp00' from operation system
    M  nihsi-getServNo: servicename 'sapdp00' = port 0C.80/3200
    M  NiIInitSocket: set default settings for socket 1196
    M  NiCreateHandle: state hdl 1 / socket 1196 NI_INITIAL
    M  NiIDgSend: init datagram send hdl 1 / socket 1196
    M  CPU byte order: little endian, reverse network, low val .. high val
    M  NiIDgSend: connect dgram to: host 127.0.0.1, port 0C.80/3200, fam 2 (low adr..high adr)
    M  NiIDgsend: sending on connected datagram-handle
    M  LOCK WP ca_blk 181
    M  ThResFree: free resources of U11 M0 I2 (normal mode, complete free) at level 3, errno=23, db_action=TH_DB_NO_ACTION, pooling=1
    M  ThResFree: reset spa state for user T10/U11/M0
    M  ThCallHooks: call hook >RtmClearSession< for event BEFORE_SESSION_CANCEL
    M  ThCallHooks: call hook >HttpClearSession< for event BEFORE_SESSION_CANCEL
    M  ThCallHooks: call hook >SpoolHandleHook< for event BEFORE_SESSION_CANCEL
    M  SosSearchAnchor: search anchor for 2
    M  PfStatDisconnect: disconnect statistics
    M  ThDealComm: del 1 cpic conn(s) of T10/U11/M0 (errno/deal_r2/free_level = 23/1/3)
    M  ThCPICFree: send DEAL to U11/M0
    M  ThICMDEAL (14030609, ..)
    M  ThCPIC: execute cpic func DEALLOCATE
    M  ThCPIC: last_ftype/last_timeout/last_requested_length/last_receive_data 1/-1/-1/0
    M  ThCPIC: allowed rq_type of T10/M0 = TH_APPC_RC_RQ
    M  ThConnectToLocGw: connect to local gateway
    M  GwConnectSapWp: connect to gateway >localhost< >sapgw00<
    M  nihsl-getHostAddr: found hostname 'localhost' in cache
    M  nihsi-getHostAddr: hostname 'localhost' = addr 127.0.0.1
    M  nihsl-getServNo: got servicename 'sapgw00' from operation system
    M  nihsi-getServNo: servicename 'sapgw00' = port 0C.E4/3300
    M  NiCreateHandle: state hdl 2 / socket -1 NI_INITIAL
    M  NiIBlockMode: switch off block-mode for hdl 2 / socket -1
    M  NiLowLevCon: connect to: host 127.0.0.1, port 0C.E4/3300, fam 2 (low adr..high adr)
    M  NiIInitSocket: set default settings for socket 1140
    M  NiISocket: hdl 2 got socket 1140
    M  NiPConnect: connect in progress
    M  SiPeekPendConn: connection of socket 1140 established
    M  NiLowLevCon: took local port 0E.51/3665
    M  nilh-localCheck: using local address list
    M  NiSetStat: state hdl 2 NI_CONNECTED
    M  NiIWrite: write 64, 1 packs, MESG_IO, hdl 2, data complete
    M  NiIPeek: peek successful for hdl 2 / socket 1140 (r)
    M  NiIRead: read 64, 2 packs, MESG_IO, hdl 2, data complete
    M  GwConnectSapWp: connect to gateway localhost / sapgw00 (pid = 6184) o.k.
    M  ThISend: (tm/type/info = 10/0x80/0x0, mode_deleted=0)
    M  ThRqOutCheck: o.k.
    M  abap strategy ROLL / O.K.
    M  ThNewWpStat (type=0x80, task_switch=0, inline_hold=0, hand_shake=0, debug=0, ..)
    M  ThNewWpStat: new state of T10/M0 = 0x3c
    M  ThISend: new wp stat: 0x0
    Regards,
    Payal Patel
    Message was edited by:
            Payal Patel

  • Trigger substitution rule for a background job

    Hi all,
    I ve written a subroutine in Substitution rules for FI in GGB1 tcode for F110 transaction to replace the section code (bseg-secco) while posting a fi document.
    but the substitution rule is not getting triggered as F110 runs a background job to post the document...
    The substitution is active and the activation level is active all the time.
    Could u please suggest how to get it triggered for a background job...

    Measuring External Processes
    Use
    The runtime analysis allows you to switch into work processes that are already running and to measure the runtime of dialogs running in them as though they were running in the current session. You can have up to ten external sessions, which may be of any type – for example, dialog, update, or spool. This runtime analysis variant is ideal for monitoring long-running background jobs.
    Filename and Directory
    If you do not want to use the default filename and directory to store files, you can change them using the profile parameter abap/atrapath. If the profile parameter does not contain an entry at all, an error occurs when you start the runtime analysis.

Maybe you are looking for