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.

Similar Messages

  • 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

  • Call function in update task empty variables error

    Hello,
    I'm experiencing a weird error while using the addition "In update task".
    My Scenario is the following:
    Use the bapi_goodsmvt_create -> if there are no errors, fill some values and call my function and then commit everything.
    The problem is, when the function runs in update task, all import parameters are empty!
    Also, this only happens in the following code structure
    CALL METHOD run_migo( IMPORTING bapireturn = t_bapireturn).
    IF t_bapireturn IS INITIAL.
      CALL METHOD save_custom_tables. "this runs my function 'IN UPDATE TASK'
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    ENDIF.
    if I commit inside the method SAVE_CUSTOM_TABLES, the data is passed normally to the function, if I commit like the code above, everything is empty.

    Here's the code:
    METHOD save_partial.
      DATA: t_wegritm    LIKE gt_wegritm,
            t_tegrp_parc TYPE TABLE OF ztegrp_parc,
            w_tegrp_parc TYPE ztegrp_parc,
            w_tegrk_parc TYPE ztegrk_parc.
      FIELD-SYMBOLS <w_wegritm> LIKE LINE OF t_wegritm.
      t_wegritm = gt_wegritm.
      DELETE t_wegritm WHERE mengee IS INITIAL.
      CHECK NOT t_wegritm IS INITIAL.
    *-->save xml iten
      LOOP AT t_wegritm ASSIGNING <w_wegritm>.
        MOVE-CORRESPONDING <w_wegritm> TO w_tegrp_parc.
        w_tegrp_parc-id = gw_tegrk-id.
        w_tegrp_parc-gr_docto = <w_wegritm>-gr_docto.
        w_tegrp_parc-gr_mjahr = <w_wegritm>-gr_mjahr.
        w_tegrp_parc-gr_zeile = <w_wegritm>-gr_zeile.
        APPEND w_tegrp_parc TO t_tegrp_parc.
      ENDLOOP.
      MOVE-CORRESPONDING gw_tegrk TO w_tegrk_parc.
      CALL FUNCTION 'Z_SAVE_PARTIAL'
        IN UPDATE TASK
        EXPORTING
          iw_tegrk_parc = w_tegrk_parc
        TABLES
          it_tegrp_parc = t_tegrp_parc.
    ENDMETHOD.
    I tried to re-create this scenario with a local class, but the code that I originally sent worked(the commit work outside of the routine).

  • Queries on  Call Function In update Task

    Hi ,
         I have a requirement where I have to update a ztable in background once I execute the report.THe requirement is to exceute the updation in background.Will
    Call funtion in update task help me?If yes, I have never used call function in update task .so can you guide me on the same.If no, how best can  I acheive this?
    Thanks & Regards,
    Jyotsna

    Hi,
    look F1 to call function pls:
    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.
    -> so in error case you can analyse err. with TA SM13
    (update records)
    regards Andreas

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

  • Call Function in Update task

    I have written the FM Call function 'COMMITROUTINE' in update task.
    but this FM is not getting triggered when some commit happens. In all, this FM is not commiting tha data in the table.
    CALL FUNCTION 'COMMITROUTINE' IN UPDATE TASK
      EXPORTING
        lt_dfkkbrlevyrec       = lt_dfkkbrlevyrec
    and the
    What is missing in it?
    Regards,
    Seema Dadhwal.

    Hi,
    if you want to call your FM when a commit happens you should write a routine which is called upon commit and this routine will call your fm.
    e.g
    form call_my_fm .
    CALL FUNCTION 'COMMITROUTINE' IN UPDATE TASK
    EXPORTING
    lt_dfkkbrlevyrec = lt_dfkkbrlevyrec
    endform.
    perform call_my_fm on commit.
    commit work. " now your routine will be called
    Kostas

  • Is It Possible to use Call Function in update task in perform on commit

    Hi Friends,
    I have to send an email once the commit work is done. so i am writing code like this,
    Perform send_email on commit.
    form send_email.
    call function 'SO_NEW_DOCUMENT_SEND_API1' in update task
    endform.
    endform.
    .... ( Some other code)
    commit work.
    But, I am getting error saying Update task is not possible. Please suggest me how to solve this.
    Thanks in Advance,
    Phani.

    Hi Phani,
          Check whether <b>COMMIT Work</b> has be performed. I think this might be the problem.
    Regards,
    Prashanth

  • Calling function in Update Task problem

    Hello Friends,
    I'm calling FM 'REVISION_LEVEL_POST' in Update Task to insert a revision level for a material when saving a Change Master (CC02 T-Code). But the calling is triggered a bit early (Before updating the Data Base AEOI Table!). An Update Task FM is called right after the COMMIT WORK is executed. Here in my case, a commit work is done but not for my change Master but for a text... So my FM does not find the record to be updated.
    Is there a way to solve this ?
    Thank you for your Help!

    Check the log in VBLOG table ..

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

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

  • 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

  • Help with Update task

    Hi friends,
    In the below am trying to update a custom table using a call function in update task. I dont see the table getting updated can someone take a look at it and let me knw what the problem is? I have the commit work statement and also marked the function module as an update one in the attribute. Please help me . Thanks in advance! kathy
    *&  Include           ZINBOUND_TEST
    Report: ZINBOUND_TEST.
    DATA: l_dest     TYPE REF TO if_bgrfc_destination_inbound,
          l_unit     TYPE REF TO if_trfc_unit_inbound,
          l_inb_dest TYPE bgrfc_main_i_dst,
          lv_matid TYPE /sapapo/matid,
          lv_matnr TYPE /sapapo/matnr,
          lv_maktx type /SAPAPO/MAKTX,
          lv_langu  TYPE LANGU.
    data: lt_product type  STANDARD TABLE OF ZUPDATE,
          ls_product type ZUPDATE.
    lv_matid = '123'.
    lv_langu = 'E'.
    lv_maktx = 'Materia1'.
    CALL FUNCTION 'Z_TEST' IN UPDATE TASK
      EXPORTING
        iv_matid = lv_matid
        iv_maktx = lv_maktx
        iv_langu = lv_langu .
    COMMIT WORK.
    select * from zupdate into corresponding fields OF TABLE lt_product.
    if sy-subrc <> 0.
      write 'no records added'.
    else.
      loop at lt_product into ls_product.
        write: / ls_product-MATID,
                 ls_product-MAKTX.
      endloop.
    endif.
    FUNCTION Z_TEST.
    *"*"Update Function Module:
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(IV_MATID) TYPE  /SAPAPO/MATID
    *"     VALUE(IV_MAKTX) TYPE  /SAPAPO/MAKTX
    *"     VALUE(IV_LANGU) TYPE  LANGU
    data: itab type standard table of zupdate,
    wa_itab type zupdate.
    wa_itab-matid = iv_matid.
    wa_itab-maktx = iv_maktx.
    wa_itab-langu = iv_langu.
    append wa_itab to itab.
    update zupdate from table itab .
    ENDFUNCTION.
    Edited by: ka reddy on Sep 24, 2009 4:14 PM
    Edited by: ka reddy on Sep 24, 2009 4:15 PM
    Edited by: ka reddy on Sep 24, 2009 4:16 PM
    Edited by: ka reddy on Sep 24, 2009 4:17 PM
    Edited by: ka reddy on Sep 24, 2009 4:21 PM

    Hey Naimesh thanks for the reply. yeah i read that document way before and i started taking a stab at implementing it.
    I started with update task to see how it behaves and then wanted to go with BGRFC tats when i had the update issue.
    Now that am done with update i want to implement BGRFC.
    I have modified the earlier prgm...Can you give me some ideas how to extend this? Thanks!
    *&  Include           ZBGRFC_INBOUND_TEST
    Report: ZBGRFC_INBOUND_TEST.
    DATA: l_dest     TYPE REF TO if_bgrfc_destination_inbound,
          l_unit     TYPE REF TO if_trfc_unit_inbound,
          l_inb_dest TYPE bgrfc_main_i_dst,
          lv_matid TYPE /sapapo/matid,
          lv_matnr TYPE /sapapo/matnr,
          lv_maktx type /SAPAPO/MAKTX,
          lv_matid1 TYPE /sapapo/matid,
          lv_matnr1 TYPE /sapapo/matnr,
          lv_maktx1 type /SAPAPO/MAKTX,
          lv_langu1  TYPE LANGU,
          lv_langu  TYPE LANGU.
    data: lt_product type  STANDARD TABLE OF ZUPDATE,
          ls_product type ZUPDATE.
    lv_matid = '125'.
    lv_langu = 'E'.
    lv_maktx = 'Materia3'.
    **--Get the inbound destination for BGRFC.
      IF l_inb_dest IS INITIAL.
          SELECT SINGLE * FROM bgrfc_main_i_dst INTO l_inb_dest.
        ENDIF.
        l_dest = cl_bgrfc_destination_inbound=>create( l_inb_dest-destination ).
        l_unit = l_dest->create_trfc_unit( ).
    CALL FUNCTION 'Z_TEST' IN BACKGROUND UNIT l_unit
      EXPORTING
        iv_matid = lv_matid
        iv_maktx = lv_maktx
        iv_langu = lv_langu .
    select * from zupdate into corresponding fields OF TABLE lt_product.
    if sy-subrc <> 0.
      write 'no records added'.
    else.
      loop at lt_product into ls_product.
        write: / ls_product-MATID,
                 ls_product-MAKTX.
      endloop.
    endif.
    Edited by: ka reddy on Sep 24, 2009 5:16 PM

  • SET UPDATE TASK LOCAL

    hi,
    I understand that when we use CALL function in UPDATE TASK....all the modifcations/database updations that are done in that FM are commited only once , at the end of the FM . there in no explicit commit work required.
    I went through sap help and many other sdn threads for understading the funationality of SET UPDATE TASK LOCAL...however i could not understand. Can anybody let me know the exact funationality of this with an example

    Hi
    The idea to run processes in Update task is guarantee system high availability.
    For more details you can check [Update Task documentation|http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_UPDATE.htm]
    Best regards

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

  • 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

Maybe you are looking for

  • Trying to open Adobe Bridge from Photoshop CC 2014 will launch Creative Cloud

    As written in the subject, I have the problem that Bridge doesn't start anymore since updating to Photoshop CC 2014. Instead the creative Cloud desktop application is launched and tries to reinstall Bridge CC (although it is already installed) All ol

  • How do i remove a user from mac OS X Mavericks ??

    i bought a new Macbook Pro retina display week ago and i wanna give my old one to my sister but i want to leave tha applications to tak the benefits from it, what is the easiest way to do it without reinstalling the the software again.

  • How can I mail merge in new Pages 5.2 and send it by Mail?

         How can I merge mail in the new Pages version 5.2  and send it by Mail?      It seems that there is not  a mail merger available anymore for Pages. Although it is a powerfull mecanism to send a bunch of letters by Mail, Apple has  downgraded the

  • Generate a subtotals table in Adobe LiveCycle Designer

    Hi everybody. I'm having troubles with a template named Customer Invoice (of Application and user management > Business Flexibility > Form Template Maintenance), the case is I modified the template to show a subtotals table that I generate by code (F

  • Adobe Reader XI Web Based Review - No Login Box

    Hi, Has anyone experienced problems when opening a PDF for browser based review on Adobe Reader XI? It works perfectly fine on Reader X but as more users upgrade to Reader XI we are having to ask them to downgrade to use our web based review. The pro