MB_MIGO_BADI

Hi Experts,
I have implemented badi "MB_MIGO_BADI" in ECC 6.0.
I am using method "POST_DOCUMENT" to call another FM 'BAPI_KANBANCC_WITHDRAWQUANTITY'.
But since the above BADI is called in Update Task, its giving error at runtime
Error Info...   00 671: ABAP/4 processor: COMMIT_IN_POSTING
This is bcz, COMMIT WORK is called in a BADI which is executed in Update Task.
I tried to submit a background program which will call the above FM & do commit work. Still facing the same problem.
Any pointers to achieve the functionality.
Thanks,
Best regards,
Prashant

Hi Experts,
The requirement is to update the Qty & Status during POSTing in MIGO if the material is Kanban managed.
Requirement :
Scrapping using 551/ 552 should accordingly increase/ decrease the Kanban Qty and modify the status (visible in PK31 and PKPS table)
Approach:
Implemented BADI "MB_MIGO_BADI" & called the FM to update Kanban status & Qty. But got the error of COMMIT_IN_POSTING.
Any pointers to user-exit/badi which would help to fulfill the above requirement.
Thanks,
Best regards,
Prashant

Similar Messages

  • Custom screen using MB_MIGO_BADI  in MIGO transaction

    Using MB_MIGO_BADI i have cretaed a subscreen in MIGO transaction.WHen i select a particular item in MIGO transaction that particulra item value,i have to get into my custom code to make some validations.In which method i have to use set& get parameters.

    Hi sashi,
    Check the pbo and pai of that screen.
    Regards,
    Madhu.

  • 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

  • Update Mseg Table using MB_MIGO_BADI

    Hi Experts
    I had a requirement to add an additional tabstrip at the item level of MIGO transaction .
    I have implmeented the same using MB_MIGO_BADI .
    I have also added a field quantity on this tab.
    The problem now is i'm not able to update this field in the MSEG table.
    I have extended the MSEG table using append structures.
    Regards,
    Sunitha.
    Edited by: sunitha j on Mar 1, 2009 2:34 PM

    check whehter the added field is getting the data that you enter in the trnasaction in debug mode and whether the move of the data is happening...
    Regards,
    Sravan.

  • 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

  • MB_MIGO_BADI - Line item data inside CHECK_ITEMS method

    Hi All,
    I have implement MB_MIGO_BADI and i want to put a check inside the method CHECK_ITEMS where the importing parameter is line ID.
    How can I get the data for the line based on the line ID inside the check_items methods, so that I can make the custom checks inside the method and populate the error message.
    Please let me know how can we access the line item data inside the method CHECK_ITEMS.
    Thanks and Regards,
    Vijay

    Hi,
    My requirement is to use BADI MB_MIGO_ITEM_BADI and restrict the creation of GR of items which have delivery date > PO Delivery date.
    exact requirement is:-
    Invoke Badi MB_MIGO_ITEM_BADI
    Only for GR
    Check EKKO-BSART =PJ where EKKO-BELNR = MSEG-EBELN
    Check if the Po Line item has single or multiple delivery
    a) If single
    Check if MKPF-CPUDT-3 > EKPO-EEIND
    Yes u2013 Create GR
    No --- Give error message
    b) Multiple Delivery
    Check if EKET WEMNG =0
    Select EKET-EINDT where EKET-WEMNG < EKET MENGE
    Check EKET-EINDT < MKPF-CPUDT-3
    Yes u2013 Create GR
    No --- Give error message
    Error Message : u201CGR Cannot be posted as Delivery date is in future u201C
    Thanks
    Vivek

  • How to get PO number and line item in he check item method of MB_MIGO_BADI

    Hi All,
    First time I am using BADI and I am stuck in one issue.
    I am using CHECK_ITEM method of MB_MIGO_BADI.
    While pressing CHECK button MIGO for a GR(wrt to a PO),a warning message has to displayed.This warning message has to displayed according to the line item in the purchase order.
    In the CHECK_ITEM method, how I will get the PO number and the line item imported into that method.?
    Thanks.

    HI  ,
    in Check_item method 
    DATA: ls_extdata TYPE zqsscrap_screen_field .
    LOOP AT gt_extdata INTO ls_extdata .
    endloop.
    Check what you are getting  .
    regards
    Deepak.

  • 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

  • MB_MIGO_BADI change header data in tcode MIGO

    HI Experts,
    I have a requirement to change the feild posting date(BUDAT) in the header data while doing migo.
    For this i have implemented a badi MB_MIGO_BADI->IF_EX_MB_MIGO_BADI~PAI_HEADER. This method has the field is_gohead-budat. but when i'm changing the value in the method,  its giving an error message saying you cannot change filed BUDAT.
    Can anyone help me how to achieve this change?
    Regards,
    Satyam

    HI Harald,
    Thanks for your active reply.
    I tried exit  EXIT_SAPLMBMB_001. But it is not getting called while doing MIGO. I tried putting a break-point.
    I followed the following procedure. Kindly correct me if I'm wrong.
    1. In tcode CMOD, I created the project: ZMD.
    2. In Enhancement assignment i have given the enhacement name as MB_CF001.
    3. In component section the exit EXIT_SAPLMBMB_001 has include ZXMBCU01.
    4. I have written the following code in the include :
         break-point.
            if sy-UZEIT GE '000000' AND sy-UZEIT LE '060000'.
             XMKPF-BUDAT = sy-datum - 1.
              endif.
    5. I activated the project ZMD.
    When i execute the tcode MIGO and post the document, ideally it should stop at the break-point. If it does not stop than that means the exit is not being called during the run time.
    Could you kindly guide me on this.
    The movement type for the GR is 101 and is done for outbound deliveries.
    Thanks & Regards,
    Satyam

  • In migo transaction mb_migo_badi  problem

    Dear ,
          In migo  i have created one implementation for mb_migo_badi  badi  and in this implementation    i am call the functional module j_1iex_fill_excise_items by passing mseg data and document date(22.dec.2009), and this function module calls internally j_1iex_default_excise_duty functional module   by making use of date passed by above functional module(j_1iex_fill_excise_items) and according to it is picking bed TAX 10% after this  Z implemetation execution  system internally calling the standard implementation cin_plug_in_to_migo of mb_migo_badi this implementation is also calling the same function module(j_1iex_fill_excise_items) which is called in Z implementation   by passing mseg data and posting date(25.DEC.2009). due to this date difference system picking 8% (as per the fucntional maintaince) then it is overwritting the 10% by 8 %  . plz give me the solution what i have to do. plz let me know is system calls its standard implementation in every case even z implementation there .plz help me .

    Hey Manoj,
      Check the method where your written code. Always standard implementation will trigger first and then customized implementation will trigger. Try to write code in POST_DOCUMENT method.
    Otherwise you try this User Exit : MBCF0002
    Revert back for further clarifiation.
    Regards,
    Saravanan M

  • Problem in MB_MIGO_BADI, Reference Document No.(MSEG-LFBNR) field is blank

    Hi All,
    I have implemented the MB_MIGO_BADI. At the time of Goods Receipt a Custom tab is triggering only for a set of vendors as per my requirement. The problem is, in the Item level Ref. Docu field(MSEG-LFBNR) is blank when ever it's triggers my custom tab. But in the normal scenario Ref Docu field contains the Material Document No. at the time of Goods Receipt and at the time of Cancel it will have canceled material document no.
    Please let me know what is the cos of this..
    Regards,
    Pavan.M

    Hi,
    Did you check in method LINE_MODIFY .....are you able to see there
    Thanks,
    Shailaja Ainala.

  • MB_MIGO_BADI: Fields on Header - Accessing PO number

    Hi Experts,
    I am using MB_MIGO_BADI to add custom fields to the MIGO header tab. Inside the BADI methods/function modules, I'm not able to access the PO number. The PO number that is entered on the MIGO screen is needed to fill the new fields that I've created. How do I get the PO number?

    Well, I solved it on my own...here's how:
    In the FM of the method PAI_Header, I added this code:
    DATA LV1(28) TYPE c VALUE '(SAPLMIGO)GODYNPRO-PO_NUMBER'.
    FIELD-SYMBOLS <fs1> TYPE ANY.
    ASSIGN (LV1) TO <fs1>.
    Now, I can use Select statements to get data using this PO number!

  • MB_MIGO_BADI and use of local class of SAPLMIGO

    Hello
    I used the BADI MB_MIGO_BADI and methode LINE_MODIFY to change all i want on the ITEM. That's OK and all is working.
    But, because there is  a but...I'd like to check if the item fields are input fields, invisible fieds, etc, etc , exactly like on a loop at screen for example.
    For this, SAP use in standard in SAPLMIGO a local class named lcl_migo_screenmodification ( in include LMIGOSM3 of ECC5.0 ) with the methode get :
        get
          IMPORTING
            i_global_counter TYPE migo_global_counter   OPTIONAL
            i_field          TYPE migo_fieldname
            i_badi           TYPE abap_bool             OPTIONAL
          RETURNING
            value(r_status)  TYPE migo_fs_status,
    and this is perfect to know the attributes of each screen field, depending the status return.
    But, in the BADI, is it possible to use a local class during the run time of the MIGO  ? and HOW if possible ?
    thanks for your help

    Yep, this is exactly what class loaders are for. Create a URLClassLoader pointing to the specific URL you want the classes loaded from. Then use findClass on the ClassLoader to find a Class object, and newInstance on that Class object to get an instance of the class.
    Another thing you should do is completely empty out the user's classpath before running Java, so you know the only classes you're dealing with are the ones you're loading. Kinda hard for an applet, but controllable for an application.

  • 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

  • MB_MIGO_BADI. Post document. Posting date?

    Hi Guys,
    I need your help. I'm using MB_MIGO_BADI, method post_document to change posting date in header. After user changed the posting date I need to check some conditions and if they are fulfilled I want to change this posting date with sending the W-message that posting date was changed. After this user needs to press post again and GR will be posted. My problem is that I cannot change the posting date in is_mkpf structure. In method PAI_HEADER I saved posting date changed by user and now I'm trying to use it to update is_mkpf
    field-symbols: <fs> type mkpf.
    if post_fy > del_fy.
    concatenate cur_fy '0831' into post_date.
    assign is_mkpf to <fs>.
    <fs>-budat = post_date.
    message w895(m7) with 'Posting date changed. Post again.'.
    but I have runtime error "overwriting protected filed". What I need to do to change the posting date with a new value?
    Thanks a lot.

    Hi,
    Create an implementation of this badi in SE19.
    Go to tcode SE19. Give the z implementation name. In the definition name of give MB_MIGO_BADI.
    If the z-fields are in table MSEG I hope it will be available to you in IT_MSEG table as well in the badi.
    Write the code for populating the fields. Save and Activate the badi implementation.
    KR Jaideep,

Maybe you are looking for