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

Similar Messages

  • Usage of update Task Function Modules

    During an application development using WDA I have stumbeled across this unique problem.
    As recommended by SAP I am trying to use update function module to update my SAP Database. But calling the function in WDA does not update the database.
    <b>On the other hand when I call the same function module without the key words in UPDATE task, it updates the database.</b>
    <i>So my question is
    Can I use Update task function modules in WDA?</i>
    If answer is Yes, then I would like to know How?
    If answer is No,  then what is the best practice for updating the SAP database in WDA applications.

    Try Add a commit work after the call.
    Cheers
    Phil

  • OIM Design Console Internal error while updating task attributes

    Hi All,
    I have installed OIM9101 on jboss, the set up is running fine. I am in the process of integrating a OID connector following steps given OID connector guide. In design console(Administration-->Task Scheduler) while modifying "OID Group Lookup Reconciliation Task" attributes, attribute value is not getting saved. When i click on save option it shows a pop up windows saying "problem in updating task attributes. update failed."
    Any solution for this??.. Please help.
    Thanks in Advance.
    Edited by: VAYANAKA on Nov 26, 2010 10:48 PM

    Thank you for the reply..I have tried to create a new scheduled task. But while saving it again an Internal error pop up window comes saying " Description:Could not execute database read.The database encountered a problem with the specified SQL Query.Remedy: Check the database query.Contact your system administrator."..
    Is it any problem with my database.? I have checked database, its up and running??
    Thanks In advance.

  • Update task FM

    Hi Guys,
    Im dealing with a customize dialog transaction where it does have quite a number of Update task FMs to be executed(base on the process). And all those Update Task FMs will be bundled in 1 single LUW to ensure the data consistancy.
    But i have a case happened in prod server where part of the tables(inside Update task FM) weren't updated where those FMs are belong to 1 single LUW.
    And there is not Update termination or Short dump shown. It leads to update carried out successfull. By right it is wrong where part of tables not being updated. And for my every single FM, i put message type A to perform rollback and abend for all the updating process if the current updating having prob in DB.
    eg code in Update task FM:
    UPDATE mara FROM i_mara.
    IF SY-SUBRC <> 0.
      MESSAGE A000(zz.
    ENDIF.
    Other than that, it wasn't due to locking problem where locks are placed nicely from the begining of the transaction.
    Besides that the most shity part is, it can not be simulated in Prod server. There is no log in SM21, SM13. Plus if i simulate the same set of data in QA server, the problem never come out. And the case in Prod server from April till now, it happens twice only. While for the rest of the same transaction type carried out in Prod server without any prob.
    Pls comment for the above.
    Thanks in advance.

    Hi,
    I couldn't help but noticing the fact that you have a update statement on the standard MARA table in your FM. This will cause inconsistencies in the databases. What I am talking about might not be related to your existing issue, but you should never ever update the standard tables directly.
    You should always try and use the BAPI's to do the required functionality and I am sure your problem also will be solved by doing that.
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • Wht is UPDATE TASK functionality in CALL FUNCTION??

    Hi Experts,
    Pls. clarify one of my simple doubt that, Wht is the functionality of UPDATE TASK, in following sttement?
    <i><b>call function 'Z_FM_1' in update task</b></i>
    I found SAP help as follow, but not understood??
    <i>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. Update function modules must be flagged as such in the Function Builder
    The return value is not set.</i>
    thanq

    Hi,
    It sounds like the FM was not called but it was (rollback process).
    And what is the difference between an update attribute assigning FM and this?
    You control the FM update process by setting the update module attribute.
    - Update with immediate start
    Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions can be restarted by the update task in case of errors.
    - Update w. imm. start, no restart
    Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions may not be restarted by the update task.
    - Update with delayed start
    Set this option for low priority ("V2") functions that run in their own update transactions. These functions can be restarted by the update task in case of errors.
    Regards,
    Ferry Lianto

  • Difference between Function module in Update task

    Hi folks,
    What is the difference between
    1. A function module calling in 'update task'( if attributes not set for update mode).
    2.A function module's attributes set to update mode, but while calling not specified 'Update task'.
    Please clarify this doubt.
    Thanks in advance.
    Bhavani

    CALL FUNCTION func IN UPDATE TASK.
    Additions:
    1. ... EXPORTING  p1 = f1     ... pn = fn
    2. ... TABLES     p1 = itab1  ... pn = itabn
    Effect
    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. Update function modules must be flagged as such in the Function Builder
    The return value is not set.
    Addition 1
    ... EXPORTING p1 = f1 ... pn = fn
    Effect
    Values of fields and field strings specified under EXPORTING are passed from the calling program to the function module. In the function module, the formal parameters are defined as import parameters. In the interface definition, default values must be assigned to all import parameters of the update function module.
    Addition 2
    ... TABLES p1 = itab1 ... pn = itabn
    Effect
    TABLES passes references to internal tables. All table parameters of the function module must have values.
    Note
    With update function modules, both import parameters and exceptions are ignored when the call is made.
    Administration transaction
    Related
    COMMIT WORK, SET UPDATE TASK LOCAL
    regards,
    kartikey.

  • Regarding Error in Function Module in Update Task

    Hi All,
    If a function module is called in Update Task and there is some error generated from it, it comes as an exit message unlike in a normal function module.
    Is there any possible way to avoid such an exit message?
    Thanks in advance.
    Regards,
    Garima

    Hi,
    The problem is I am updating Z tables in a function and also calling a function in Update task to update a different set of tables.
    Now, if for some reason there is an error in Update Function module, then my requirement is that rather than throwing an Exit message (which it is presently doing) the errors coming from the function should be captured so that the user knows what was wrong with the data he entered.
    Is there any work around to the above requirement? Either all the tables should be updated or none of them should be updated.
    Regards,
    Garima Thapar.

  • Function Module called in Update Task

    Hi Gurus,
    We are calling Sales Order Change in update task inside the user Exit MV50FZ1. We can see that the FM is called in update task after the commit work and the return of the FM shows the success message. But still the changes are not saved to the DB.
    Can any one help me out with this one.
    Rashit

    Hi,
    If two commit works are called in update task the update will end up with error. Check whether any Commit work is present in the funtion module? If so you may use it in some other method like at save or something like that.
    Regards,
    Renjith Michael.

  • 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)

  • I just updated firefox TODAY 8/17/11 and after the update i can't open firefox unless i restart my computer or i delete going to windows task manager and process, also i can't open a new window, it won't allow it. please can you help me

    I just updated firefox TODAY 8/17/11 and after the update i can't open firefox unless i restart my computer or i delete firefox going to windows task manager and process, also, i can't open a new window, it won't allow it. please help me, everything works on IE, Google Chrome and Safari, everything went wrong after the update

    Hey Elaine07!
    I have an article here that can help you with that issue. This article will help you make sure you have uninstalled iTunes correctly and help you troubleshoot the launch issues you are seeing:
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/ts1717
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • 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

  • 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

  • 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

  • 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

  • Update a Task in a Process Definition

    I am trying to use the OIM API to update a task in a process definition. In the tcWorkflowDefinitionOperationsIntf, there is a method called updateWorkflow(WorkflowDefinition workflow).
    With this method, I am able to update the process definition to make it auto-prepopulate, auto-save, and default process.  Is it possible to update a task in a process definition with this method?

    A very simple example would be changing the description of a task.
    E.g. Design Console -> Process Management -> Process Definition -> Modify the description of "Email Updated" task in LDAP User process definition .
    I am wondering if I could use updateWorkflow(WorkflowDefinition workflow) to do the task above rather than using design console.

Maybe you are looking for

  • System don't allowed vendor debit balances

    Hi SAP Gurus How to configure the system so that it won't allowed debit balances of Vendors.I mean to say any posting for example debit memo will be stopped if the vendor balance is going in negative. Thanks Anant Edited by: Anant Agarwal on Jan 8, 2

  • Query of Search Results

    I need some best practices advice.  I'm not sure if there is a better way to do what I'm trying to accomplish.  The execution time is very high which is why I'm looking for alternatives.  I welcome any tips to help reduce this execution time.  Hopefu

  • Opening an "URL" link in a new window

    Hi, I scanned the boards for how to do this but wasn't sure I could manage some of the suggestions I've read (using javascripts, buttons, etc). I found a simple solution that worked for me and thought I'd share.. I have a SQL Query/Report that contai

  • How do i restore my ipod without an internet connection?

    I've found a few other posts asking, but I haven't found an answer. I've got a 4th Gen Ipod and it has a flashing folder error folder. Going through the troubleshooting steps, I tried reset with no success. I'm at step two, Restore. I don't have an i

  • Cannot text pictures

    Had att u-verse installed in my house, every since it was installed we are not able to text pictures from the house on wifi or 3g or they take extremely long to send. Att said to turn my phone off then back on. That worked for a short period of time.