Usage of update Task Function Modules

During an application development using WDA I have stumbeled across this unique problem.
As recommended by SAP I am trying to use update function module to update my SAP Database. But calling the function in WDA does not update the database.
<b>On the other hand when I call the same function module without the key words in UPDATE task, it updates the database.</b>
<i>So my question is
Can I use Update task function modules in WDA?</i>
If answer is Yes, then I would like to know How?
If answer is No,  then what is the best practice for updating the SAP database in WDA applications.

Try Add a commit work after the call.
Cheers
Phil

Similar Messages

  • Run Time of update task function module

    Hi
    Any body please tell me how to find out the execution time for a update task function module with in a user exit.
    thanks in advance
    saravanan

    Vimal,
    if the INSERT tries to insert an existing key, check for sy-subrc = 4 in the function module, raise an error (duplicate key) and the iupdate process is aborted - you will get express message.
    It might be better to
    first lock the table
    then check the existence of key
    then call update function (update process will unlock).
    Regards,
    Clémens

  • 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

  • Problem in Update PO Function module in SRM

    Hi all,
    I am updating the existing PO with the Function Module 'bbp_po_app_update_po' in SRM system.When i execute this in my program , I am not getting any errors.
    After this function module call, I committed using 'Commit work and wait'. But my records are not updated. This function module Contains ''BBP_PD_PO_UPDATE''
    function module. It returns the value e_changed = 'X'. But records not updated in table. Please Advice.

    Hi
    I have built a FM to update the PO with a new line item I am getting the same error "update was terminated" when I executed this FM. I am giving here the code can you suggest something.
    FUNCTION Z_ADD_CR_TO_PO.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(CR_NUMBER) TYPE  CRMT_OBJECT_ID_DB
    *"  TABLES
    *"      MESSAGES STRUCTURE  BBP_PDS_MESSAGES
    DATA: lv_text(80)     TYPE c.
    DATA: ls_header_d     LIKE bbp_pds_po_header_d,
          lt_item_d       LIKE bbp_pds_po_item_d OCCURS 0 WITH HEADER LINE,
          lt_account_d    LIKE bbp_pds_acc OCCURS 0 WITH HEADER LINE,
          lt_partner_d    LIKE bbp_pds_partner OCCURS 0 WITH HEADER LINE,
          lt_orgdata_d    LIKE bbp_pds_org OCCURS 0 WITH HEADER LINE,
          lt_status       like   bbp_pds_status occurs 0 with header line ,
          wa_status       type bbp_pds_status,
          new_item_data       LIKE bbp_pds_po_item_d  ,
          new_account_data    LIKE bbp_pds_acc ,
          new_partner_data    LIKE bbp_pds_partner ,
          new_orgdata_data    LIKE bbp_pds_org,
          new_longtext_data   LIKE bbp_pds_longtext,
          new_tax_data        LIKE bbp_pds_tax,
          ls_header_c     LIKE bbp_pds_po_header_ic,
          lt_item_c       LIKE bbp_pds_po_item_icu OCCURS 0 WITH HEADER LINE,
          lt_account_c    LIKE bbp_pds_acc OCCURS 0 WITH HEADER LINE,
          lt_partner_c    LIKE bbp_pds_partner OCCURS 0 WITH HEADER LINE,
          lt_orgdata_c    LIKE bbp_pds_org OCCURS 0 WITH HEADER LINE,
          lt_messages     LIKE bbp_pds_messages OCCURS 0,
          lv_counter      TYPE i,
          lt_longtext_d   LIKE bbp_pds_longtext OCCURS 0 WITH HEADER LINE,
          lt_longtext_c   LIKE bbp_pds_longtext  OCCURS 0 WITH HEADER LINE,
          ls_new_header   LIKE bbp_pds_po_header_d,
          lt_tax like bbp_pds_tax occurs 0 with header line,
          lt_tax_c like bbp_pds_tax occurs 0 with header line,
          changed type c,
          newpoheader type BBP_PDS_PO_HEADER_D.
    DAtA :   new_item_guid type crmd_orderadm_i-guid,
              lin type i,
              new_number type i.
    tables : crm_jest.
    data : status_table type crm_jest occurs 0 with header line,
            original_status like   bbp_pds_status occurs 0 with header line.
    data : wa_req_details like zchg_req_details.
    data:   no_items(4)  .
    data : lineno(4).
    IF sy-batch = 'X'.
      MESSAGE i088(sf) WITH 'Beginn des Performancetests'(102).
    ENDIF.
    CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
      EXPORTING
        i_object_id       = cr_number
        i_attach_with_doc = ' '
        i_with_itemdata   = 'X'
        i_read_be_data    = ' '
      IMPORTING
        e_header          = ls_header_d
      TABLES
        e_item            = lt_item_d
        e_account         = lt_account_d
        e_partner         = lt_partner_d
        e_longtext        = lt_longtext_d
        e_orgdata         = lt_orgdata_d
        e_status          = lt_status
        e_tax             = lt_tax.
    IF sy-batch = 'X'.
      MESSAGE i088(sf) WITH 'GetDetail abgeschlossen'(105).
    ENDIF.
    original_status[] = lt_status[].
    describe table lt_status lines  lineno.
    *preapring header data....
    *Header Data ...
    MOVE ls_header_d TO ls_header_c.
    *CLEAR ls_header_c-object_id.
    *MOVE 'A' TO ls_header_c-guid.
    CONCATENATE 'Kopie von PO '(099) ' mit '(101) no_items ' Positionen'(100)
                INTO ls_header_c-description  .
    LOOP AT lt_partner_d WHERE p_guid = ls_header_d-guid.
      MOVE-CORRESPONDING lt_partner_d TO lt_partner_c.
      lt_partner_c-p_guid = ls_header_c-guid.
    *  CLEAR lt_partner_c-partner_guid.
      APPEND lt_partner_c.
    ENDLOOP.
    LOOP AT lt_orgdata_d WHERE p_guid = ls_header_d-guid.
      MOVE-CORRESPONDING lt_orgdata_d TO lt_orgdata_c.
    *  CLEAR lt_orgdata_c-guid.
      lt_orgdata_c-p_guid = ls_header_c-guid.
      APPEND lt_orgdata_c.
    ENDLOOP.
    LOOP AT lt_longtext_d WHERE guid = ls_header_d-guid.
      MOVE-CORRESPONDING lt_longtext_d TO lt_longtext_c.
    *  CLEAR lt_orgdata_c-guid.
      lt_longtext_c-guid = ls_header_c-guid.
      APPEND lt_longtext_c.
    ENDLOOP.
    DATA: ls_header_u TYPE  bbp_pds_po_header_u .
    MOVE-CORRESPONDING ls_header_c TO ls_new_header.
    MOVE-CORRESPONDING ls_new_header TO ls_header_u.
    ls_header_u-be_log_system = 'ESAPD12125'.
    loop at lt_status.
    status_table-objnr = lt_status-p_guid.
    status_table-stat = lt_status-stat.
    status_table-inact = lt_status-inact.
    modify crm_jest from status_table.
    endloop.
    * Item data ...
    * Fill the new item into item table
    describe table lt_item_d lines lin.
    new_number = lin + 1.
    CALL FUNCTION 'GUID_CREATE'
    IMPORTING
       EV_GUID_16       = new_item_guid.
    new_item_data-guid = new_item_guid.
    new_item_data-number_int = new_number.
    *move ls_header_u-guid to new_item_data-parent.
    new_item_data-description = 'test item'.
    new_item_data-category_id = lt_item_d-category_id.
    new_item_data-quantity = '2'.
    new_item_data-unit = lt_item_d-unit.
    new_item_data-subtype = lt_item_d-subtype.
    new_item_data-price = '10'.
    new_item_data-price_unit = lt_item_d-price_unit.
    new_item_data-deliv_date = sy-datum.
    new_item_data-product_type = lt_item_d-product_type.
    new_item_data-gross_price = '10'.
    *new_item_data-be_obj_item = new_number.
    new_item_data-be_object_type = lt_item_d-be_object_type.
    new_item_data-be_object_id = lt_item_d-be_object_id.
    new_item_data-be_plant = lt_item_d-be_plant.
    new_item_data-be_pur_group = lt_item_d-be_pur_group.
    new_item_data-be_pur_org = lt_item_d-be_pur_org.
    new_item_data-be_co_code = lt_item_d-be_co_code.
    new_item_data-be_doc_type = lt_item_d-be_doc_type.
    new_item_data-be_log_system = 'ESAPD12125'.
    new_item_data-src_object_type = 'ZBUS9000'.
    append  new_item_data to lt_item_d.
    *filling partner data for the new item.
    loop at lt_partner_d where p_guid = lt_item_d-guid.
    move-corresponding lt_partner_d to new_partner_data.
    clear new_partner_data-p_guid.
    clear new_partner_data-partner_guid.
    move new_item_guid to new_partner_data-p_guid.
    append new_partner_data to lt_partner_d.
    clear new_partner_data.
    endloop.
    *filling the account data for the new item.
    new_account_data-p_guid = new_item_guid.
    new_account_data-distr_perc = '100'.
    new_account_data-acc_no = '0001'.
    new_account_data-acc_cat = 'NET'.
    *new_account_data-g_l_acct = wa_req_details-gl_account.
    *new_account_data-network = wa_req_details-acc_number.
    new_account_data-g_l_acct = '0000402611'.
    new_account_data-network = '000090001903'.
    new_account_data-activity = '0010'.
    new_account_data-co_area = '1000'.
    append new_account_data to lt_account_d.
    *filling the tax data
    new_tax_data-p_guid = new_item_guid.
    new_tax_data-tax_code = 'U1'.
    new_tax_data-tax_code_origin = 'F'.
    new_tax_data-currency = 'USD'.
    append new_tax_data to lt_tax.
    *filling Org data for the new item.
    loop at lt_orgdata_d where p_guid = lt_item_d-guid.
    move-corresponding lt_orgdata_d to new_orgdata_data.
    clear new_orgdata_data-p_guid.
    clear new_orgdata_data-guid.
    move new_item_guid to new_orgdata_data-p_guid.
    append new_orgdata_data to lt_orgdata_d.
    clear new_orgdata_data.
    endloop.
    no_items = new_number.
    *updation of data to new tables.
    loop at lt_item_d.
    lv_counter = lv_counter + 1.
    MOVE-CORRESPONDING lt_item_d TO lt_item_c.
    MOVE ls_header_u-guid TO lt_item_c-parent.
    append lt_item_c.
      LOOP AT lt_partner_d WHERE p_guid = lt_item_d-guid.
        MOVE-CORRESPONDING lt_partner_d TO lt_partner_c.
    *    CLEAR: lt_partner_c-partner_guid.
        MOVE lt_item_c-guid TO lt_partner_c-p_guid.
        APPEND lt_partner_c.
      ENDLOOP.
      LOOP AT lt_account_d WHERE p_guid = lt_item_d-guid.
        MOVE-CORRESPONDING lt_account_d TO lt_account_c.
    *    CLEAR lt_account_c-guid.
        MOVE lt_item_c-guid TO lt_account_c-p_guid.
        APPEND lt_account_c.
      ENDLOOP.
      LOOP AT lt_orgdata_d WHERE p_guid = lt_item_d-guid.
        MOVE-CORRESPONDING lt_orgdata_d TO lt_orgdata_c.
    *    CLEAR lt_orgdata_c-guid.
        MOVE lt_item_c-guid TO lt_orgdata_c-p_guid.
        APPEND lt_orgdata_c.
      ENDLOOP.
      LOOP AT lt_longtext_d WHERE guid = lt_item_d-guid.
        MOVE-CORRESPONDING lt_longtext_d TO lt_longtext_c.
    *    CLEAR lt_orgdata_c-guid.
        lt_longtext_c-guid = lt_item_c-guid.
        APPEND lt_longtext_c.
      ENDLOOP.
        LOOP AT lt_tax WHERE p_guid = lt_item_d-guid.
        MOVE-CORRESPONDING lt_tax TO lt_tax_c.
    *    CLEAR lt_orgdata_c-guid.
       MOVE lt_item_c-guid TO lt_tax_c-p_guid.
        APPEND lt_tax_c.
      ENDLOOP.
    *endif.
    endloop.
    *ENDDO.
    CALL FUNCTION 'BBP_PD_PO_UPDATE'
      EXPORTING
        i_park     = 'X'
        i_header   = ls_header_u
      IMPORTING
        E_CHANGED  = changed
        ES_HEADER  = newpoheader
      TABLES
        i_item     = lt_item_c
        i_account  = lt_account_c
        i_partner  = lt_partner_c
        i_longtext = lt_longtext_c
        i_orgdata  = lt_orgdata_c
        e_messages = lt_messages
        i_tax      = lt_tax_c.
    messages[] = lt_messages[].
    *CALL FUNCTION 'BBP_PD_PO_SAVE'.
    CALL FUNCTION 'BBP_PD_PO_SAVE'
    EXPORTING
    **   IV_WORKITEM_ID               =
    **   IV_USERTYPE                  =
       IV_HEADER_GUID               = newpoheader-guid.
    * IV_CREATE_HIST_VERSION       = 'X'.
    CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER'.
    commit work and wait.
    ENDFUNCTION.

  • Batch status updating using function module BAPI_BATCH_SAVE_REPLICA

    Hi,
    I want to change batch status after creating the outbound delivery through inbound idoc, i was able to create delivery , but after creation, i should update the batch status using function module BAPI_BATCH_SAVE_REPLICA, but i was unable to execute this function module correctly,
    Can any one provide details like what are minimum things that are required to update the batch status using this function module.
    In my system batches are defined at plant level.
    Please let me know the solution if any one knows this.
    With regards.
    P.Prasanth.

    Look at BAPI_INCOMINGINVOICE_POST
    Rob

  • Pod updation using function module

    HI All,
        Can any one say me how can we update the POD of a delivery By using the FM  LE_POD_TVPOD_UPDATE. Please provide me what are all fields need to be filled so that we can update the LIKP and the TVpod table's.
    Thanks and regards,
    Naresh

    Hi,
    If your are not sure which values to be passed.
    Try to have a SELECT on this table and put into an Internal table then pass this respective table fields  values to the FM parameters.
    Or in SE37 run this FM first by considerieng one entry from the Table T706F and cehck the results. Then you will come to know wat values to be passed. then do the same in the program by calling this FM.
    If you can cehck this Fm, all the parameters are referring to the T706F table only.
    Thanks & Regards,
    Chandralekha.

  • Generic Delta Update using Function Module........ problem with CURR  type

    Hi Experts,
    I try to create a generic data source using the transaction RSO2. I got the following error message
    " Das Einheitenfeld CURR des Feldes ZPKZA1 der DataSource ZBWN_DS_POLPOSP ist ausgeblendet"
    "The unit field CURR of the field ZPKZA1 of the DATA SOURCE ZBWN_DS_POLPOSP is not visible/ stopped/ hide".
    How shall i handle this issue..........any suggestions please........
    thanks in advance
    Cheers
    Jaya

    Hi Jaya ,
    The error msg which is coming as...
    "The unit field CURR of the field ZPKZA1 of the DATA SOURCE ZBWN_DS_POLPOSP is not visible/ stopped/ hide" may be due to the currency field made hidden at the data source lavel. Also check weather you have included it in your structure (code).
    So, to check it and make it unhide go to "Display Field List (F7)" in RSO2.
    Hope it helps.

  • WHAT ARE THE UPDATED FUNCTION MODULES

    Hi Friends,
    Can anybody explain me about UPDATED FUNCTION MODULES (types of function modules)

    Hi
    Update Function Module
    Unlike transactions and executable programs, dialog modules do not start a new SAP LUW. Calls to update-task function modules from a dialog module use the same update key as the ones in the calling program. The result is that calls to update function modules from a dialog module are executed only if a COMMIT WORK statement occurs in the calling program.
    If you place a COMMIT WORK in a dialog module, it does commit changes to the database (for example, with UPDATE).However, it does not start the update task. The function modules are not actually executed until a COMMIT WORK statement occurs in the calling program.
    If you use dialog modules, try to avoid including calls to update function modules in subroutines called with PERFORM ON COMMIT. In general, any occurrence of PERFORM ON COMMIT(with or without update-task function calls) in a dialog module can be problematic.
    This is because dialog modules have their own roll area, which disappears when the module finishes. Consequently, all local data (including data used for parameter values when calling an update function module) disappears as soon as the commit in the main program is reached.
    If you must use this method in a dialog module (i.e. include the call to an update-task function in a subroutine), you must ensure that the values of the actual parameters still exist when the update-task function actually runs. To do this, you can store the required values with EXPORT TO MEMORY and then import them back into the main program (IMPORT FROM MEMORY) before the COMMIT WORK statement
    Creating Update Function Modules
    To create a function module, you first need to start the Function Builder. Choose Tools ® ABAP Workbench, Function Builder. For more information about creating function modules, refer to the ABAP Workbench Tools documentation.
    To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to one of the following values:
    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.
    To display the attributes screen in the Function Builder, choose Goto ® Administration.
    Defining the Interface
    Function modules that run in the update task have a limited interface:
    Result parameters or exceptions are not allowed since update-task function modules cannot report on their results.
    You must specify input parameters and tables with reference fields or reference structures defined in the ABAP Dictionary.
    http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4daa79e11d1950f0000e82de14a/frameset.htm
    Regards,
    Harish

  • Short dump for update function module

    Hi Folks,
       If I try to raise exception in Update Task function module which is in turn called in Custom BAPI function module. When I test the BAPI stand-alone using explicit COMMIT WORK (For testing)I can see the error in SM13 and it processes further in BAPI. Now when I am using this BAPI for ALE Inbound processing function module to SAP, when I test using testing tool WE19 it crashes when it passes the update FM inside BAPI, and encounteres BAPI_TRANSACTION_COMMIT, the update Function module is executed as encountered and gives me dump at the raised exception and does not show error in SM13. Please suggest how I could overcome this dump.
    Regards,
    Tim

    Hi there,
    Yes. I know that I can details from ST22 Analysis. And I did go through that.
    Here's the Section that explains:
    How to correct the error
        Try to find out why the number of decimal places of the field should be
        2.
        There are various possible options:
        1. The number of decimal places of the imported field has changed in the
           Data Dictionary. Make sure that the number of decimal places of the
           imported field matches the number of decimal places of the field in
           the Data Dictionary.
           If the data cannot be restored from another source, the data of the
           'old' structure must be read by the 'old' structure, converted und
           again eported with the new structure, so that future IMPORTs will
           always function with the new structure.
        2. A new program version is active, which no longer fits the dataset.
           Try to solve the error generating the program
         "ZFI_FM_GET_STD_COSTS==========FT" again. This
           works as follows: Select transaction SE38 in the SAP system. Enter
           the program name "Z_GET_COSTS==========FT". Then activate the
         function 'Generate'.
    1. I made sure that the decimal places matches.
    2. I did re-generate the program.
    But still got the same dump. Interestingly, the program where I am using this FM is working absolutely fine.
    Thanks.

  • 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

  • Pass Parameter ID from Main Program into Function Module

    For material, there is a fileds product hierarcy (MARA-PRDHA) on Basic view, but we also append the same field in materail sales view (MVKE-PRDHA) and put on the screen of sales view, so the user want the PRDHA on sales view could be updated automatically when it has been changed on Basic view. On the screen of basic view, the field MARA-PRDHA is set as parameter ID 'VPR', the sales views are updated in function module MVKE_SET_DATA, so how can I get the value of parameter ID 'VPR' in MVKE_SET_DATA to populate the value in Sales View?!
    Does parameter IDs and their values locate in global memory?!
    if yes, why i can't get it with: GET PARAMETER ID "VPR' <f>?
    Any idea?!
    Thanks

    Yes, this is SAP standard program for MM41/MM42 (Article material), I can't change the program and the screens are different for basis and sales views. So, I am just wondering whether there is a way to pass the parameter value of product hierarchy on basic view to any other screen process when it's updated on basic view.
    The problem is the program check every single table (views) in individual function module, so it's hard to pass any updating (not updated) value from any other views.
    Thanks

  • Generick Extarction using Function Module.

    Hi,
    Give me the steps Generic Extraction using function module.Thanks for your help.
    Thanks & Regards,
    Suresh.

    Hi,
    Check the below threads:
    Using function module as the generic extractor
    Generic Delta Update using Function Module
    Document regarding R/3 extractors using function module/user exits
    Generic extractors using FM
    Also refer the document:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    Reg
    Pra

  • How to create Geniric data source using the SAP FUNCTION MODULE

    Hi,
    I want to create genric data source using function module
    MD_STOCK_REQUIREMENTS_LIST_API (delivered by sap)
    for this function module where I can find  Extract Structer
    or I have to create ?
    How can i use this ?
    Thanks in Advance

    Hi Shilpa,
                  Check here..........
    Using function module as the generic extractor
    Generic Delta Update using Function Module
    Document regarding R/3 extractors using function module/user exits
    Generic extractors using FM

  • 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

  • DMG WONT EJECT BECAUSE IT SAYS ITS RUNNING WHEN IT ISNT

    i have a dmg and when i eject it it says to close apps running off it, but there are none, what do i do

  • Persistent cache issue in Data Services

    Hi, I have created a Persistent cache Datastore in Data Services and provided C:\cache as the Cache directory. cache is the new dir. that i created in my local C drive. This is the machine where designer has been installed. The job server is in anoth

  • IBook will not start up past gray screen w/ apple logo

    iBook will not start up past gray screen w/ apple logo. So I have zeroed out the hard drive and reinstalled tiger. No change except if I start up holding shift it will boot and welcome comes up then black screen that says you must restart by holding

  • Can an Excel Report with Multivalue Custom field list report on one row per task

    I have a ECF Multi Value field (MVF) at the Task Level and have created a report.  In Excel it wants to add it as a Pivotable, which makes sense and I end up with a row for each MVF.  If a Task has 3 MV selected there are 3 rows returned. I want to s

  • Bootcamp doesn't utilize full partition?

    Anyone want to try to help me make sense of this? The C drive is said to have a size of 75 GB which is correct and what I partitioned it for, however judging from what the C:/ drive for bootcamp is telling me, I only have 8GB available for use and on