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)

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

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

  • 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 called IN BACKGROUND TASK goes to work process DIA, not BGD

    I'm calling a function IN BACKGROUND TASK
    In SM50, I see it running in a DIA work process.
    I want it to run in a BGD work process.
    Can this be done?  If so, how?  If not, why not?

    Hi...
    It looks like, it will always run in DIA process and not Background process...I am not sure that we can change the work process
    Check the below link..
    http://help.sap.com/saphelp_40b/helpdata/pt/69/c24f864ba111d189750000e8322d00/content.htm
    What is written in the link is...
    "Background updates (CALL FUNCTION IN BACKGROUND TASK) represent a variant of remote function call that is synchronous with the end of a transaction (COMMIT WORK). In background updating, an update is run in another dialog work process that may be in the same or in another application server and R/3 System. Because such updates run in their own LUWs, they may start only after all critical updates have been completed. Otherwise, it would not be possible to roll back background changes in the event of an error in another update component. "
    IF you get the answer of whether we can change the work process then please let us know...

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

  • 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

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

  • 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

  • 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

  • Indicator when in update task

    Hi guys,
    is there a way to determine whether a process is in update task ? Simular to SY-BATCH, but for in update task. I haven't seen something like that.
    I have a problem in update task where a screen is called, and it is causing a dump.
    regards,
    Hans

    Hi hans,
    1. i just tested one case.
    2. If we call a FM, in update task,
    <b>  then the system variable SY-CPROG
       will have the value
       RSM13000</b>
      (since it is called by some system program)
    3. If we call this fm in normal mode thru some program,
       sy-cprog will have the program name.
    4. If we call this fm thru SE37,
        then sy-cprog will contain
       RS_TESTFRAME_CALL.
    regards,
    amit m.

Maybe you are looking for

  • Our thirty day trial period is over. I didn`t know we had to purchase anyway. cannot save any work because of it

    Our thirty day trial is over. We cannot now save anything . Everytime we try to save the thirty day calender pops up. It is asking us now to purchase iwork 09 can someone explain.

  • Out put to Microsoft excel

    Hello. I am new to LabVIEW and I am trying to get the output from NI SCXI 1600 using LabVIEW 8.0 in Microsoft Excel. Can anyone help me with this? Thanks. Raghu.

  • Reg Like profile

    Hi all We have a requirement on like profile... I have created a like profile on  characteristic "GROUP SIZE" and  in the assignments page... i have assigned this like profile to another characteristic "PRODUCT". when i execute the forecast in the ba

  • Best Approach to distribute business app

    I have created a new software product called Care Control.  It is a large system that works inside UK Care Homes.   The system uses lots of different technology, but fundamentally I am using a SQL Server Database and an IIS Server to host an interfac

  • Foreign language on my Apps

    Dear Community, I'm stuck in Europe for the next two years, just signed up for apple id etc. problem is that i now get itunes etc in the local lingo! can't make heads or tails out of it. how do I get everything on my iPad in a civilized language? thx