Need MIGO BAdi to update custom table

Hi Experts,
   I have to update a custom table after the GR is successful against PO in MIGO transaction.
Which BADI will be suitable to this. Or is there any other way to do this?
Thanks and regards,
Venkat.N.

Hi,
You can use the badi MB_DOCUMENT_BADI and method MB_DOCUMENT_UPDATE.
Regards,
Nagaraj

Similar Messages

  • User exit/BADI for updating custom table in MB1B transaction-

    Dear All,
    When performing a material to material conversion in MB1B transaction for  batch managed materials,system is creating a new batch by copying the characteristics of issuing material/batch.The details of the new batch created are updated in standard batch tables(MCH1,MCHA,MCHA).
    The requirement is when the new batch is created,the batch details and characteristics has to be stamped in a custom table.
    Kindly suggest a user exit/BAIi available for updating the same in the custom table.
    Regards,
    Deepak

    Deepak, Exits for MB1B are
    MBCF0002            Customer function exit: Segment text in material doc. item
    MBCF0005            Material document item for goods receipt/issue slip
    MBCF0006            Customer function for WBS element
    MBCF0007            Customer function exit: Updating a reservation
    MBCF0009            Filling the storage location field
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.

  • Not Updating Customized Table when System having Performance Issue

    Hi,
    This is actually the same topic as "Not Updating Customized Table when System having Performance Issue" which is posted last December by Leonard Tan regarding the user exit EXIT_SAPLMBMB_001.
    Recently we changed the program function module z_mm_save_hide_qty to update task. However this causes more data not updated. Hence we put back the old version (without the update task).  But now it is not working as it used to be (e.g. version 1 - 10 records not updated, version 2 with update task - 20 records not updated, back to version 1 - 20 records not updated).
    I tried debugging the program, however whenever I debugged, there is nothing wrong and the data is updated correctly.
    Please advise if anyone has any idea why is this happening. Many thanks.
    Regards,
    Janet

    Hi Janet,
    you are right. This is a basic rule not to do any COMMIT or RFC calls in a user exit.
    Have a look at SAP note 92550. Here they say that exit EXIT_SAPLMBMB_001 is called in the update routine MB_POST_DOCUMENT. And this routine is already called in UPDATE TASK from  FUNCTION 'MB_UPDATE_TASKS' IN UPDATE TASK.
    SAP also tells us not to do any updates on SAP system tables like MBEW, MARD, MSEG.
    Before the exit is called, now they call 'MB_DOCUMENT_BADI' with methods MB_DOCUMENT_BEFORE_UPDATE and MB_DOCUMENT_UPDATE. Possibly you have more success implementing the BADI.
    I don't know your situation and goal so this is all I can tell you now.
    Good luck!
    Regards,
    Clemens

  • Best way to update custom table

    Hello experts,
    Iu2019m writing a report program and after pulling data from a custom table Iu2019m modifying certain fields within internal table and then eventually update custom table. The way Iu2019m updating custom table is working fine. However Iu2019m concern about performance issues because Iu2019m doing update on custom table within loop.
    Here is my code for reference.
    *&      Form  update_contracts
          text
    -->  p1        text
    <--  p2        text
    FORM update_contracts .
    Update record in an internal table first
      loop at izsc_compliance into wa_zsc_compliance..
        wa_zsc_compliance-zapproval = c_accepted.
        wa_zsc_compliance-CHANGED_DT = sy-datum.
        wa_zsc_compliance-CHANGED_TM = sy-uzeit.
        wa_zsc_compliance-CHANGED_BY = sy-uname.
        modify izsc_compliance from wa_zsc_compliance index sy-tabix.
        write:/ sy-tabix, wa_zsc_compliance-vbeln_new, wa_zsc_compliance-zapproval.
        if p_test is initial.
          move wa_zsc_compliance to zsc_compliance.
          update zsc_compliance.
        endif..
      endloop.
    Write records to database
      if p_test = 'X'.
        skip.
        write:/ 'Test mode'.
      endif.
    ENDFORM.                    " update_contracts
    Iu2019m not certain if there is any better way by not doing update within loop and update custom table outside this loop.
    Many thanks in advance.

    Hi,
    Yes, there is a better way to update the custom table. That will be more performance oriented and will be a much cleaner approach. As, I am not much aware of the custom table structure which you have in your program, the best way that I can suggest is to remove the update statement from that check. I guess you are checking against the mode - test or production. Once you have done the check, put the selected entries in an internal table which is same as database table. And then in a single command - a single array operation as it is commonly called, you can update the custom table.
    Have a look at the following link
    [Overwriting Several Lines Using an Internal Table|http://help.sap.com/saphelp_bw33/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm]
    [Inserting or Changing Lines|http://help.sap.com/saphelp_bw33/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm]
    You can also scan the forum for multiple links and references and sample examples.
    Hope this will help. The above approach will be much more performance oriented and will help to optimize. Also, check where exactly you are providing the locking feature if at applicable in your business functionality.
    Regards,
    Samantak.

  • Update customizing table on the production

    Hi all,
    Ik maked a customizing table on the development environment.
    Evert time i need to update the data of this table , then i have to do it on the development and then tranport it to the production via a transport request.
    Is it possible to change this (setting) table in the production, without using the transporting request ?
    I changed the properties of the table from C (Customizing)
    to A ( Application table), but it doenst help.
    Anyone have a suggestion ?
    Thanks,

    Goto Development system-> again change settings from C to A,use database utility ->activate and adjust database.
    now delete table maintaince and re create table maintaince,now transport your request to production,it should be fine now.
    Thanks
    Seshu

  • Updating custom table with PU12

    Hi Experts,
    I need to update the custom table with PU12. Please let me know if this is possible with PU12.
    I have used the PU12 only to retrieve the data from database and have sent the data to application server.
    Thanks
    Rashmi

    Hi
    Can you please let me know how to  update the custom table with PU12.
    Can you please let me know the User exit you have used.
    Thanks in advance.
    Regards,
    Kiran.

  • Updating Custom table when updating infotype

    HI
    A custom transaction needs to be created for maintenance of the table in future as the values could change. Whenever infotype 0015 values are changed are updated this custom table  values should need to update.Could you please suggest me..

    I also suggest you to lock only the entry that will be updated (and not the whole table!) : you will have then far less problems of conflict with updating this table.
    For that, you have to create a lock object on your table (via SE11 - for example EZ_MY_TABLE). This will create 2 function modules named ENQUEUE_E<name of your lock object> (in my example ENQUEUE_EZ_MY_TABLE) and DEQUEUE_E<...>.
    You can then call those FM like this :
    CALL FUNCTION 'ENQUEUE_EZ_MY_TABLE'
      EXPORTING
        MODE_RSTABLE = 'S'
        KEYFIELD1 = ld_keyfield1  " Here are the key values for the entry that you have to update
        KEYFIELD2 = ld_keyfield2
      EXCEPTIONS
        FOREIGN_LOCK = 1
        SYSTEM_FAILURE = 2
        OTHERS = 3.
    Best regards,
    Samuel

  • Update custom Table Form DSO (in SAP BI)

    Hello everyone,
    i need to load a custom table in SAP R3(4.6c) from a DSO in SAP BW (7.0).
    My first idea was to use a RSANWB transaction with update CRM attribute funconality, but in Target system (SAP R3 4.6c) there is not the function module CRM_BW_PROTIDS_GET cause CRM was not istalled.
    Do you have any other solution or a smart tip to use the CRM function?
    Another info: Before load data into target table i need set a filter on source data and truncate target table.
    Thanks a lot for your help.
    Emiliano

    Hi there,
    Get your ABAP person to write an RFC function to read and pass the DSO table records and then update the table in SAP R/3. That will be the best option.
    -Senthil

  • Updating Custom Table Only in Debug Mode

    Hi All!
    I have been encountering issues in updating a custom table. It would work successfully only in debug mode otherwise it won't update an entry in the table.
    This is the piece of code that would update an entry in the table specifically used in a user exit. The functionality of this code is to automatically remove a transportation block:
    SELECT SINGLE *
    INTO wa_zblock
    FROM zblock
    WHERE zzblknum EQ c_tr01
    AND vbeln EQ p_lvbeln
    AND zzprocessed EQ space.
    IF sy-subrc EQ 0.
    DO.
    CALL FUNCTION 'ENQUEUE_E_TABLES'
    EXPORTING
    MODE_RSTABLE = 'S'
    TABNAME = c_lzblock
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3.
    IF sy-subrc EQ 0.
    wa_zblock-zzprocessed = c_x.
    wa_zblock-zzapproveby = sy-uname.
    wa_zblock-zzapproveon = sy-datum.
    MODIFY zblock FROM wa_zblock.
    if sy-subrc EQ 0.
    COMMIT WORK AND WAIT.
    endif.
    EXIT.
    ENDIF.
    ENDDO.
    CALL FUNCTION 'DEQUEUE_E_TABLES'
    EXPORTING
    MODE_RSTABLE = 'S'
    TABNAME = c_lzblock.
    ENDIF.
    How can I make this update the custom table successful in undebugged mode? Please let me know your thoughts on this.
    Thanks!

    I also suggest you to lock only the entry that will be updated (and not the whole table!) : you will have then far less problems of conflict with updating this table.
    For that, you have to create a lock object on your table (via SE11 - for example EZ_MY_TABLE). This will create 2 function modules named ENQUEUE_E<name of your lock object> (in my example ENQUEUE_EZ_MY_TABLE) and DEQUEUE_E<...>.
    You can then call those FM like this :
    CALL FUNCTION 'ENQUEUE_EZ_MY_TABLE'
      EXPORTING
        MODE_RSTABLE = 'S'
        KEYFIELD1 = ld_keyfield1  " Here are the key values for the entry that you have to update
        KEYFIELD2 = ld_keyfield2
      EXCEPTIONS
        FOREIGN_LOCK = 1
        SYSTEM_FAILURE = 2
        OTHERS = 3.
    Best regards,
    Samuel

  • Strange issue in updating custom table after upgrade ECC6.0! Please help!

    Hello everyone:
        I have some code (shown below) that deletes and updates some SAP tables and one custom table:
        DELETE T5UBV   FROM TABLE DEL_T5UBV.
      DELETE ZCHRZIP FROM TABLE DEL_ZCHRZIP.
      MODIFY ZCHRZIP FROM TABLE WRITE_ZCHRZIP.
      MODIFY T5UBV   FROM TABLE WRITE_T5UBV.
    COMMIT WORK.
    For SAP table the code above works fine but for custom table it overrides all exisiting data! It should keep some existing data in custom table ZCHRZIP and append any extra data from internal table WRITE_ZCHRZIP. This functions as designed if I run in fore ground but in background it just overrides instead of modifying and appending! This is happening only after upgrade ECC6.0. Any thoughts? Please let me know.
    Thanks.
    Mithun

    Mithun,
    Comment below code
    DELETE ZCHRZIP FROM TABLE DEL_ZCHRZIP.
    <b>Reward if it helps,</b>
    Satish

  • Updating custom table through table control in module pool

    Hi
    I am entering a data in the module pool screen in a table control . The functionality is that whatever i enter in a row gets updated in a custom table in the database with the same values . My problem is that when i enter some values and press the save button on the module pool screen , the data gets updated on the table but gets invisible from the module pool screen . The user wants the data to be displayed even after it has been saved ..if anyone can help on this ...
    thanks

    hi,
    Check whether u have activated the report and screen.

  • Updating custom table using call transaction

    How to update a custom table using Call Transaction method. How can we use Table control (Module Pool) for this purpose).

    Vignesh,
    Create a table maintenance transaction for ur custom tables. Check this link for ref...
    http://allaboutsap.blogspot.com/2007/04/table-maintenance-in-sap-step-by-step.html
    And create a BDC recording and code a program accordingly...
    regards,
    karthik

  • Updating custom table

    We have a requirement that when a document is posted, our custom table sould get updated with all details like BELNR and all other relevant details of the document.
    Kindly let us know which function module to use. Also the procedure to activate it.
    Regards,
    Isha.

    >
    Isha Rallan wrote:
    > As per my Tech team, this BTE will not be called.
    In my early project, i used the same BTE to default some values while posting document.
    Not sure what your Tech team is checking.

  • Need a pattern to update a table's contents

    The goal here is to update a table's data when new data is imported into my application.
    I was looking thru the Swing trail and see that the TabelModelListener is more appropriate for when the data in the table itself changes -- I cannot find a good trail to base my codes off of.
    more details:
    1. the import is fired off via a button press.
    2. On that button defined a listener, in which I call a service that handles the import.
    3. The import gathers data from a text file and updates a DB.
    It seems to me that after the import, I would want to fire an event, for which the table (or tablemodel) is listening, so it can update itself. I can't find out how to do this. Help is appreciated.

    I think I might be on the correct track.
    1. I am using Factory pattern to serve out gui elements.
    2. In that factory I have created a static Observable object.
    3. I have created a subclass that implements observer. In the update method I can reset the tablemodel. In the factory I create and instance of my table class and register it on the Observable.
    4. After I import some data, i simply call the appropriate method on observable, and my table should do its update.
    I think this solution is pretty clean. If anybody has a better suggestion please let me know. I am always interested in writing the cleanest/most elegant code possible.

  • Update custom table from qa_Results table

    Dear Experts,
    The question is related with Oracle quality collection plan. Here is the question.
    After entering the result in collection plan we all know that result is store in qa_Results_V view and also in respective view for the collection plan.
    In the same way , the same result I want to store in one custom table. Is it possible?
    Thanks,
    Atul Ramteke

    <u>Syntax:</u>
    EXPORT param_1 TO MEMORY ID 'EXIT_PCCD'.
    IMPORT param_1 FROM MEMORY ID 'EXIT_PCCD'.
    FREE MEMORY ID 'EXIT_PCCD'.
    Please look into the F1-help on Export/Import statements for more details.
    Message was edited by: Sam

Maybe you are looking for

  • Using Crystal 2008 to insert records into a table

    Hi, We have a unique need to use Crystal to insert records into a table. We have managed to test a report that can write into a temporary table.  This is done by using sql command object  and uses  the following code : INSERT INTO TEMP_TABLE  (ORDERI

  • Pages temporarily deleted my files but won't redownload them

    From what I've been told by a friend, the iWork apps will temporarily delete the files in them so that you have more space for better functionality. They will then redownload them from the iCloud when you need them. I think my Pages was in the proces

  • /sapapo/ts_dm_lock_unlock in background

    Hi,   I am using FM  /sapapo/ts_dm_lock_unlock to lock and unlock planning area. When I am executing my program in forground it is working properly but in background by this FM planning area is not being lock/unlock Can you please help on same FM in

  • AppleScript Application - Multiple buttons don't work with one script...

    Okay, so I need to control just about 22 buttons to make this project work. But. I still can't get 2 to work. Here is my script: on clicked theButton   -- Preferences:           if title of theButton = "Save" then                          set Word1 t

  • Kernel upgrade and ati driver module recompiling

    I use ati video proprietary drivers. When i do a kernel upgrade, do i need to reinstall the drivers to make the installer build the module for the new kernel? Last edited by jacopastorius82 (2010-11-04 13:36:00)