Exceptions in FM in update task

Hi,
Do you know if it's possible to raise excptions in a Function Module called in Update Task mode ?
Thanks

Hi,
  You cannot catch exceptions for the function modules that are called in update task.
  Generally you will be raising an abort message inside the Update function module..
  Ex..
  IF sy-subrc <> 0.
    MESSAGE a208(00) with 'Update failed' RAISING update_failed.
  ENDIF.
  In case if the function module is not called in update task...Then the above raise an exception which can be caught in the calling place..
Thanks
Naren

Similar Messages

  • 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

  • Getting INTERNAL_ERROR while updating tasks in OIM

    Hi,
    I have written a custom connector and wrote tasks to update the attributes in the target system. After the approval workflow the user got provisioned to the target system and i am able to update all the attributes like firstname,lastname etc. I have written custom target recon to reconcile all the users from the target system that also is working fine but the problm is I couldnt update any of the attibutes of the reconciled users.Im getting the following exception.Its not calling the task itself
    Please help me to solve this issue
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Running ISADAM
    Target Class = java.lang.String
    Running Get Attribute Map
    Running Set Attributes
    <Nov 25, 2010 8:00:06 AM CST> <Warning> <Socket> <BEA-000450> <Socket 12 internal data record unavailable (probable closure d
    ue idle timeout), event received 17>
    com.thortech.xl.dataobj.util.tcAdapterTaskException: INTERNAL_ERROR
    at com.thortech.xl.adapterfactory.events.tcAdpEvent.getRunTimeValue(Unknown Source)
    at com.thortech.xl.adapterfactory.events.tcAdpEvent.getRunTimeValue(Unknown Source)
    at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpLNMODIFYUSER.implementation(adpLNMODIFYUSER.java:73)
    at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
    at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
    at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcOrderItemInfo.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.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperationsSession.setProcessFormData(Unknown Source)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperations_2j82mm_EOImpl.setProcessFormData(tcFormInstanceOperations_2j82m
    m_EOImpl.java:472)
    at Thor.API.Operations.tcFormInstanceOperationsClient.setProcessFormData(Unknown Source)
    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)
    at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
    at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
    at $Proxy67.setProcessFormData(Unknown Source)
    at com.thortech.xl.webclient.actions.UserDefinedFormAction.editForm(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    Thanks

    I want to update the attributes for eg password of the reconciled users from the OIMI assume that you talking about Target only.
    Do you wanna say that you have reconciled one account in OIM but when you change password in OIM tehn that password doesn't get updated in target resource.
    Have you configures Change User Password task and does you have entry for the same task in Trigger lookup ?
    What are the steps you following for testing your scenario ?

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

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

  • SAVE_TEXT in update task

    hi,
    In my program i have a requirement to save all the text after using COMMIT_TEXT.
    can anyone give me a sample code for using COMMIT_TEXT after SAVE_TEXT or give me an idea how and which FM to call in UPDATE TASK and do i required to use explicitly COMMIT WORK after calling FM COMMIT_TEXT.
    << Please do not offer rewards >>
    sandy
    Edited by: Rob Burbank on Mar 26, 2009 10:28 AM

    Hi,
    do this like this.
    u don't need to call as Update task and no need to have COMMIT WORK also.
    CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
    *     CLIENT                = SY-MANDT
         header                = gs_comm_thead
         insert                = 'X'
         savemode_direct       = 'X'
    *     OWNER_SPECIFIED       = ' '
    *     LOCAL_CAT             = ' '
    *   IMPORTING
    *     FUNCTION              =
    *     NEWHEADER             =
        TABLES
          lines                 = gt_commtline
       EXCEPTIONS
         id                    = 1
         language              = 2
         name                  = 3
         object                = 4
         OTHERS                = 5.
    Regards,
    Bharat.

  • Call transaction in update task

    Hi,
    I'm trying to call t-code V_V2 on update task but the update terminates with error "POSTING_ILLEGAL_STATEMENT". I've tried the same below code but without "In update task" and it worked correctly. Can anyone help me please?
    DATA:   bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE.
    "Open the 1st screen of transaction V_V2...
    CLEAR bdcdata.
      bdcdata-program  = 'SDV03V02'.
      bdcdata-dynpro   = '1000'.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    "Position the cursor on the material number field...
      CLEAR bdcdata.
      bdcdata-fnam = 'BDC_CURSOR'.
      bdcdata-fval = 'S_MATNR-LOW'.
      APPEND bdcdata.
      "Enter the material number on its field...
      CLEAR bdcdata.
      bdcdata-fnam = 'S_MATNR-LOW'.
      bdcdata-fval = matnr.
      APPEND bdcdata.
      "Position the cursor on the plant field...
      CLEAR bdcdata.
      bdcdata-fnam = 'BDC_CURSOR'.
      bdcdata-fval = 'S_WERKS-LOW'.
      APPEND bdcdata.
      "Enter the plant on its field...
      CLEAR bdcdata.
      bdcdata-fnam = 'S_WERKS-LOW'.
      bdcdata-fval = plant.
      APPEND bdcdata.
    "Position the cursor on the simulation checkbox field...
      CLEAR bdcdata.
      bdcdata-fnam = 'BDC_CURSOR'.
      bdcdata-fval = 'P_SIMUL'.
      APPEND bdcdata.
      "Clear the simulation checkbox field...
      CLEAR bdcdata.
      bdcdata-fnam = 'P_SIMUL'.
      bdcdata-fval = ' '.
      APPEND bdcdata.
      "Execute the program...
      CLEAR bdcdata.
      bdcdata-fnam = 'BDC_OKCODE'.
      bdcdata-fval = 'ONLI'.
      APPEND bdcdata.
      "A popup window will raise for change confirmation...
      CLEAR bdcdata.
      bdcdata-program  = 'SAPLSPO1'.
      bdcdata-dynpro   = '100'.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
      "Position the cursor on this popup window...
      CLEAR bdcdata.
      bdcdata-fnam = 'BDC_CURSOR'.
      bdcdata-fval = 'SPOP-OPTION1'.
      APPEND bdcdata.
    "Press the "YES" button...
      CLEAR bdcdata.
      bdcdata-fnam = 'BDC_OKCODE'.
      bdcdata-fval = 'YES'.
      APPEND bdcdata.
    CALL FUNCTION 'ABAP4_CALL_TRANSACTION_VB' IN UPDATE TASK
      EXPORTING
        tcode                         = 'V_V2'
      SKIP_SCREEN                   = ' '
        MODE_VAL                      = 'N'
        UPDATE_VAL                    = 'S'
      TABLES
        USING_TAB                     = bdcdata
      SPAGPA_TAB                    =
      MESS_TAB                      =
      EXCEPTIONS
        CALL_TRANSACTION_DENIED       = 1
        TCODE_INVALID                 = 2
        OTHERS                        = 3.

    Hi,
    use the following stmt. instead of calling FM ''ABAP4_CALL_TRANSACTION_VB'
    CALL TRANSACTION 'V_V2' USING BDCDATA MODE 'N' UPDATE 'S'......
    Hope it will work.

  • Call on update module without addition "in update task"

    Hi, folks!
    Could anyone please explain the behaviour of an update module that is called without addition "in update task" with regards to transactionality and locking? Where is the processing carried out - in the dialog step, I guess? Does a COMMIT WORK AND WAIT make any sense in this context? Will any locks be removed in this way?
    Thank you very much in advance!
    Cheers,
    Thomas

    Hi Thomas,
    Please find the below mentioned piece of code :
      call function 'Z_ZE0EDISTAT_UPDATE' in update task
           EXPORTING
                w_ZE0EDISTAT          =  struct_ZE0EDISTAT
           EXCEPTIONS
                NO_UPDATE            = 01.
    *&   Update Database with changes.
      COMMIT WORK AND WAIT.
    In this case whatever changes which will be done to the table 'ZE0EDISTAT' inside the FM 'Z_ZE0EDISTAT_UPDATE'  will ONLY be reflected in the database table  ZE0EDISTAT' when COMMIT WORK and WAIT statement is encountered. Else updates won't be visible. Hope it will clear some doubt of yours.
    Cheers
    VJ

  • I need to have COMMit WORK with in a FM, which is calling in UPDATE task

    Hello
    I am sending out the custom IDOC from SAP to partner application by writing a custom my_OB_IDOC_FM, well.
    With in this my_OB_IDOC_FM, for some functionality, i am using a standard SAP FM and I need to use a COMMIT WORK immediately after this standard SAP FM call.
    But, all my IDOC is calling in update task, so once am triggering IDOC (inturn my_OB_IDOC_FM is calling in UPDATE task) am getting dump because of that inside used COMIT WORK statement!
    So, pls. let me know how can replace this COMMIT WORK  or hoe can i fix my issue? can i do like CALL FUNCTION standard_SAP_FM in background task/seperate task? so that i can use COMMIT WORK?
    Thank you

    I've dealt with something similar before.
    You could make a new z-program and run in a background job... like this:
    * create the job
    CALL FUNCTION 'JOB_OPEN'
          EXPORTING
              JOBNAME          = mv_JOBNAME
          IMPORTING
              JOBCOUNT         = mv_JOBCOUNT
          EXCEPTIONS
              CANT_CREATE_JOB  = 1
              INVALID_JOB_DATA = 2
              JOBNAME_MISSING  = 3
              OTHERS           = 4.
    * submit the program to the job
        SUBMIT ZPROGRAM
          WITH i_ebeln in mr_ebeln
          WITH updall = 'X'
          WITH wq_simul = ''
          TO SAP-SPOOL
            DESTINATION sv_output_device
            IMMEDIATELY ''
            KEEP IN SPOOL 'X'
            WITHOUT SPOOL DYNPRO
          USER sy-uname
          VIA JOB mv_jobname NUMBER mv_jobcount
          AND RETURN.
    * submit the job
    CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
            JOBCOUNT             = mv_JOBCOUNT
            JOBNAME              = mv_JOBNAME
            STRTIMMED            = 'X'
        EXCEPTIONS
            CANT_START_IMMEDIATE = 1
            INVALID_STARTDATE    = 2
            JOBNAME_MISSING      = 3
            JOB_CLOSE_FAILED     = 4
            JOB_NOSTEPS          = 5
            JOB_NOTEX            = 6
            LOCK_FAILED          = 7
            OTHERS               = 8.

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

  • Call function module in backgrouns task and in update task

    Hi Gurus,Pls crear me on the " <b>Call function module in backgrouns task and in update task</b>".
    how it works and waht is the link with LUW  releated to these .
    also heard that commit work statement aslo linked with this.
    Pls clarfiy me with expalnation of code.

    Hi sridhar,
    the explanation already given is correct and good. Small add-on:
    All functions called during one LUW with addition IN UPDATE TASK are stored together with their actual parameters in a temporary memory area. The moment a COMMIT WORK is issued, the functions are released to be executed by a so-called update task which is running in the background. This explains why functions called in update task never return anything, no SY-SUBRC and no export or table parameters If a function called in update task raises an exception or runs into an error the calling user will get an express message informing about this. Also, all database updates done by this update process are rolled back to keep consistency.
    This proceeding helps to keep database tables consistent and allows the user to keep on doing his work before all database updates are complete. You may have seen messages like "material will be changed" after saving. If you open the same material immediately, you'll get a message "object locked by...<yourself>". This means the update task is still running.
    Regards,
    Clemens

  • Call FM in update Task ?

    Dear All,
    I've created a custom FM and I want to call this FM in update task.
    I'm passsing a tables parameter to this FM in update Task.
    Everything is fine but when I'm coming back to the main program the tables paramter is not having any value.
    It's becoming null.
    Can you tell me the reason y it's so ?
    Regards,
    Deepu.K

    Hi deepu,
    in update task only starts after the commit instruction of your program and it doesn't accept importing, changing parameters or exceptions. And table parameters are only valid for input.
    You might want to check the starting new task mode:
      CLEAR w_end.
      ltask = 'HELLOWORLD'.
      CALL FUNCTION 'Z_UPDATE_ZDSDM01' STARTING NEW TASK ltask PERFORMING f_go ON END OF TASK
        EXPORTING
          in = lin.
      WAIT UNTIL w_end IS NOT INITIAL.
      WRITE: 'Hi', lnew, l_subrc.
    *&      Form  f_go
    FORM f_go USING par TYPE clike.
      w_end = 'X'.
      RECEIVE RESULTS FROM FUNCTION 'Z_UPDATE_ZDSDM01'
              CHANGING xnew    = lnew
                      EXCEPTIONS lixo = 1 system_failure = 2 communication_failure = 3 OTHERS = 9.
      l_subrc = sy-subrc.
    ENDFORM.                    "f_go
    regards,
    Edgar

  • 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

Maybe you are looking for

  • How can I recover an overwritten PSD file?

    I was working on an image which is supposed to have many layers in it, I merged the layers and I supposed to save it as a JPG file, but I didn't. I accidentally save it as PSD with the same file name, and I turned off the application. Now, I couldn't

  • Security vulnerabilities in Studio 2.6

    The Studio 2.6 platform end of life is reached: http://fridge.ubuntu.com/2013/05/10/ubuntu-8-04-hardy-heron-end-of-life-reached-on-may-9-2013/ The current version is very vulnerable (including ssh heartbleed and bash Shellshock). Isn't it time for 2.

  • 5800 Xpress Music - cannot enter in textbox of WAP...

    Hi With my WebNWalk (on my Nokia 5800 Xpress Music), if I open a WAP page e.g. http://www.boringwork.net/wp2.wml I find that I cannot enter in the textbox or the select from the drop down - all I can do is follow the hyperlink I installed Opera Mini

  • Glazed Lists Classpath in NetBeans

    Hi, I'm developing an application in NetBeans, and would like to make use of the Glazed Lists API. I have downloaded the glazedlists-1.6.0_java15.jar file, but I'm not sure where to put it, or how to set my classpath so that I can use the glazed list

  • Loading ODS

    Hi All, Scheduled a load to an ODS. The request has turned red. It has already loaded about 3 million records. In the 'Details' section of the Monitor, the TRANSFER(IDOCS TRFC) , 3 data packages, say 1, 2, 3 are red. The same data packets1, 2, 3 are