Update Mode of Function Module

Hi all,
     The detailed knowledge of SAP techniques is so much ........
Nowadays I encountered one,which is the 'Update Mode' attribute of a function module.when we create
a function ,we will find the attribute is set as 'Start Immed' by default. But actualy I don't know the meaning
of this attribute. According to some material info.,I learnt that it can be classified into two:v1 & v2.
     Would you tell me the true meaning of 'Update MOde' and the distinction between V1 and V2.
    Thanks a lot.

Hi
V1 modules describe critical or primary changes; these affect objects that have a controlling function in the SAP System, for example order creation or changes to material stock.
V2 modules describe less critical secondary changes. These are pure statistical updates, for example, such as result calculations.
The V1 modules are processed consecutively in a single update work process on the same application server. This means that they belong to the same database LUW and can be reversed. Furthermore, V1 updates are carried out under the SAP locks of the transaction that creates the update (see  The SAP Lock Concept). This ensures that the data remains consistent; simultaneous changes to the objects to be updated are not possible.
All V2 updates are carried out in a separate LUW and not under the locks of the transaction that creates them. If your SAP System contains a work process for V2 updates, these are only carried out in this work process. If this is not the case, the V2 components are processed by a V1 update process.
All V1 modules of an update must be processed before the V2 modules.
U can also refer these links:
http://www.erpgenie.com/abaptips/content/view/498/62/
http://www.allinterview.com/showanswers/5513.html
Regarding  v1 and v2 update and some other concepts.....
Thanks
Vasudha

Similar Messages

  • How to identify update mode in function module for generic extractor

    Hi All,
    I have created generic extractor using function module which supports delta load.
    Delta logic is handeled in coding...by using ROOSGENDLM table.
    Now problem is we need to identify the update mode, requested from infopackage in our function module in order to apply logic for Repair full.
    I would like to know table or parameter in source system, which contain the update mode (Init , Delta , Full).
    Thanks,
    Niraj

    Hi Niraj
    You can use the FM import parameter "i_updmode" (This is of type "SBIWA_S_INTERFACE-UPDMODE") to determine if infopackage triggerred in full or delta mode.
    I_REQUNR     TYPE     SBIWA_S_INTERFACE-REQUNR                                                                               
    I_ISOURCE     TYPE     SBIWA_S_INTERFACE-ISOURCE                               InfoSource Name
    I_MAXSIZE     TYPE     SBIWA_S_INTERFACE-MAXSIZE                               Data Packet size
    I_INITFLAG     TYPE     SBIWA_S_INTERFACE-INITFLAG                               Initial Flag
    I_UPDMODE     TYPE     SBIWA_S_INTERFACE-UPDMODE                               Update Mode
    I_DATAPAKID     TYPE     SBIWA_S_INTERFACE-DATAPAKID                               Datapacket Id
    I_PRIVATE_MODE                                                                               
    I_CALLMODE     TYPE     ROARCHD200-CALLMODE                               Single-Character Flag
    I_REMOTE_CALL     TYPE     SBIWA_FLAG                                                                               
    Cheers
    Vasu Sattenapalli

  • Material group updation by using function modules

    Hello All,
    I would like to add , update and delete material group From  database tables T023 and T023T  according to the given Excel input file.Could you please suggest me any function modules are there apart form MATL_GROUP_UPDATE .
    if i am using this function module i am getting the follwing error
    'Class does not exist or is not valid on this date'.
    Could you please send me any sample code.
    Thanks in advance,
    Arvind.

    Hello Narendran,
    Thanks for your quick reply.
    i need to do the following fucntions to the tables t023 and t023t.
    1) adding material group
    2) Updating the material group
    3) Deleting the material group
    according to the status field in the excel input file as shown below
    Status     ungültig     Referenzen     MGS     Beschreibung deutsch     Beschreibung englisch     中文     Beschreibung russisch
    N               H4***     Kohlen     Carbon     炭     Уголь
    N               H4100     Kohlebürsten                                                               Carbon brushes     炭刷     Угольные щетки
    N               H4900     Sonstige Teile aus Kohle, techn. Kohle                                     Other parts made from carbon, techn. carbon     由炭,工程用炭制成的其他零件     Прочие виды изделий из угля, технический уголь                     
    U               J2100     Polyphenylenether (PPESIB)                                                    Polyphenylene oxide (PPO)     聚苯氧化物(聚苯撑氧,聚苯撑氧化物)(PPO)     Полифенилэфир (PPESIB)                                              
    D     x          J2400     Sonstige styrolhaltige Polymere                                 Other Polymers Containing Styrene     其他含苯乙烯聚合物     Прочие виды полимеров, содержащие стирол                  
    Note:Status :N means add the corresponding material group H4***
                               U means update the material group Description in t023t
                               D means delete the material group form  the table t023t
                                in all languages
    Could you please tell me any other fucntion modules are there.
    As per your suggession we can add the material groups then what about Updation and deletion of material groups.
    Also suggest me shall i go for normal modify , delete and update  statements in my program to aceive the above functionality
    2) The excel file format is also not constant they can change the columns
    as per their wish i mean for exp in the above excel  at col1 Status field is there and  at col4 (MGS ) material group and remaining columns are description of the material group in different languages(sorry the excel alignment is not clear above)  .
    They can change this and they can place status at col5 and MGS at col6 .
    Could you please advice me how to handle this situation in my program
    Thanks in advance,
    Arvind.

  • BOM Update using a function module - 'CSAP_MAT_BOM_MAINTAIN'

    Hi,
    I have problem in updating the item status for a BOM using a function module - 'CSAP_MAT_BOM_MAINTAIN'.
    My goal is reset the Checkbox for 'Indicator: item relevant to production'. When i pass the value ' '[Space] to the structure field 'T_STPO-REL_PROD' it doen't work.
    Do let me know if you come across such problem & what needs to passed as input to reste the checkbox in the BOM.
    Thanks & Regards,
    Bhargava

    PLM wants to manipulate the Indicators u2013 u201CBulk Materialu201D & u201CCost Relevancyu201D in BOM.
    Note: The 2 indicators [u201CBulk Materialu201D & u201CCost Relevancyu201D] are interlinked with each other for a business functionlity given by SAP. So, if we try to set both indicators we get the below SAP standard error.
    E 29127 Bulk material not allowed for items relevant to costing
    SAP Field Name                             RFC Tag       SAP values    PLM values  Meaning for SAP field
    Indicator: bulk material                   BULK_MAT   Space             !                   No
    Indicator: bulk material                   BULK_MAT    X                   X                  Yes
    Indicator: item relevant to costing  REL_COST    Space            !                    Not relevant to costing
    Indicator: item relevant to costing  REL_COST     1                   1                   Not relevant to costing
    Indicator: item relevant to costing  REL_COST     2                   2                   Packaging operation
    Indicator: item relevant to costing  REL_COST     3                   3                   Packaging material
    Indicator: item relevant to costing  REL_COST     X                   X                  Relevant to costing
    To achieve the clear/reset/set value for 2 indicators [u201CBulk Materialu201D & u201CCost Relevancyu201D] from PLM, only eitheir of indicators status needs to sent [i.e 1 indicator status @ a time].

  • Update Price Condition Function Module

    I'm trying to identify the function or bapi that is used to update the pricing conditions for a line item in a purchase order. This is done manually by clicking the UPDATE button on the screen when in the PO item conditions view.
    Specifically this FM will be used in visual composer to update pricing prior to goods receipt.
    any help in identifing the code would be great.
    Thanks

    Hi simon,
    Please check the following
    RV_CONDITION_SAVE
    RV_CONDITION_COPY
    SD_SALES_CONDITION_MAINTAIN
    Do you want to add one more pricing condition type to the existing sales order??
    Use BAPI_SALESORDER_CHANGE.
    Hope this help

  • UPDATE Table through Function Module

    Update delivery document LIKP wit new route LIKP-ROUTE. suggest the correct function Module

    Hi,
    Use BAPI
    BAPI_OUTB_DELIVERY_CHANGE  Change Outbound delivery
    In this BAPI a Parameter called HEADER_DATA of type BAPIOBDLVHDRCHG.
    There is field called Route, pass value in it.
    Also Set field ROUTE_FLG in Parameter HEADER_CONTROL   to X or U for Change.
    Thanks &regards,
    ShreeMohan

  • Updating Infotype using function module HR_INFOTYPE_OPERATION

    Hi There ,
    lets understand my problem related to updation of infotype .
    I have a record maintained in my table within date range 01/04/2010 to 31/12/9999.
    now i update my new tax rate from 1st June 2010 .
    The requirement is i shall two records now :
    First record from 01/04/2010 to 31st may 2010 shall be maintained .
    hence we need to modify the existing record only changing the end date .
    Second record will be a new record starting from 1st june , ending 31/12/9999.
    Approach followed by me :
    using HR_READ_INFOTYPE to read the data .
    Then using HR_INFOTYPE_OPERATION  
    ---> ACTION : "MOD"  to update existing record by passing end date as 31st may 2010 .
    Then using action : INS to create a new record .
    but this approach is failing since i am itself not able to modify the existing record .
    Please let me know the correct way of updating the record .
    Regards,
    Abhishek.

    It depends on infotype. Every infotype has a time link.
    Sometimes you can have a record for a  day or more than one. You can have continuous records or not.
    I think your infotype has class 1 and it's continuous in time to the end (99991231)

  • How to catch Delta Initialization and Delta Update in a Function Module

    Hi Experts:
    I'm developing a FM to extract data from R3. I wonder if anybody knows how to catch when i'm making a delta initialization and a delta update in my FM, because i have different parameters and routines from each one.
    Thanks in advanced.
    Points for helpfull answers.

    Hi,
    Keep one dummy date field in the structure. Make this dummy date field as delta enabled field. When you do Init load this date field value will be blank and next time when you do load it will have the last upload (in this case init load) date. You have to write a code before open cursor as below:
          LOOP AT s_s_if-t_select INTO l_s_select.
                                  WHERE fieldnm = '(dummy date field name)'.
             l_date = l_s_select-low.
          ENDLOOP.
    l_date will have the last upload date. This you can use to select the delta records from the table or for the further processing.
    If you want to check the value during Init or delta load, go to RSA3 and debug it(Don't use F - Full load. Use I or D in the update field).
    Hope this helps.
    PB

  • CRM function module to update the attribute in the classification TAB of BP

    Hi All,
    Can any body let me know if there is any functionmodule to update the CRM function module to update the attribute in the classification TAB of BP tcode.
    I have searched a lot i get FM to update the marketing attribute and not the attributes in the classification tab.
    Thanks in Advance
    Edited by: Sharath Kumar on Dec 2, 2010 4:48 PM

    For material bom: CSAP_MAT_BOM_CREATE
    and CSAP_ORD_BOM_CREATE for Order BOM.
    Regards,
    Ravi

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

  • Invalid COMMIT WORK in an update function module.

    Hi,Experts,
         Currently We got a problem for posting PO's GR with t-code MIGO. Our requirement is that can create Delivery by automaitcly after PO's GR is saving. Then I have tailored a program for creating delivery.The program will be triggered in an output type when saving action is done.
    Error info is as below
    "Calling a COMMIT WORK in an update process is not allowed
    because the function modules triggered in a Logical Unit
    of Work cannot then be processed correctly."
    Any help will be appreciated
    Thanks in advance
    Richard Zhou

    Hi Richard,
    First create an implementation for the BADI in se19,
    then in any of the methods put break point and run MIGO
    You can clearly see in the debugger what all values come
    Please note that u have 2 methods
    one works in update task and another as normal function module..to view the documentation of the BADI->go to se18 -> enter the name of the BADI -> Display -> click on documentation to View the purpose and use of the BADI you have mentioned,Please note that all BADIs may not have documentations.............
    Also if u feel that the replies are helping you out please reward points....this way the SDN members will be willing to do a bit more homework for you and help you out...
    To proceed with the BADI
    Please check the documentation below
    Business add-ins when creating a material document
    The enhancement MB_DOCUMENT_BADI has two methods that are called up by the same interface, though at different times. All material document data from the following tables is transferred to this business add-in:
    MKPF (material document header)
    MSEG (material document items)
    VM07M (update data)
    This data can be used in other programs, but cannot be changed.
    The methods differ according to the time at which they are called up:
    The method MB_DOCUMENT_BEFORE_UPDATE is called up before the FI document is created. This means that it is called up even if the program is terminated by an error during the subsequent processing. The update of data in separate tables should always be contained in function modules that are called up with the addition 'in update task'. This ensures that all the data is updated consistently.
    The method MB_DOCUMENT_UPDATE is not carried out until update. This means that all updates are carried out immediately in their own tables and do not have to be contained in 'update task' in function modules. For performance reasons, you should not re-read the tables or carry out any time-consuming routines at this point.
    You should always call up MB_DOCUMENT_BEFORE_UPDATE before MB_DOCUMENT_UPDATE, particularly if time is a critical factor when posting the material documents. The method MB_DOCUMENT_UPDATE is processed after the FI document numbers are called. As a result, no other FI documents can be posted until this document is completely updated.
    Even if the two methods are in the same class, you cannot access the same global fields, as the methods are called up at different times and are therefore carried out in another roll area.
    From the business add-in display, you can go to coding examples for both methods by choosing Goto -> Example coding -> Display
    Note
    The enhancement does not transfer any data to the material document, that is, you cannot change material document data before it is updated.
    If this business add-in is not set up properly, it may result in an inconsistency between the documents and the stocks and between the material documents and the accounting documents. Inconsistencies like these may be caused by the following elements in the business add-in:
    COMMIT WORK
    Remote function call (CALL FUNCTION ... DESTINATION)
    Own updates in document tables or stock tables (for example, update in tables MBEW, MARD, MSEG)
    The unlocking of data (for example, via DEQUEUE_ALL)
    Before the two business add-ins are called up, data is already flagged for the UPDATE. If a COMMIT WORK or a Remote Function Call is transmitted in the enhancement, these are written in the database. If another error occurs after the business add-ins are processed, you cannot carry out a complete ROLL BACK, as the data up to the COMMIT or Remote Function Call has already been written in the database. This can result in an inconsistent status (for example, material document without accounting document), which can only be repaired with considerable cost and effort.
    The business add-ins are not suitable for customer-specific updates in the stock tables, as updates like these destroy the standard stock update.
    Unlocking the data (for example, via DEQUEUE_ALL) is also critical, as the data that is to be updated is no longer protected from updates from external systems, and inconsistencies can result from parallel updates.
    Before you activate an enhancement, check carefully that the business add-in does not contain any critical coding places.
    If data inconsistencies have already occurred in your system as a result of the business add-in, remove the critical coding so that it does not cause any further inconsistencies.
    Regards
    Byju

  • Commit work in RFC function module

    hi all.
    What will happend if i give commit in the RFC function module .
    why we need to use BAPI_Commit after updating through BAPI function module.
    regards,
    Madhavi

    First read some documentation like [SAP LUW|http://help.sap.com/saphelp_bw/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/frameset.htm], [Transactional RFC (tRFC)|http://help.sap.com/saphelp_nwpi71/helpdata/en/22/042578488911d189490000e829fbbd/frameset.htm] or [Transaction Model for Developing BAPIs|http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm]
    Regards,
    Raymond

  • Delta with Generic Extractor using function module

    Hi,
    I have created an extractor using function module and it work fine (mode FULL)
    It's an extractor based on the FM RSAX_BIW_GET_DATA_SIMPLE.
    In TCODE RSO2, I have specified a delta field (AEDAT).
    In table ROOSOURCE, this extractor is defined by :
    DELTA = AIE
    EXMETHOD = F1
    When I extract data in Init mode, there is no problem. But delta don't extract any entries.
    When I trace with TCODE ST01, in Init mode the function module is executed but in delta mode, there is no trace of any use of this function module.
    I don't know how to do to make this extractor work fine in delta mode.

    Hi Pascal,
    The same function module i have used and succesffuly doing delta using it. So it works for both full & delta.
    How ur testing it and where are you testing it for delta.
    Do the delta testing through BI end. Set the
    As u have already set the delta field., now Follow below steps:
    1. First set the safety interval upper limit to -1, so that it will extract the delta data of 1 day back records also.
    2. Please make sure wether the delta records are available or not in r/3, if there is no records to be fetched in for delta then u will not be able to track out wether delta is working or not.
    3. Now do the init from BI end first. Delta initialization without data transfer. - It will give u green status with 1 dummmy record.
    4. Now do the delta. It will extract the delta records.
    Before that make sure that if any selection your giving in Infopackage should be met out by these delta records.
    Thanks
    Dipika

  • Data source Enhancement with Function Module

    Hi all!
    I have a requirement like I have to enhance my Generic Data source.
    Let me make it clear!
    I have 10 field in R/3 which I am able to get into extract structure using Generic Data Source on the corresponding Table.
    I have another field on my extract structure, say ZEXMFLD1 which is updated by a function module ZZ_FUNC_MODULE_SAMPLE.
    I came to know that Data source Enhancement can be done, but don't know how.
    Request your guidance in this. Can u please let me know how I can achieve this?
    Thanks,
    Sri

    Hi Sri,
    You can enhance generic datasources also.
    For that you have to use below function modules based on your datasource type.
    EXIT_SAPLRSAP_001  - Transactiona data
    EXIT_SAPLRSAP_002  - Master
    EXIT_SAPLRSAP_003  - text
    EXIT_SAPLRSAP_004  - Hier
    First check in CMOD(TCODE) whether component RSAP0001 is assigned to any project. If it is not assigned to any project(fresh system), assign it to a project by creating it.
    Ex. ZBW. If it is already assigned, go SE37.
    For transaction data go to function module EXIT_SAPLRSAP_001(Trans data) and start your logic.
    CASE i_datasource.
    WHEN 'your data source name'.
    call you Function module  -  CALL  'ZZ_FUNC_MODULE_SAMPLE'.
    pass the imported value from above FM to c_t_data.
    close case with ENDCASE.
    Let me know if you need more info.
    - Kalyan.

  • Enhancing Standard Function Module.

    We have added some custom fields in table HRP5102 which is getting updated from this function module HRRCF_MDL_REG_NAMED_USR_CREATE.
    I have created the enhancement implementation for this but that is not working .
    if ( lv_is_consistent eq 'X' ).
            move record-lastname to ls_centraldataperson-lastname.
            move record-firstname to ls_centraldataperson-firstname.
            move record-middlename to ls_centraldataperson-middlename.
        Setting the default correspondance language
            move sy-langu to ls_centraldataperson-correspondlanguage.
    I have to add my codes under this IF condition .
    so can any body sugget me how i can do this.

    Hi,
    The only implicit enhancement options for this function module are (as usual) at the very top and the very bottom.
    I don't think you will be able to use these, if your goal is to update custom fields in ls_centraldataperson before the 'register' method is called.
    The 'top' enhancement is too early (because ls_centraldataperson is not yet declared), and the 'bottom' enhancement is too late (because 'register' has already been called).
    So, as far as I can tell, it seems you will need a repair!
    regards
    Paul

Maybe you are looking for