Debugging - in update task

Hi,
in one of the exits of transaction VA02 (change sales order) during saving,  i have a call of a Z-function module in update task.
When i have reached the call of this function during debugging, i'm setting the update debugging on. After saving, the system says 'Update debugging has been triggered', but i'm not getting a debugging session of the Z-function module.
How can i debug the z-function ?
regards,
Hans

Hi hans,
1) Update function modules do not run in the same user session as the program that is currently running in the ABAP Debugger. These function modules are therefore not included in debugging. Only if you select the Update Debugging option can you display and debug them after the COMMIT WORK.
Update function modules do not run in the same user session as the program that is currently running in the ABAP Debugger. These function modules are therefore not included in debugging. Only if you select the Update Debugging option can you display and debug them after the COMMIT WORK.
2) call the update module func using CALL FUNCTION func IN UPDATE TASK, a new window is opened in which you can debug this function module in the update session. All the breakpoints that were set in the calling processing unit can also be processed here.
Thanks
Sudheer

Similar Messages

  • FM in update task - How do you debug for a user exit (IW32)

    Hi,
    I am working on user exit IWO10009, fm EXIT_SAPLCOIH_009, transaction IW32.
    The user-exit should be called any time an order is saved with parts added to the component tab.
    The import structure of the user exit is CAUFVD, which doesnu2019t contain the items in the component. Instead, I have to go into table RESB and get the components.
    However, when I go into RESB from inside the user-exit, the added components have not yet been added to the table.
    As such, I was thinking of creating a Z function module in update task to process this code after the order is saved & RESB is updated.
    2 questions
    1 u2013 Is this the best way of accomplishing this?
    2 u2013 How do you debug FMu2019s in update task? I have set a breakpoint & have switched system debugging on from inside the debugger, but it doesnu2019t stop inside the fm.
    Please help.
    Thanks,
    John

    Hi,
    to debug update task you need to switch on "update debugging" not the "system debugging" from the menu Settings->update debugging.
    -Ramesh

  • How  to debug function module in update task ?

    Hi ,
              i have following code :
    CALL FUNCTION 'ZSD_t_UPDATE' IN UPDATE TASK
                 TABLES
                                  it_xvbkd = xvbkd.
    Inside this function module i have some code  to debug . How can i debug it ?
    I put the breakpoint in it but its not working .
    It is triggered on save of  a tcode .
    Thanks and Regards .

    My home-grown method:
    Set your breakpoint in the FM.
    In your transaction, just before you press save, enter hobble mode in your command box with '/h'.
    press save.
    In your first debug screen, toggle settings>system debugging ON (NetWeaver Drop-down menu) or see previous notes for earlier WebAS versions.
    Select continue (F8).
    The program should then stop at your break-point in the FM.

  • Debugging a function in UPDATE TASK

    Hi All,
    I'm debugging a function in UPDATE TASK. I have just actived the flag 'Update Debug'.
    My problem is Find how the Function's  parameters are passed. The function is called dynamically by a statement like this:
    " PERFORM (VBFUNC) IN PROGRAM (TFDIR-PNAME) USING VBID. "
    Does someone help me?
    Thanks

    Hi,
    Your question is not clear to me.
    wht I understood that you want to get the parameters passing to a function module which is dynamically called.
    " PERFORM (VBFUNC) IN PROGRAM (TFDIR-PNAME) USING VBID. "
    this statement is not calling any FM it is calling a subroutin which exist in TFDIR-PNAME program variable after USING stat is your parameter.
    You can get the name of the form, program and the parameters if you debug at this point.
    Thanks,
    Anmol.

  • Function module with UPDATE TASK

    All,
    Have a look at the below code. While debugging the control is not going inside the function module called using <b>call function ...... in update task</b> statement.
    I believe the function module is not executed immediately, but is scheduled for execution in a special work process (update work process). For this purpose, the name of the function module including the passed actual parameters is stored as a log record in the database table VBLOG. If the statement is executed during the update task, the addition IN UPDATE TASK is ignored.
    The actual execution is triggered by the statement COMMIT WORK which is not happening in this case. The formal parameters of the function module receive the values of the actual parameters from table VBLOG. How can I read the entries in VBLOG? Why the function module is not executed? Please suggest.
    PERFORM bte_publish ON COMMIT LEVEL 9.
    * syncron update
        COMMIT WORK AND WAIT.
    *       Publish business transaction events. The function module have
    *       to call as last update module!
    FORM bte_publish.
      IF NOT gvt_nodes IS INITIAL.
        CALL FUNCTION 'CUSTOMER_HIERARCHY_THROW_BTE' IN UPDATE TASK
             EXPORTING
                  ffi_valid_on    = knvh-datab
                  fti_event_list  = gvt_nodes
                  fti_event_listx = gvt_nodesx.
      ENDIF.
    ENDFORM.                               " BTE_PUBLISH
    Thanks,

    Right Naren. But I need to check inside the update function module, whether it is calling the BTE function module I had configured and the code which I had put in it. Any ideas?
    The COMMIT WORK is returning 4 and hence I believe it is not popping up another debuggin session in which the update FM runs.
    Thanks,
    Message was edited by: Somen

  • Call function '' in update task - code inside is BDC

    hi to all,
    in using call function '' in update task
    the code inside is bdc. is this possible? 
    my scenario is from VA01 then post billing to VF01,
    i am using user-exit MV45AFZZ in subroutine userexit_save_document.
    i need to post billing after va01 save.
    thanks to all.

    To debug in the update task, you have to set that option on in the debugger.
    If the user exit runs in the update task, then you must have something like: CALL FUNCTION MODULE my_fm_to_do_BDC STARTING NEW TASK.   ( This function module should wait until the SD is created.  You might want to check in a loop, with a WAIT command.   Once it is created, then you start your BDC and CALL TRANSACTION. )  This is NOT an update function module.  It may need to be RFC enabled - I'm not certain at the moment.
    If the user exit doesn't run in the update task, you need to create, and call from the user exit, an update function module that calls your function module "my_fm_to_do_BDC" STARTING NEW TASK. 
    The attribute "collective run", which is V3, means that the update task won't run that function module until a regularly scheduled job on the application server runs.  For processing to run during the rest of the SD save, you must use V1 (could be run in any order with other V1s) or V2 (Will run after V1, but in any order with other V2s).  Typically, I use V2 for this kind of task.
    matt

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

  • How to run SE30 on an update task, http, etc.

    I don't have any issue, it's just for your information, as I couldn't find the question in the forum or sap notes.
    I wanted to trace the updates triggered by a dialog transaction (MIR4 in my case, but this may apply to any transaction, and even batch programs).
    I tried to activate update debugging, and when debugger starts automatically (at first update function module), I ran the trace from SE30 in "parallel mode" (as the update task seemt to be captured in dialog in exclusive mode) but it gives an empty trace.
    The solution was to click the "Schedule For User/Service" button in SE30. It is possible to schedule a trace to start automatically for a user (enter yours), a client (enter current client), a given external session (choose Any for an update task), process category i.e. either a workprocess type (DIA, BGD, UPD) or other types (RFC, HTTP, etc.) (choose Update), object type is used to restrict (choose Any).
    There is a "Max. No. of Sched. Measurements" field.
    Now the next Update task with these criteria will automatically start a trace.

    As the SDN wiki is now "semi-closed" , I'll try to post it to the Docupedia's wiki

  • Function module in update task

    hello!
    i am using userexit mv50afz1 in the FORM USEREXIT_SAVE_DOCUMENT.  i am using transaction vl09
    and thourgh this transaction  i am using a bi for updating a field in transaction vl02n.
    since both transactions are connected i used the fm in update task.
    i have two problems:
    1.when i am trying to debugg the fm i dont see the debugger go into it. i know that i should switch something on but i dont know what.
    2. after i cancel the post good issue and push enter i get the following message
    Express document "Update was terminated" 
    what exactly is it?

    Hi!
    1. You can switch on 'update debugging' in menu point 'settings'. Normally second session appears where update execution will run. If you have problems, try break-point at commit work and execute this command with F5. That works for sure.
    2. You have a wrong program design. With an additional commit work you have corrupted the transaction logic -> now your logical unit of work was splitted into two (or more) parts and something like 'cancel' leads to inconsistencies.
    3. You can make your changes 'later' (outside of this transaction). Create some change pointers, which will build a todo-list. A separate report can read them, call transaction and mark the pointers as 'obsolete' (with 'X').
    Have a look at the following posts, to get an idea of 'how to':
    Asynchronous function
    regarding reports
    WE81 BD50
    Kind regards,
    Christian

  • Function module In Update Task is called more than once

    Hi experts!!
    I had a requirement to Create a Customer ( i will call it B) when another Customer (A)  is created (ON SAVE).
    I used a Badi to implement the requirement, and inside my Badi i have 2 Function Calls in Update Task.
    The first one to create Customer B and the second one to send Customer's B data to another System.
    Even though the second function call is inside an IF-ENDIF condition ( so that only Customer's B data are sent) the function is called twice sending the same data. My guess is that since the First Function saves the Customer to the database, that is the reason why the second Function is called twice.
    Is there any way i can control how many times a Function In Update Task is called????
    Please help!!
    Thank you in advance!!

    Hi BreakPoint & thank you for your reply!!
    I tried your suggestion but even if i fill the flag during the first call the function is called twice. Looks like during the second database commit the function is called with the correct conditions met but twice.
    Also while debugging it looks like it is only called once. It s very strange!
    Any other ideas???

  • Calling FM in update task

    Hi,
       I read SAP document saying that if we call an update function module like
       CALL FUNCTION <FM_NAME> IN UPDATE TASK.......
      we can have a log of parameters passed to the function module in VBLOG table.
      I Created an update FM and I am passing parameters and inside that I am updating a customized table.
      But, When I debug control never goes into that FM source code and the table is not updated.
      What may be the reason.
    Thanks and regards,
    venkat

    Did you understand the concept of update function modules at all ?
    The call to the update FM is logged in the table VBLOG along with the actual parameters.
    The actual processing starts after the COMMIT WORK statement. Read the SAP documentation thoroughly, it is explained in a very simple manner there. [http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_UPDATE.htm]
    BR,
    Suhas

  • Regarding function module in update task

    Hi,
    I have a function module(Zxxx) which is update type. i have called the fun.module in my program (Zyyy) using the syntax CALL FUNCTION ZXXX IN UPDATE TASK. As I suppose to debug the function module, I activated the update debugging in the debugging screen. But the controll still not goen into the function module. Please let me know solution.
    Thanks & regards,
    Suresh

    >
    sureshkumar vaniyasekar wrote:
    > I activated the update debugging in the debugging screen. But the controll still not goen into the function module.
    Hello Suresh,
    What do you mean by not going?
    If you are trying to do an F5 at the function call, the debugger is not "enter" into the FM. This is because at this point the function call is registered but the FM is not executed.
    Update FM calls registered in a particular LUW are executed(in a special "UPD" workprocess) when there is a COMMIT encountered(may be explicit or implicit).
    Did you read the online help on [Update Debugging|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/c6/617d0ce68c11d2b2ab080009b43351/content.htm] & [Breakpoint behaviour during Update Debugging|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/c6/617cbee68c11d2b2ab080009b43351/content.htm]?
    BR,
    Suhas

  • Update termination error while calling FM in Update task

    Hi Friends,
    I am calliing my Z Function Module in update task from my report, my function module contain reuse alv list display fm which should create a Spool in the spool list.
    When ever i am directly executing my Z function module i am getting spool in SP01, but when ever i am calling the Z Function Module in update task from my report i am getting a message as "Express document "Update was terminated" received from author.
    I want to call the Function module in update task and it should generate spools .
    Syntax:
    CALL FUNCTION 'ZLOK_TEST' IN UPDATE TASK.
    Commit work.
    Thanks Regards,
    Sandipan jena

    Hi sandipan jena,
    a function called in update task will not create a spool list if not told so to to. Only reports scheduled in a JOB will put the output into spool.
    Make sure you have no COMMIT WORK and no MESSAGE output when in UPDATE TASK. You can enter /h and in debugger switch on UPDATE debugging. This will lead you to any error occurring.
    You should analyze the errors you get. Mabe NEW-PAGE PRINT ON can help you.
    Regards
    Clemens

  • 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

  • Function modules called in update task

    Hi,
    I am calling two function modules in update task sequentially. I want to know whether these two function modules are also called sequentially in update debugging also?
    My code is like this
    1. call FM1 in update task
    2. Call FM2 in update task
    will this be the same sequence at the time of execution also? or will it be random?
    Thanks in advance.

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

Maybe you are looking for

  • Unable to log and capture HD from HVR-25J

    Hi Does anyone know why I am not able to capture 1080i50 material from HVR-25J to the FCP 5 running in MAC PRO 3.0GHZ. The setup i have in the HVR is: i link set to HDV (i link off). video out is 1080i50 i link is connected to fire wire in mac and i

  • Wav files on external drive will not work in Apple Loops

    When I import wav files (from Nu Jazz Funk library) by dropping on the AL browser from an external drive, Apple Loops insists on copying them to my system drive (no option to make use current location). If I manually make an alias, the files show up,

  • ERROR REGARDING INTEGRATION SERVER

    hai am k chandrakanth from bangalore a beginner in sap-xi,below am posting feew question s,kindly revert back with suitable answers with screen shots if possible(note: these are all the problems which am facing inmy PC) 1)during INTEGRATION SERVER CO

  • Kernel Panic log - help needed in intrepreting

    So, my Mac's fans ran reeeealy high whis morning, but I have no problem starting it. The fans are stilling running at maximum speed though.. Any idea what this means? Sun Jan  1 01:05:42 2012 panic(cpu 6 caller 0xffffff7fa2fa5fac): "GPU Panic: [<None

  • How to Create header text in Quotations?

    Helli Experts, Can anybody of you tell me how to create Header text for Quotations in SD? I want to fetch it into Layout Set. I want to hardcode it. Harish