Background Processing & Update Task

Are "background processing" and "update task" processing the same? I have a function which is timing out and I need to have it run in the background.  If I used the CALL FUNCTION <name> IN UPDATE TASK, would that provide the same resource level and time allowance as having the logic run via a SUBMIT?

Hi,
This is the F1 documentation for calling a FM in Update task
Flags the function module func for execution in the update task. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and a subsequent COMMIT WORK then causes the function module to be executed by the update task.
This is the F1 documentation for calling a FM in background task
Flags the function module func to be run asynchronously. That is, it is not executed at once. Instead, the data passed using EXPORTING or TABLES is placed in a database table and the next COMMIT WORK executes it in another work process.
Hope this helps
Regards,
San

Similar Messages

  • Running Function Module in Background with Update Task is not working

    Hello Friends,
    I have a "Z" Report Program where I am running this Report in Background using JOB_OPEN, JOB_SUBMIT, JOB_CLOSE. I am calling this in BADI.
    In this Report I am calling another Function Module PRICES_POST which is a standard Function Module and in this FM there is another FM 'CKML_UPDATE_MATERIAL_PRICE IN UPDATE TASK'. Now when I am running the BADI these values are not being updated.
    Friends I would like to know whether can we run Function Modules which are  included with UPDATE TASK as Background Job program?
    Kindly help me in providing your valuable suggestions in proceeding further.
    Thanks and Regards
    Pradeep Goli

    Usually the sequence of CALLs in your report should look like
      CALL FUNCTION 'CM_F_INITIALIZE'
        EXPORTING
          msg_on_screen = c_x.
      CALL FUNCTION 'CKMS_BUFFER_REFRESH_COMPLETE'.
      CALL FUNCTION 'PRICES_CHANGE'
        EXPORTING
          actual_bdatj = f_matpr-pp-bdatj
          actual_poper = f_matpr-pp-poper
          bukrs        = p_bukrs
          budat        = p_date
          xblnr        = p_xblnr
        TABLES
          t_matpr      = t_matpr.
      READ TABLE t_matpr WITH KEY pp-xerror = ' '
                                TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        MESSAGE i046(ckprch).
      ELSE.
        CALL FUNCTION 'PRICES_POST'
          EXPORTING
            i_bktxt    = p_bktxt
            bukrs      = p_bukrs
            lis_update = 'X'
          TABLES
            t_matpr    = t_matpr.
      ENDIF.
      COMMIT WORK.
    If you forget the COMMIT-WORK each and every FM called in UPDATE TASK will not be triggered.
    Regards,
    Raymond

  • IN UPDATE TASK  problem with CRM_ORDER_SAVE

    Hello,
    I'm trying to write a program to update one field on CRM order documents,
    but i need to run it in background with update task.
    - I created a function module and called CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE functions
    in this function module consequently,
    - I set the tick "Update Module" and "Start.immed." in attributes of this function module,
    - I called the function module with IN UPDATE TASK additon in a program
    - I used COMMIT WORK command after calling this function module.
    if I use IN UPDATE TASK addition ,
    function is not working and not updating table VBLOG
    and no return message in my workplace.
    But same coding is working perfectly if I don't use IN UPDATE TASK.
    Is there way to understand what's wrong, or a trace possibility?
    Thanks in advance.
    Bulent

    Hello Bulent,
    The entry in VBLOG is retained if the there is any error during the update work process otherwise it is removed from VBLOG.
    Why don't you check the behavior of your FM in "update debugging"? That should throw more light on how the FM works in update work process.
    @Ravi:
    You can check with SO01 transaction if any error occurs
    If there is an error during the update the record in VBLOG updated again. Check the online documentation on [UPDATE TASK|http://help.sap.com/abapdocu_702/en/abapcall_function_update.htm].
    BR,
    Suhas

  • Error Handling for Background/Update Tasks (Transfer Order creation) - How?

    Hi,
    I have a standard process for creating a Transfer Order and 2 user-exits that I have implemented.
    The user exits are used to transfer information during Transfer Order creation.
    However, the user-exits also check data in table TVARV and other. As such, error handling needs to be implemented, since the T.O. might or might not go through, depending on data validation and related.
    However, the user-exits are implemented during creation, which is an update task that runs in the background. This makes it impossible to output any information or error messages.
    What else can be done in regards to outputting a message, since the user will need to see some sort of message that the process failed, that the T.O. didnu2019t confirm?  Can an SAP inbox message be created and how?
    Please help.
    Thank You,
    John

    Hi,
         Please check the following link for all the function modules and user exits on TOs.
    http://help.sap.com/saphelp_erp2005/helpdata/EN/c6/f83a294afa11d182b90000e829fbfe/content.htm
    Reward points if it was helpful.
    Regards
    Abhishek
    Edited by: Abhishek Raj on May 29, 2008 10:20 AM

  • How to control sequence of Function Modules processed in update task?

    Hello,
    I've some questions regarding following process that needs to be extended: a Function Module (FM) 'Save' calls several other FM e.g. 'X1' and 'X2' in update task. Those update modules are independent from each other and write data to the database that finalize the save process.
    Now a third FM 'X3' needs to be called in update task. This one is also independent from 'X1' and 'X2' but it calls a further FM 'X4' in background task as separate unit which starts a job. This job  requires the data from FM 'X1' and 'X2' already persistent on the database. By the way: the FM 'X3' triggers the Access Control Engine (ACE) notification that calculates the authorization data in the mentioned job. Therefore this process needs to be the last FM call in update task in the queue of calls in FM 'Save'.
    Questions:
    (1) Is it possible to control the process sequence of the FM 'in update task' simply by the sequence they are called in FM 'Save'.
    (2) Presumed that all FM beside 'X3' have processing type "Update with immediate start" or "Immediate start, no restart" (in short  V1) would it be another solution to specify FM 'X3' with type 'Delayed' to control the process sequence? When a delayed FM will be processed?
    (3) Is it uncritical to call in FM 'X3' (already running in update task) the FM 'X4' with addition in background task as separate unit  that furthermore starts a job by an event? I'm afraid that this nesting could lead to unexpected errors.
    Thank you in advance for your help!
    Best regards,
    Oliver

    ya it will this be in  the same sequence only...........
    Regards
    Anbu

  • CC background processes are locking my CPU since updates for CC 2104 released

    Two hours with Apple points to background processes of Creative Cloud consistently locking up my iMac CPU around 5 min and 45 secs after booting up. 
    Issues stated last week Thursday after updates released, progressed Friday to the point of not being able to perform any tasks on my workstation after the 5:45s time window.
    Attempted to upgrade CC apps to 2014 and was able to get CC Illustrator 14 installed but CC Photoshop 14 fails around 42% everytime I try. Have not updated any other apps (indesign, etc).
    Have seen mention of others having same CPU lock up now.
    Tried phone support - discounted when transferred to a busy signal after 17 min and two operators.
    Can NOT work this way - need answers.

    Anthony,
    IMHO, locking by task id is not advisable because effectively you are going to allow only one instance of the task type to execute at a time. What if an instance of the task has different materials?
    If you still want to play with your idea, the code below in your object method will get the current task id.
    DATA:
      workingwi       type swc_object,
      TASK            type SWWWIHEAD-WI_RH_TASK.
    swc_get_element container '_Workitem' workingwi.
    swc_get_property workingwi 'WorkitemTask' task.
    Cheers,
    Ramki.

  • Problem in creation of Background Processing Task

    Hey Gurus,
         I need to extract to extract some details for a specific contract and display it as workitem text.. so i have to create a background task which can extract the data, assign the values to the container, and use these values later in the workitem text for the subsequent tasks..
        I have couple of select statements related to that.. i tried creating an extra method in the bus object with the select statements in it and using the method in the task, but when i checked the task as a Background task and tried using it.. it was giving errors...
    Thanks in advance

    Hi Kan,
    Is any of your method that you might be using for the task which you want to Process in background set as "Dialog", bcos if your method is of Dialog, you wont be able to process your Task in Background.
    Please Check
    Cheers,
    Aditya

  • Function in update task goes to dialog process(seen by sm50)

    Hi Forum,
       I wrote a simple test to invoke a function module in update task, and the execution of the module takes several minutes (updating database using opensql) . The test looks simply like described in the following link:
    http://www.****************/Tutorials/ABAP/Debug/Index.htm
       During the run, I used transaction sm50 to view the working processes and expect to find a running "UPD" process. However it is not found, instead  my dialog process is always seen running. Any hints on why?
    Thanks,
    Yang

    got the answer. The reason is that sm50 can not display UPD process so promptly. For a more thorough tracing, transaction "stad" can be used. (where I see the DB access executed in UPD process)

  • Process Instance.Task Details.Update Date

    Hi experts,
    Process Instance.Task Details.Update Date
    Process Instance.Task Information.Update Date
    From these two dates which one captures the approval task assignment date.
    For e.g. If we reassign the approval task after some idle period to another approver which date will give this reassignment date?

    There's also information in the OSH and OSI table.
    Process Instance.Task Information.Assigned Date
    OSI_ASSIGNED_DATE
    Process Instance.Task History.Assign Date
    OSH_ASSIGN_DATE
    You might need to create an approval task and have inserted, and then reassign and do some testing to find the actual value you need to search for.
    Another note, any open task that is Rejected, Waiting, or Pending will be in the OTI table which should contain all these values.
    -Kevin

  • Usage of IN UPDATE TASK in Update process

    Hi
    I want to synchronize the Lock and Rollback process with respect to
    addon table and FI document posting.Need to consider that many  addon programs are accessing the table at same time and may be bulk records need to be udpated sometimes.So may be more time to execute. I am trying to execute below in 1LUW process. pls correct me if i am doing wrong here. below is my issue.
    Pls correct me whether can i go with below process.
    1)Check and prepare record for Update
    2)If (No) record exists
      Display Error.
      Else
    3)call Function Enqueue_XXXXX " (Lock the Updating doc record for table.)
    4)Call Function 'UPDATE_ZMMT44' IN UPDATE TASK(Inside FM Update stmt is written)
    FI document standard Commit Work (hope this will release both table lock and BKPF lock)
    FI standard Rollback Work
    Issue
    1)Lock Release timing of Enqueue process?
      Lock Release happens only at the end of FI document Posting. if batch update happens it will lead to long time freeze and no error can be displayed unfortunately. how to handle this?
    2)How to handle SQL error(Update <table> stmt error)
    I am not able to catch this error inside program. seems it goes to ST22 ...how to catch this inside program?
    My earlier query is not clear and i did not get answer so i am post it again
    regards
    prince
    Edited by: princeck on Nov 18, 2011 2:28 AM

    Hello Prince,
    Regarding issue2, this is not solved, How to handle the SQL error when update record?
    Now its going to SAP office and gives error. not showing error at same place.
    This is the standard behavior when an "update"(processed via an Update WP) fails.
    If you don't want this to happen you can opt for local updates(SET UPDATE TASK LOCAL). You would like to read the [behavior of messages in local updates|http://help.sap.com/abapdocu_702/en/abenabap_message_update.htm].
    BR,
    Suhas

  • Calling RFC FM in update task / background task

    hi experts,
    I have a RFC FM in system B and i want to call it from system A. if the system B is down when the call happens then the call is lost. basically i want the call happen when the system B is up. somewhere i have read that when u call the RFC FM in update task/ background task , SAP will try to make the call to system B at periodic intervals of time till the system B is up. is that so? what is the difference between calling the RFC in update task and background task?
    thanks

    no replies

  • Background processing for a task

    Hi all,
    my problem is this: I enter in a step of a wf structure and for that step I must set the task in background--->double click on task and I thought that, in modify mode, the flag 'background processing' in label 'Execution' of the task was editable and instead no...How can I set my task/step in background?
    Thanks in advance
    Bye

    Hi,
    Follow the below steps
    1. Execute PFTC transaction.
    2. Choose the task type as Standard Task.
    3. Enter the task ID without Object type TS i.e. if task ID is TS90000000, then simply enter 90000000.
    4. Open in change mode and enable the check box BACk ground Processing.
    After the above steps are completed, Execute the transaction SWU_OBUF and click SHIFT + F1. to refresh teh buffer.
    Regards
    Pavan
    Edited by: Pavan Bhamidipati on Nov 21, 2011 4:24 PM

  • Update Tasks remain in status = init / started forever. Doest not process

    Hello Everyone,
    We have the FM ME_DB_UPDATE_INFORECORDS called in update task from one of our program
       CALL FUNCTION 'ME_DB_UPDATE_INFORECORDS' IN UPDATE TASK
          EXPORTING
            i_changedocument = c_upd
          TABLES
            db_eina_u        = li_eina
            db_eine_u        = li_eine.
        COMMIT WORK.
    But all these calls does not process. it queues up in SM13 and uses up all update WP and affects the whole system.
    The update records in SM 13 stays with status init or started with the enqueue locks. This results in unresolved table locks on the EINA table.
    The concerned program generates multiple of these update requests with results in piling up of unprocessed such update requests.

    Hello,
    I only suggested SM12 because you said "I feel there is an enqueue problem".
    I would just look for any locks, if you can reproduce the problem. It depends on the ones your method uses.
    Can you tell if the method has been run successfully for those In Process steps? If so, you could try a Complete Manually.
    regards
    Rick Bakker
    hanabi technology

  • Disk Utility Background Process Fails.  Combo Updater doesn't find Disk

    When I start Disk Utility, I get a message "error starting disk utility background process" with a "quit" button which can't be clicked. So, I force quit.
    When I try to run a combo updater (10.4.3 or 10.4.7), the "select volume" window shows no volumes.
    In both instances, the system log tells me:
    DiskManagementTool crashed
    And the console log tells me:
    dyld: lazy symbol binding failed: Symbol not found: _GPTuuidType2Human Referenced from: /System/Library/PrivateFrameworks/DiskManagement.framework/Resources/DiskManage mentTool
    Expected in: /System/Library/PrivateFrameworks/MediaKit.framework/Versions/A/MediaKit
    dyld: Symbol not found: _GPTuuidType2Human
    Referenced from: /System/Library/PrivateFrameworks/DiskManagement.framework/Resources/DiskManage mentTool
    Expected in: /System/Library/PrivateFrameworks/MediaKit.framework/Versions/A/MediaKit
    I have run fsck -y in single-user mode, repair disk and permissions in disk utility from my install disk, and Disk Warrior. Still the same.
    Is there any way I to fix this without rebuilding the machine?
    Thanks,
    Gary
    Powerbook G4   Mac OS X (10.4.3)  

    Hello
    I had the same problems. I don't know the cause but it surely comes from the "software update" software. In the future I will only use the combo updater that you can find on http://www.apple.com/support/downloads/macosxupdate1047comboppc.html
    I ended up reinstalling 10.4 from scratch and then running the combo update. It know works fine.
    Regards

  • Sy-batch value when debuggin a background process

    Hello All,
    I have a quick question. I am working with a background job and I have a doubt about the sy-batch value. I know it set to 1 when the process in run in background but if I turn the debuggin on [ via the infinite loop ] then will the sy-batch value change to SPACE ?
    In debugging I see its changed to space but I am wondering is it cause I am debuggin in background or is it because Its an update task ?
    can you please advise ?
    thanks,

    The SY-BATCH should come as "X" when you debug a background job via infinite loop. Have you called any code update task? If yes then it will be processed via dialog processing so here SY-BATCH will be initial.
    I just set this program in background and found that the SY-BATCH as "X" and it goes to infinite loop.
    REPORT ztest1.
    DATA: l_flag TYPE c LENGTH 1.
    DO.
      IF l_flag = sy-batch.
        EXIT.
      ENDIF.
    ENDDO.
    DATA: l_string TYPE string,
          l_final TYPE string.
    l_string =  'UPS Surface Collect #954365'.
    DATA: l_dummy1 TYPE string,
          l_dummy2 TYPE string.
    SPLIT l_string AT ' #' INTO l_dummy1 l_dummy2.
    CONCATENATE l_dummy1 l_dummy2 INTO l_final.
    WRITE:/1 l_final.
    Edited by: Sourav Bhaduri on Sep 29, 2008 2:47 PM

Maybe you are looking for