Tracing in Update Task

Hello together,
is there any posibillity to trace an function module that runs in update task mode?
I try to save some data in a table but this doesen't work reliable...
Thomas

Hi Thomas,
We could do that by using the following syntax
CALL FUNCTION update_function IN UPDATE TASK
                             [EXPORTING p1 = a1 p2 = a2 ...]
                             [TABLES t1 = itab1 t2 = itab2 ...].
Or use the update debugg mode to trace out.
Thanks,
Sunil

Similar Messages

  • 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 do I SUBMIT from a user exit which is called in an update task?

    I want to send an idoc each time there is a goods movement. So, in the user exit of MB_POST_DOCUMENT I am calling IDOC_OUTBOUND_WRITE_TO_DB. This creates an idoc of status 30. However, in order to send the idoc I want to SUBMIT RSEOUT00. I get an ABAP dump on the SUBMIT because MB_POST_DOCUMENT is called in the update task, where SUBMIT is not allowed. Do you know any other way I can execute RSEOUT00 at this moment without having to call it later in batch?
    Thanks!!
    Joy

    Hi Naren,
    Your reply is VERY helpful!! Thank you so much.
    I added  CALL FUNCTION 'RSAP_IDOC_EINBUCHEN_VOM_BIW_4' IN BACKGROUND TASK. I am no longer getting the dump, but my idoc is still a status 03 and not a status 30. Should I expect to see it turn to a status 30? I ran this function directly in SE37 -> Test with the same parameters and it ran perfectly and turned the idoc to a status 03. Is there anything else I need to do in the code?
    Thanks again,
    Joy

  • 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

  • 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

  • Update tasks - Transfer Order creation.

    I have an issue in our production environment where in some situations a Transfer Order (TO) is created with missing storage handling unit information.  This only happens intermittently, and when the TO is cancelled and re-created, it is created with the correct storage unit information.
    I have looked at the TO creation function l_to_create_int and it is called from within an update function module l_communication_to_create.  The l_to_create_int function is not called within an update task.  The function within l_to_create_int which creates the storage handling unit is an update function module (function L_TA_HINZUFUEGEN).
    So my question is, what happens when you have a combination of function modules called as an update and function modules called normally?  Will the updates in the function called normally update outside of the update task commit?  I'm beginning to think that the problem may be caused by inconsistencies in when updates are completed by the program.
    I'd greatly appreciate any help or guidance regarding this issue.
    Kind regards,
    James Mandikos.

    Hi James,
    You are correct, a function module must be explicitly be called in 'UPDATE TASK' for it to be executed in the update task (regardless of the settings flagged in SE37).
    If, however, it is called in UPDATE TASK there are four possible settings you can have in SE37 which each behave differently (as of the release I am looking at at the moment - R/3 4.7).
    Here is my understanding of how the settings behave:
    <b>Start immed.</b>
    Will run in a V1 update process together with all other update functions called in the same LUW with Start immed. flagged.
    <b>Immediate start, no restart</b>
    As above, but cannot be reprocessed via transaction SM13 in the case of error (but can be viewed).
    <b>Start delayed</b>
    Will run in a V2 update process individually.
    <b>Coll.run</b>
    Will run in a V2 update process toegether with all other update functions called in the same LUW with Coll.run flagged.
    So given the data you have provided both your function modules should be running in a collective V1 process, and therefore if one failed then the whole transaction should have been rolled back (and hence this does not explain your problem). 
    <b>BUT</b> what may be happening is that for whatever reason the transaction fails (maybe due to heavy system load) and either your system admin (or an autmated job) is pushing through the error in SM13. As the function L_TA_HINZUFUEGEN is flagged as immediate start, no restart then it will not be processed and the L_TO_CREATE_INIT will be.  This could exactly explain your problem.
    Hope that makes things clearer.
    Cheers,
    Brad

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

  • OIM: Error while updating Task Attributes

    Hi All,
    I am trying to use PeopleSoft User Management using OIM connector.
    I am facing an error saying "problem in updating Task Attributes" while scheduling a task on OIM design Console. I am trying to update and save PSFT Base Non Trusted User Reconciliation. following is the log message displayed in server command prompt.
    ERROR,11 Apr 2008 05:02:53,287,[XELLERATE.SERVER],Class/Method: tcTSA/eventPostU
    pdate encounter some problems: problem in updating Task Attributes
    com.thortech.xl.scheduler.exception.SchedulerGenericException: problem in updati
    ng Task Attributes
    at com.thortech.xl.scheduler.core.quartz.QuartzSchedulerImpl.updateTaskA
    ttributes(Unknown Source)
    at com.thortech.xl.scheduler.ejb.SchedulerControllerBean.updateTaskAttri
    butes(Unknown Source)
    at com.thortech.xl.scheduler.beans.SchedulerControllerSession.updateTask
    Attributes(Unknown Source)
    at com.thortech.xl.scheduler.beans.SchedulerController_z4f4d2_EOImpl.upd
    ateTaskAttributes(SchedulerController_z4f4d2_EOImpl.java:478)
    at com.thortech.xl.scheduler.beans.SchedulerController_z4f4d2_EOImpl_CBV
    .updateTaskAttributes(Unknown Source)
    at com.thortech.xl.dataobj.tcTSA.eventPostUpdate(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    at com.thortech.xl.ejb.databeansimpl.tcDataObjectBase.save(Unknown Sourc
    e)
    at com.thortech.xl.ejb.beans.tcTSA_u3xmy2_EOImpl.save(tcTSA_u3xmy2_EOImp
    l.java:1437)
    at com.thortech.xl.ejb.beans.tcTSA_u3xmy2_EOImpl_WLSkel.invoke(Unknown S
    ource)
    at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(Activata
    bleServerRef.java:90)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:434)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
    a:429)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:35)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Caused by [Nested Exception]:
    java.lang.NullPointerException
    at com.thortech.xl.scheduler.core.quartz.QuartzSchedulerImpl.updateTaskA
    ttributes(Unknown Source)
    at com.thortech.xl.scheduler.ejb.SchedulerControllerBean.updateTaskAttri
    butes(Unknown Source)
    at com.thortech.xl.scheduler.beans.SchedulerControllerSession.updateTask
    Attributes(Unknown Source)
    at com.thortech.xl.scheduler.beans.SchedulerController_z4f4d2_EOImpl.upd
    ateTaskAttributes(SchedulerController_z4f4d2_EOImpl.java:478)
    at com.thortech.xl.scheduler.beans.SchedulerController_z4f4d2_EOImpl_CBV
    .updateTaskAttributes(Unknown Source)
    at com.thortech.xl.dataobj.tcTSA.eventPostUpdate(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    at com.thortech.xl.ejb.databeansimpl.tcDataObjectBase.save(Unknown Sourc
    e)
    at com.thortech.xl.ejb.beans.tcTSA_u3xmy2_EOImpl.save(tcTSA_u3xmy2_EOImp
    l.java:1437)
    at com.thortech.xl.ejb.beans.tcTSA_u3xmy2_EOImpl_WLSkel.invoke(Unknown S
    ource)
    at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(Activata
    bleServerRef.java:90)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:434)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
    a:429)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:35)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    ERROR,11 Apr 2008 05:02:53,287,[XELLERATE.SERVER],Class/Method: tcDataObj/save E
    rror :Data Update Failed
    ERROR,11 Apr 2008 05:02:53,302,[XELLERATE.DATABASE],Class/Method: tcDataBase/rol
    lbackTransaction encounter some problems: Rollback Executed From
    java.lang.Exception: Rollback Executed From
    at com.thortech.xl.dataaccess.tcDataBase.rollbackTransaction(Unknown Sou
    rce)
    at com.thortech.xl.dataobj.tcDataObj.rollback(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.doRollback(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    at com.thortech.xl.ejb.databeansimpl.tcDataObjectBase.save(Unknown Sourc
    e)
    at com.thortech.xl.ejb.beans.tcTSA_u3xmy2_EOImpl.save(tcTSA_u3xmy2_EOImp
    l.java:1437)
    at com.thortech.xl.ejb.beans.tcTSA_u3xmy2_EOImpl_WLSkel.invoke(Unknown S
    ource)
    at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(Activata
    bleServerRef.java:90)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:434)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
    a:429)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:35)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    I am facing above error when try to update any task in the task scheduler.
    Can anyone please suggest me where i am going wrong?
    Thanks,
    Uma.

    I would assume you are missing the jar file for your scheduled tasks. Try and create a new scheduled task with the same class name, if it won't let you save, this is your answer. You'll want to make sure you have the connector scheduled task file in the ScheduleTask folder in your OIM directory.
    -Kevin

  • Install Updates task not working during Build and Capture in SCCM 2012

    Working with a new SCCM 2012 installation.
    We are trying to get a Build and Capture TS to install all updates for Win7SP1.
    All packages are deployed to DP, build and cap machine is in a collection with all updates deployed to it. Agent installation parameters include "SMSMP" "SMSSLP" parameters. Machine is not being attached to the domain during OS install. 
    Updates can be pushed to existing domain machines, so obviously the updates themselves are working.
    The task sequence works correctly to install the image, but "Install Updates" task just sits there and eventually times out. (No indication of updates being installed.) If this task is working, shouldn't I see a Downloading Updates progress bar, or was that
    eliminated from 2012?

    Same issue for me except I'm running 2012 R2 my B&C runs forever on Install Software Updates, eventually just rebooting and coming back to the login screen of Windows 7 without ever finishing the Install Updates.
    Been working on it litteraly for weeks.
    1- Tried adding .Net 4.52 as an application installation thinking maybe it would resolve the issue
    2- Tried installing via Run Command Line + DISM all hotfixes that require 2 reboots as per (https://support.microsoft.com/en-us/kb/2894518)
    3- Tried to simply REMOVE the same hotfixes from my Software Update Groups alltogether.
    4- Injected all applicable software updates through Offline Servicing in the SCCM Console (Schedule Updates) on the Windows 7 DVD wim file. That way my logic was that once it would hit the Software Updates, there would be a lot less to install.
    I'm at the point where I had to open a case with Microsoft Premier Support as of yesterday. So, nothing new to report yet. But yes, this is a true pain in the ***.
    For the sake of comparison, I am running 4 Update Groups: one containing patches up to 2012. Another one for 2013, 2014 and 2015. I have patches for Windows 7 + Office of all categories except Service Packs.
    If someone has any ideas, feel free to chime in. 

  • In update task & Express document Update was terminated

    Hi all
    Need help!
    Requirement: When i do confirmation through CO11N i have to do GI through a BADI.
    Solution: I have written a wrapper Update module(internally has /AFS/BAPI_GOODSMVT_CREATE) with Start delayed and called that module(in update task) in the method MB_DOCUMENT_BEFORE_UPDATE of the definition MB_DOCUMENT_BADI.
    It works fine when every thing is correct, but if GI fails its still confirms the confimation and "Express document Update was terminated" pops up when i push the back button. I have written a abort statement in the update module if goods movement fails. When i check SM13 it shows the reason for erroring out. But my requirement is to stop the complete transaction if GI fails and put the error message at the bottom of screen(CO11N)
    How can i do this?
    Appreciate any suggestions.

    Hi,
    I don't think that it is possible. It's too late to call rollback. The FM in update task is called after command COMMIT WORK. Here is a quote from ABAP documentation:
    If during the update an error occurs, the update work process executes a database rollback, returns the log record with a note into table VBLOG and informs the user whose program has created the log record by SAPMail. After removing the error cause, the returned log records can be updated again.
    So you should call that module only in case that you are 100% sure that it will be processed correctly.
    Cheers

  • BPM error while updating task

    Hi, I'm using an initiator Task form a process in BPM with SOA version 11.1.1.6 and JDeveloper 11.1.1.6 and everytime I try to update the task I get this error:
    ORABPEL-10101
    Error while updating task .
    Error while updating task Cannot delete Comments.
    Check the underlying exception and database connection information. If the error persists, contact Technical Support Services at Oracle.
    at oracle.bpel.services.workflow.repos.driver.WFTask.updateComments(WFTask.java:5384)
    at oracle.bpel.services.workflow.repos.driver.WFTask.updateWFTask(WFTask.java:2712)
    at oracle.bpel.services.workflow.repos.driver.PersistencyService.updateWFTask(PersistencyService.java:630)
    at oracle.bpel.services.workflow.task.impl.TaskService.performPostActionOperationInTrans(TaskService.java:6586)
    at oracle.bpel.services.workflow.task.impl.TaskService.performPostActionOperation(TaskService.java:6306)
    at oracle.bpel.services.workflow.task.impl.TaskService.performPostActionOperation(TaskService.java:6277)
    at oracle.bpel.services.workflow.task.impl.TaskService.performPostActionOperation(TaskService.java:6253)
    at oracle.bpel.services.workflow.task.impl.TaskService.performPostActionOperation(TaskService.java:6235)
    at oracle.bpel.services.workflow.task.impl.TaskService.updateTask(TaskService.java:2088)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    I've tried to remove the userComments from the Task Form, and remove anything associated with it, but everytime I try to savbe the task it gets this error
    thanks

    Hi,
    Have you solved the problem? For I have met the same problem, Could you share it with me.
    thanks a lot.

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

  • 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

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

  • 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

Maybe you are looking for