BADI MB_MIGO_BADI

Hello Guru,
i'm using BADI MB_MIGO_BADI Method LINE_MODIFY to update a std field (CS_GOITEM-ANZGEB) with my value calculated.
The problem is this method is always active during creation, modification and display in MIGO, therefore i have some problem becose BADI try to change the field also in display and i have warning message.
How can i use this BADI Method LINE_MODIFY only during Document Creation or modification?
thanks in advance
Boris

Hi Besana,
first u need to know how to use this method , coding in this BADI for this u need to see the sample code of SAP for this method.
just follow the path.
SE18---->Give BADI name ->Display->GOTO->Sample Code->Display-->from that screen double click on the Method->it will take u to the sample code of this method.
regards
prabhu

Similar Messages

  • BADI MB_MIGO_BADI not updating custom field in MSEG Table

    Dear Experts,
    I am working on screen exit In MIGO transaction for transfer Posting.
    I checked that BADI MB_MIGO_BADI having facility for screen exit and method line_modify having facility to change GOITEM Structure for the changed line item.
    Now, to make this functionality work I have enhanced include structure CI_COBL which is available in both mseg table and goitem structure, now I have this customized fields on my custome tab through the enhancement and also to update this value 2 custom fields created in goitem structure and MSEG table through include structure  CI_COBL.
    Here my question is at the time of transfer posing creation in MIGO when I am passing the value in custom fields through screen and assigning it to custom fields of structure GOITEM through LINE_MODIFY method, it is giving me below worning message
    BADI: Field GOITEM-ZZIDNLF is not ready for input. (Change is not taken over)
    Now I have debuged the code, also checkout many threads and came to know that because of few checks in standred program (iNCLUDE:LMIGOKL3) these fields will not be updated WHERE IT always checks whether these fields are ready for input or not and if not ready then instead of assigning the values it throws worning message.
    Now can you please through some light how can I go ahead as I have check out many threads and also tried to change value of cs_goitem structure using field symbol but throughing dump that it is blocked against changes through field symbol.
    The helpful answers will be highly appriciated.

    Hi,
    In the badi mentioned by you GOITEM is the importing parameters & if the relevant field is not used in any MIGO screen you cannot change the data.
    Please check example BADI interface: IF_EX_MB_MIGO_BADI~LINE_MODIFY
    Please check the BADI documentation:
    Changed data in GOITEM is only adopted if the relevant fields are visible and ready for input.
    Changed data in GOITEM is not adopted if the relevant field is not used in any MIGO screen (warning via MIGO 049).
    Changed data in GOITEM is not adopted if the relevant fields are not ready for input (warning via MIGO 050)
    Thanks and Regards,
    Chandra

  • BADI mb_migo_badi error message

    Hi,
    I've added my custom field in the structure GOITEM called ZZGROES.In the method Line/Item change in my implementation of BADI MB_MIGO_BADI my field takes value from MARA for current material number. I've added the field on the screen '0200' in SAPLMIGO also. When I start transaction MIGO I choose material number and the system returns me an error message: BADI: You are not allowed to change the field content of field GOITEM-ZZGROES.
    How can I do that ? I would like to display the size of material together with material description.
    Best regards,
    Stefan

    solved

  • Implement BADI MB_MIGO_BADI to make check on purcahse order items

    Hello,
    I would like to add some check and display corresponding messages in transaction MIGO on items.
    I found the MB_MIGO_BADI and especially method CHECK_ITEM that seems to match this requirement.
    The problem is that there is no data about PO in that method, just the selected ITEM row ID + an error structure to return messages.
    When I look at the exemple class CL_EXM_IM_MB_MIGO_BADI there is a global atribute GT_EXTDATA that seems to handle this.
    But when I do "Implementation --> Create" from the BADI screen, GT_EXTDATA does not exits.
    I dont know how to get it or what to do in order to add it ?
    Thank for your help,
    Regards

    Hello Morgan
    Looking through the standard sample implementations of this BAdI on our ERP 6.0 system it seems to me that you select the item data within method HOLD_DATA_LOAD.
    The class you mentioned is not a particular good example but even here my assumptions seems to be correct.
    Within class CL_IM_OIH_MIGO_BADI the coding looks like this:
    METHOD if_ex_mb_migo_badi~hold_data_load .
    *------- Local data definition
      DATA: ls_goitem_tdp TYPE oih_s_goitem_tdp,
            ls_migo_htdp   TYPE oih_migo_htdp,
            lt_migo_htdp   TYPE STANDARD TABLE OF oih_migo_htdp.
    *------- Select stored data ----------------------------------
    * items
      SELECT *
        INTO TABLE lt_migo_htdp
        FROM oih_migo_htdp
        WHERE guid = i_guid.
    *------- build members -----------------------------------------
    *------- items
      CLEAR mt_goitem_tdp.
      LOOP AT lt_migo_htdp INTO ls_migo_htdp.
    *------- mt_goitem_tdp
    *   move field from hold QCI structure
        CLEAR ls_goitem_tdp.
        MOVE-CORRESPONDING ls_migo_htdp TO ls_goitem_tdp.
    *   append line
        INSERT ls_goitem_tdp INTO TABLE mt_goitem_tdp.  " <<< static private attribute of impl. class
      ENDLOOP.
    ENDMETHOD.
    Thus, depending on the kind of MIGO execution you need to load the appropriate item data into a (static) attribute of your BAdI implementing class. The header details you should get within method STATUS_AND_HEADER.
    Regards
      Uwe

  • Create Subscreen In MIGO with BADI MB_MIGO_BADI

    Hi,
    I have a requirement to upload serial number for a material in MIGO from excel file.
    Now for this I need a screen exit in MIGO to create subscreen but I could only found out an BADI ie. MB_MIGO_BADI which can be used for calling external subscreen.
    Can anyone tell me step by step implementaion process to use this badi to call customer program screen?
    Regards,
    Vishal

    Hi,
    Please check the link for the standard sap help regarding sub-screens
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm
    Regards
    Kiran Sure

  • How Use badi "MB_MIGO_BADI" method "LINE_MODIFY" and "CHECK_ITEM"?

    In MIGO I enter Transfer Posting with two positions of materials, then I press the button POST -
    Conducting, in this case my expansions fulfil correctly.
    If I press button HOLD - temporarily to keep the document, then I will leave transaction MIGO, again I will come, I will choose temporarily kept document and I will press the button POST-conducting, will be started necessary method u201CLINE_MODIFYu201D, where:
    DATA: l_subrc TYPE sysubrc.
      READ TABLE gt_line
           WITH KEY table_line = i_line_id
           TRANSPORTING NO FIELDS.
      l_subrc = sy-subrc.
      IF cs_goitem-bwart NE '301'.
        IF l_subrc NE 0. INSERT i_line_id INTO TABLE gt_line. ENDIF.
      ENDIF.
    The method u201CLINE_MODIFYu201D was executed only for i_line_id = u2018 00001 u2019 further
    Fulfils method u201CCHECK_ITEMu201D with a code
    DATA: ls_bapiret TYPE bapiret2.
      READ TABLE gt_line
           WITH TABLE KEY table_line = i_line_id
           TRANSPORTING NO FIELDS.
      IF sy-subrc NE 0.
        ls_bapiret-type       = 'E'.
        ls_bapiret-id         = 'ZMM.
        ls_bapiret-number     = '801'.
        ls_bapiret-message_v1 = '301'.
        ls_bapiret-message_v2 = 'S'.
        INSERT ls_bapiret INTO TABLE et_bapiret2.
      ENDIF.
    After performance u201CCHECK_ITEMu201D with i_line_id = u2018 00001 u2019, a method u201CCHECK_ITEMu201D
    It is carried out once again with i_line_id = u2018 00002 u2019, and the method u201CLINE_MODIFYu201D in general is not caused any more. And as the method u201CLINE_MODIFYu201D was not caused with i_line_id = u2018 00002 u2019 in the table gt_line record 00002 was not added and the method u201CCHECK_ITEMu201D was executed not correctly.
    How to make so that a method u201CLINE_MODIFYu201D it was carried out for for each position, and not just for i_line_id = u2018 00001 u2019 ?
    Or advise other methods or user-exit.

    Hi
    Have you tried to see the sample abap code available in the BADI definition?
    Max

  • ERROR IN BADI MB_MIGO_BADI

    Hi all,
    I have been getting this error in mb_migo_badi in the method pbo_detail
    the declaration for the key field mandt is incomplete.
    mandt is contained in the key of table me->gt_extdata and must be filled.
    But i have used it in the same way as the sample code.what did i do wrong?
    Regards,
    C.A

    got the answer.

  • Excise Invoice number in MB_MIGO_BADI

    Hello masters...
    I am working on badi MB_MIGO_BADI.
    Whenever line item in MIGO is marked as 'OK' and Enter is pressed, 
    Excise Invoice tab gets appeared.
    I wan to crosscheck if this invoice number is assigned by user or not with respect to Tax Code in PO item...
    I debugged and checked almost all internal tables in MB_MIGO_BADI, but was unable to find Excise Invoice number and Excise Invoice date..
    Please help...
    Best Regards
    Yogi

    Dear keshu,
    Thanks for your reply..
    I could not find Excise Invoice data  at header in both of the BADIs you suggested.
    Your further suggestions will be appreciated...
    Best Regards
    Yogi

  • BADI:problem with creating a new tab in BADI

    Hi
    I'm new to BADI's.
    i have a requriement to add a new tab in the MIGO transaction and add a field in that new tab .
    my Functional specification author is suggesting to use the BADI "MB_MIGO_ITEM_BADI" to create a new TAB .
    But i'm not find any function code availale in this BADI .
    Can anybody tell me how to use this BADI "MB_MIGO_ITEM_BADI" to create a new TAB .
    Also can anybody provide me any documentation available in designing a new TAB or new screen using BADI's ?

    Hi pawan
    Try this badi :   MB_MIGO_BADI  -
    (BAdI in MIGO for External Detail Subscreens)  as the name suggest ,
    If you want to add a screen in header level use : Method : PBO_header an code as :
        e_cprog   = 'ZMMPRM0001'.     """ Your screen created
        e_dynnr   = '1000'.                     "Your screen No
        e_heading = 'TEXT ID '(004).    """" Name of the screen to be created .
      ELSE .
        e_cprog   = 'ZMMPRM0001'.
        e_dynnr   = '1000'.                     "External fields: Display
        e_heading = 'TEXT ID '."(004).
    or if at item level
    u can use methid : PBO_DETAIL
    for item level screen creation . and code in the same maaner ..
    You can explore the remaning methods as per your requirements .
    Hope it helps ..!
    Regrads
    Swapnil P KAmble

  • BADI Error: Field GOITEM-ACCT is not ready for input ? HELP!

    I get this error message when testing my BADI in the MIGO Transaction.  The BADI is the MB_MIGO_BADI.  It is from the Line_modify method.  Here is the entrie message:
    BAdI: Field GOITEM-ZZREG_ACCT is not ready for input. (Change is not copied over)
    Message no. MIGO050
    Diagnosis
    The contents of field GOITEM-ZZREG_ACCT have been changed in BAdI MB_MIGO_BADI (method LINE_MODIFY). The field, however, is not ready for input, so the change cannot be copied.
    In method LINE_MODIFY, only the contents of fields that are ready for input can be changed.
    The field is defined correctly in the screen as an input/output field - so it does not relate to that.
    HELP!!!!!

    Yes - I have reviewed all of the code and I never do any modify to the screen attributes of a field - although it sure acts like it.  The screen lets me put in data and it stays there up until it finishes the method line_modify.  The error is when i press return after i enter the field- it completes the BADI method and then goes to the main program and does field validation and always comes back with some internal table field called "work" with a value of 0 and it should be a value of 6.
    Thanks! 
    Scott

  • MIGO BADI - Check line item after clicking on  ITEM_OK Field in MIGO

    Hi,
                I am looking for Enhanacement option for MIGO Transaction . What i found it, there is one Badi MB_MIGO_BADI at the creation of material document. When i click on ITEM_OK Field at material line item level. and click on CHECK Button, i want to check material master if that material is having QM View or not . That i can write in one of the method in badi which i found is CHECK_ITEM bt that method is having parameter called I_LINE_ID which have line item no. bt how should i get material doc. no and material no. at that line item?
    Plz try to give me solution.
    Thanks & Regards,
    Saurin Shah

    Hi,
    When you are posting a GR against PO when you check the document
    Method Line_modify of the badi MB_MIGO_BADI is gettin triggered and if you check the importing parameter cs_goitem
    it is getting populated wit the values of the lime item
    Like you said material no, po number, batch no, item no etc.
    Since you can get this details as you said you can check for the view maintained.
    Hope this help you.
    Regards,
    Ranjith N

  • Badi for changing Stock type in MIGO transaction

    Hello ALL,
    IS there any BADI or EXIT for changing stock type in MIGO when we are doing GR against PO then we need to change the Stock type  to Unrestricted stock.
    Please let me know.Awarded if useful.
    Regards

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

  • User Exit /Badi to display Plant field in Accounting Doc Generated in MIGO

    Hi All,
      when we do GR in MIGO FOR Movement type '101' , it creates a material document and accountign document. In the Accounting Document , we need the plant field to be displayed with the plant from the Purcahse order in the Addtional Account assingments subscreen. ( the same document can be seen in FB03).
    Is there any user exits or Badi available for this particular scenario. R we missing anything in the functional configuration.
    Kindly let us know. Thanks in advance,.
    Regards,
    Leo.

    Hi,
    You can use the badi MB_DOCUMENT_UPDATE method MB_DOCUMENT_BEFORE_UPDATE
    or badi MB_MIGO_BADI method POST_DOCUMENT.
    You need to call a function module IN UPDATE TASK in order to save the data in DB, you can use an update statement within this FM...
    Create the FM with processing type: Update Module and Start Delayed.
    Regards.

  • Populate Error Message using  MB_MIGO_BADI

    Hi Friends,
      My requirement is whenever the user does a goods receipt using transaction "MIGO" I need to check whether the item selected has an indicator "Delivery Completed" at the PO level and if this indicator is set for this PO item I need to throw an Error message and should not allow the user to create a GR against that item. I have implemented the BADI "MB_MIGO_BADI" for this purpose and I am using the method "POST_DOCUMENT" to check the PO item and throw an error message, bu the issue is afterI  throw an error message and when the user tries to exit from the transaction MIGO using the exit button, the system throws an short dump " Screen: Illegal message" because the program attempted to issue a " " message during "Exit Command" processing. In order to avoid this i tried the method "CHECK_ITEM" to populate the error message to application log, it works fine but I am not able to get the line item details inside this method. I even tried to import the line item details from the method "LINE_MODIFY" and then use it in "CHECK_ITEM" method, but the issue here is CHECK_ITEM is called only once for all the line item, ""LINE_MODIFY" was called every time i change the line item, so I was not able to use it. Can you please let me know if there is any other better way to achieve this.
    As per the below weblog, this scenario is available as part of the standard in ECC Ehp4, but unfortunately we are on Ehp1.
    Delivery Complete Indicator of PO and Goods Receipt

    Dear Imran,
       To achieve the best possible solution you have to use two methods of this BADI in combination with each other. These two methods are 'LINE_MODIFY' and 'CHECK_ITEM'.
       The method 'LINE_MODIFY' will be called every time there is some activity on the MIGO screen. In this method you will have both the item line id and the item structure available in the interface. You will need to create a class attribute which is an internal table of a locally defined structure. The first field of this  structure will be the line_item_id and the second will be the item structure itself. The first time when this method is called for a line item a new entry is inserted into this class level attribute. For each subsequent time this structure needs to be updated with the new values comparing the line item id.
      The method 'CHECK_ITEM' will be called when you press the 'CHECK' or the 'POST' buttons. In this method based on the line item id the corresponding item structure will be obtained from the class level attribute. Using the data of the structure you can then perform your validations and populate the BAPIRET2_TAB parameter with the message details which will then be dispayed in the popup message box in MIGO.
      Hope this helps.
    Best regards,
    Pradip

  • How to insert new row in MIGO using badi.

    hi,
    Transaction code: MIGO. i'm using badi "MB_MIGO_BADI" and method "LINE_MODIFY", i want to insert N number of item lines when user entered any production order no. and press enter.
    Notes: production order has only one item line with qty N.
    regards,
    Shahid Rais

    Such a feature is not available, but you could add a key event handler which works its magic when it detects a press on the down arrow key, while the last row is selected. Then you can perform the code to insert a new row.

Maybe you are looking for

  • Solution manager Remote Connection issues

    Hi I'm currently in the process of setting up Solution Manager 7.1 on windows Server 2008r2 using central system. I did the prerequisite check & the Solman installation and i'm actuallly working on the post-installation steps. I'm experiencing diffic

  • HELP WITH A FORM

    Ok here is the problem, I am trying to make a form in my existing fla document and the form will not function. I have created the form and used the exact same php script in a seperate flash movie and the form worked fine but I can not get it to work

  • Regarding characteristics subordinate values

    Hi gurus I have a requirement I have a characteristics with two values and each value have 4 subordinate values, my requirement is eg say 10_1000 with subordinate values as 10_1001, 10-1002, 10-1003, 10-1003 and 20_2000 with subordinate values as 20_

  • Popup windows on multiple windows is opened across both monitors.

    I am using Firefox 6 the latest version on Windows 7 64 bit using 2 monitors. I was on a website that wanted me to logon via facebook. So the browser opened a popup windows. The window that opened covered both monitors. The left edge of the window st

  • Macpro 3,1 GPU requirements for Photoshop CC, Video Editing 4K

    Hi - I'm looking to upgrade my paltry 512MB graphics card in my MacPro 3,1 2008 2.8 8-core to handle Photoshop CS5, CS6, CC, as well as Final Cut/Premiere 4K editing. Most if not all GPU reviews are focused on gaming performance but I'm just interest