MM compare to MIGO

Hi,
I came across with the following two lines that MB01 is more friendly with barcode transaction if it is right then please can any one explain me how we can do it
Can any one explain this to me i am waiting for reply from last two days.
Please explain!..
Gajanan

I think we still need further clarification in order to best address your query.
MB01 is effectively interchangeable with MIGO for goods receipts.  It is simply the "old style" transaction before MIGO (referred to as an "Enjoy" transaction) came out in, I think, 4.6C.  In MB01, instead of using collapsible screen areas with tabstrips there are many icon pushbuttons with subscreens.
I'm not certain why this transaction would be better for entering barcoded information.  What it does seem to be better for are automated tasks like BDC sessions, CATT scripts and LSMW programs.
Unlike other transactions that have been updated with "N" successors (like VL02 / VL02N), SAP does not issue a warning upon execution that MB01 is an old transaction.  Which essentially means that support for this transaction will remain for the foreseeable future.

Similar Messages

  • Miro posting previous date compared to migo date

    Hi,
    I did MIGO on  06/03/2009, when i post MIRO on previeous date for ex 06/02/2009, where the system is allowing to post it, how to stop it? ??

    hi,
    Who said to you that MRBR is only used for the payment block...For your information, in the MRBR screen itself, in the middle under blocking procedure tab , there are three reasons given:
    1. blocked due to variances - Under this only the date variance also come...other variances are price qty variance, price variance etc..
    2. Manual payment block
    3. stochastically block
    Check properly and revert back...the problem would be there only...
    Regards
    Priyanka.P

  • Excise Duty capturing in less in the fresh PO

    Dear all,
    I created a separate PO with material xxxx I tried to do MIRO for this Plan delivery cost then I try to do MIGO Simulated and checked the BED amount. For that  material xxxx it gave the difference in BED when i compared with MIGO and MIRO. please give some suggestion.
    Regards,
    Raziq.
    Note - Chapter ID is maintained for that material. all condition type are working properly.when I use other materials BED is capturing properly, only for this material i am getting such problem.

    hi
    in Spro>Logistics - General>Tax on Goods Movements>india>Basic Settings>Maintain Excise Groups
    here for the excise group you are uisng tick Ei capture , post under MIGO SETTINGS
    so now the excise tab will be viewvable in MIGo
    and also u have to miantain the material excise details in MM02 or in J1ID
    regards
    kunal

  • Actual Cost of finished goods in MIGO

    Hi,
    The value of Finished material in FI Document generated in MIGO takes the (Goods Receipt Quantity) X (Planned/Moving average Price from material master), Where as it should take the Total Actual Price calculated after Order Confirmation Based on Actual Material Purchase Price & Actual Activity Posting Value.
    For example:
    Present scenario
    Material-> MIGO QTY>Moving Avg Price -->MIGO FI Document Value
    Finished> 1000  EA> Rs. 10/ EA--
    >Rs. 10,000=00
    Required Scenario:
    MIGO FI Document value= (Purchase Value of Raw Material)+ ((Activity Posted while Confirmation)X(Activity price))
    Thanks.

    Hi,
    What u said is right Mr Kapil.. See when u do GR From Production Order System Calculate Moving Price or Planned Price from
    material Matser .
    As per ur Reuirement u told it should calculate (Raw Material Price + activity+OVHD).
    it is possible only when order quantity is less , suppose say your order qty is 150 mt per day and your Plant capacity is 500mt
    per day production will be done in a half day, sale can be done on same day after Production with the formula what u told.
    If suppose say , Your order is 2000 ton of Oil , it will take u to complete 4 days for your Total production as you told, GR should
    be done on (Raw Material Price + activity+OVHD) formula, you dont know exact activity price for 2000 ton until u finish your total
    production, at the same time until u do GR sales cannot be done. So in SAP Gr is intially done on Moving Average Or Planned
    (Standard Price) , After totla Prodcution GR is Compared with Actual Cost(Raw Material Price + activity+OVHD)= :"Variance".
    Plus are MInus is Reduced or added to Finished Goods Account or PP account during Settlement.
    If any wrong Pls Correct me Experts,
    Pavan

  • MIGO quantity defaulted as zero for Scheduling agreement

    Hello,
    I have created one scheduling agreement with type LPA.
    Maintained the delivery schedule lines using me38.
    Then have generated JIT schedule for the schedule lines.
    But in the Schedule lines/release is not getting updated.
    Hence, system is not proposing the open quantity in MIGO.
    Please help in resolving the issue and suggest the configuration required for generating JIT schedule.

    Hi,
    Compare and check - Goods receive datewith MIGO t.code and delivery date scheduled in t.code: ME38
    Regards,
    Biju K

  • CIN: Excise invoice accounting document is incorrect - MIGO

    Dear All,
    In MIGO, the Material document has two items (both are Consumables with the same chapter ID) for which the excise invoice has been posted successfully. The RG23C Part 2 register is updated correctly.
    But the accounting document so created has postings for only the second item. The posting for the first item is missing.
    We have checked for the settings for 'Multiple goods receipt, Multiple credits' in Plant Settings and also in Excise Registration which is set.
    Both the items in the Material document have the same tax code.
    We have checked for the excise GL accounts.
    The Excise GL accounts have been configured to GRPO
    We have also checked the J_1IPART2 table. and the accounting document updated with BED, AED, ECS and SeCEss amounts are correct.
    But what puzzles me is, when we check the accounting document in FB03, it has postings for only one item.
    We have checked the configurations and everything seems fine. We have simulated this situation in Quality system and it works fine, i.e .the accounting document has postings for both the items. Problem here looks like, itu2019s a manual error. Since all the tables are updated, and only the accounting part is missing, is it ok, if we create a manual accounting document?
    Can you please suggest?
    Many thanks in advance
    Vinod P

    You are saying materials are consumables and registered in RG23C.  This register is for Captial goods and not for consumables.  I think it could be RG23A.  check once again.
    Check J1ID for both materials and compare.  I am sure some of the details were missed here.  Even blank field will not allow to post
    Srinivas

  • BDC for MIGO for GR OutBound Delivery( A01 & R05 ) from Movement Type 107 to 109

    Hi,
    I am stuck with a very typical situation need all your expertise and advices for a solution.
    We are basically trying to create change the movement type from 107 to 109 through MIGO.
    I have made a BDC recording for MIGO ( because we would like to track each delivery specifically under shipment , I know that there is a BAPI which is there to do this but it works fine if we do the shipment with Purchase Order as input which dont want in that manner )
    Process:
    1. Creating Production Order
    2. Creating Purchase Order
    3. Creating STO
    4. Deliveries
    5. PGI for Deliveries
    6. Shipment for group of outbound Deliveries
    I have created a z program where i am passing shipment number in the selection screen.
    Then it would take all the deliveries for that shipment and pass each delivery to MIGO and process it and change the status from 107 to 109.
    Interesting part here is, the code works absolutely perfect only from my ID. But when I test from other ID it is not executing, so to check where is the problem I have added mess_tab to the CALL TRANSACTION to capture what message is been populated for my ID comparing with others
    Message Captured on Others ID's:
    MSGID: 00
    MSGNR: 344
    MSGV1: SAPLMIGO
    MSGV2: 1300
    Message Captured on MY ID:
    MSGID: MIGO
    MSGNR: 012
    MSGV1: 5000005802
    MSGV2: (empty)
    This is the problem this program is executing only on MY ID, rest all ID's it is not processing.
    We have cross verified with security and basis regarding any authorization issues but nothing came up.
    Please help me what could be the issue ( WHY it is processing successfully for my and WHY NOT for other ID's)
    Below is the main code :
    CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'                     " Converting Date format to DD/MM/YYYY
         EXPORTING
           DATE_INTERNAL            = sy-datum
         IMPORTING
           DATE_EXTERNAL            = lv_date_external
         EXCEPTIONS
           DATE_INTERNAL_IS_INVALID = 1
           OTHERS                   = 2.
           IF SY-SUBRC <> 0.                                     "#EC NEEDED
    * Implement suitable error handling here
           ENDIF.
    *   Validating input shipment number with database table VTTP
           SELECT VTTP~TKNUM
                  VTTP~TPNUM
                  VTTP~VBELN
             FROM VTTP INNER JOIN VTTK
             ON VTTP~TKNUM = VTTK~TKNUM
             INTO TABLE IT_VTTP
             WHERE VTTK~TKNUM = P_TKNUM
               AND VTTK~STDIS = 'X'.
           IF sy-subrc = 0.
    *   Validating all deliveries having same Delivery type or not
             SELECT * FROM likp INTO TABLE it_likp FOR ALL ENTRIES IN it_vttp WHERE vbeln = it_vttp-vbeln
                                                                                AND vbtyp = 'J'.
             IF sy-subrc = 0.
               CLEAR lv_lines.
               LOOP AT it_likp INTO wa_likp.
                 REFRESH:it_vbfa,BDCDATA.
    *   Validating if Delivery Type = 109 (GR already done), or Delivery Type = 107 (must process for GR )
                 SELECT * FROM vbfa INTO TABLE it_vbfa WHERE vbelv = wa_likp-vbeln
    *                                                AND vbtyp_v = 'J'
                                                         AND bwart = '109'.
                 IF sy-subrc = 0.
                   lv_flag1 = 'X'.
                 ELSE.
                   SELECT * FROM vbfa INTO TABLE it_vbfa WHERE vbelv = wa_likp-vbeln
    *                                                  AND vbtyp_v = 'J'
                                                           AND bwart = '107'.
                   IF sy-subrc NE 0.
                     MESSAGE 'No Deliveries with Movement Type "107" ' TYPE 'I'.
                   ELSE.
                     lv_flag2 = 'X'.
                     lv_lines = lv_lines + 1.
    **  BDC for MIGO
                     perform bdc_dynpro      using 'SAPLMIGO' '0001'.
                     perform bdc_field       using 'BDC_OKCODE'
                                                   '=OK_GO'.
                     perform bdc_field       using 'GODYNPRO-ACTION'
                                                   'A01'.
                     perform bdc_field       using 'GODYNPRO-REFDOC'
                                                   'R05'.
                     perform bdc_field       using 'GODEFAULT_TV-BWART'
                                                   '109'.
                     perform bdc_field       using 'BDC_CURSOR'
                                                   'GODYNPRO-OUTBOUND_DELIVERY'.
                     perform bdc_field       using 'GODYNPRO-OUTBOUND_DELIVERY'
                                                   wa_likp-vbeln. "'80019574'.
                     perform bdc_field       using 'GOHEAD-BLDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-BUDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-WEVER'
                                                   '1'.
                     perform bdc_dynpro      using 'SAPLMIGO' '0001'.
                     perform bdc_field       using 'BDC_OKCODE'
                                                   '=OK_POST1'.
                     perform bdc_field       using 'GODEFAULT_TV-BWART'
                                                   '109'.
                     perform bdc_field       using 'GOHEAD-BLDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-LFSNR'
                                                   wa_likp-vbeln. "'0080019574'.
                     perform bdc_field       using 'GOHEAD-BUDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-WEVER'
                                                   '1'.
                     perform bdc_field       using 'GODYNPRO-DETAIL_ZEILE'
                                                   '   1'.
                     perform bdc_field       using 'GOITEM-ERFME'
                                                   'EA'.
                     perform bdc_field       using 'GOITEM-ERFMG'
                                                   '1'.
                     perform bdc_field       using 'GOITEM-LSMNG'
                                                   '1'.
                     perform bdc_field       using 'GOITEM-LSMEH'
                                                   'EA'.
                     perform bdc_field       using 'GOITEM-MIGO_ELIKZ'
                                                   '1'.
                     perform bdc_field       using 'GOITEM-BWART'
                                                   '109'.
                     perform bdc_field       using 'GOITEM-LGOBE'
                                                   'RX Cross-docking'.
                     perform bdc_field       using 'BDC_CURSOR'
                                                   'GODYNPRO-DETAIL_TAKE'.
                     perform bdc_field       using 'GODYNPRO-DETAIL_TAKE'
                                                   'X'.
                     PERFORM bdc_dynpro      USING 'SAPLMIGO' '1300'.
                     PERFORM bdc_field       USING 'BDC_CURSOR'
                                                   'G_TIP_DONT_SHOW_AGAIN'.
                     PERFORM bdc_field       USING 'BDC_OKCODE'
                                                   '=OK_TIP_GO'.
                     PERFORM bdc_field       USING 'G_TIP_DONT_SHOW_AGAIN'
                                                   'X'.
    *& Avoid unncessary screens to populate while processing background.
                     LV_OPTIONS-DISMODE = 'N'.
                     LV_OPTIONS-UPDMODE = 'S'.
                     LV_OPTIONS-NOBINPT = 'X'.
                     CALL TRANSACTION 'MIGO' USING BDCDATA  OPTIONS FROM LV_OPTIONS MESSAGES INTO IT_MESSTAB1 .
                     WAIT UP TO 1 SECONDS.
                     DELETE IT_MESSTAB1 WHERE MSGTYP NE 'E'.
                     IF IT_MESSTAB1[] IS NOT INITIAL.
                       APPEND LINES OF IT_MESSTAB1 TO IT_MESSTAB.
                     ENDIF.
                   ENDIF.
                 ENDIF.
               ENDLOOP.
             ENDIF.
           ELSE.
             MESSAGE 'Shipment Number does not exists Or not Planned' TYPE 'E'.
           ENDIF.
         ELSE.
           MESSAGE 'Please insert Shipment Number' TYPE 'E'.
         ENDIF.
         IF lv_flag1 = 'X' AND lv_flag2 = 'X'.
           MESSAGE 'This shipment is processed with an inconsistent goods receipt' TYPE 'I'.
         ELSEIF lv_flag1 = 'X'.
           MESSAGE 'Shipment already been processed for these deliveries' TYPE 'I'.
         ELSEIF lv_flag2 = 'X'.
           lv_lines1 = lv_lines.
           CONDENSE lv_lines1 NO-GAPS .
           CONCATENATE lv_lines1 'Goods Receipt are posted for the shipment '
                  INTO lv_message SEPARATED BY space.
           MESSAGE  lv_message TYPE 'I'.
         ENDIF.
    * Display Messages from Message TAB.
         DELETE ADJACENT DUPLICATES FROM IT_MESSTAB.
         DATA:lv_msg TYPE string.
         LOOP AT IT_MESSTAB INTO WA_MESSTAB.
           CALL FUNCTION 'FORMAT_MESSAGE'
             EXPORTING
               ID        = WA_MESSTAB-MSGID
               NO        = WA_MESSTAB-MSGNR
               V1        = WA_MESSTAB-MSGV1
               V2        = WA_MESSTAB-MSGV2
               V3        = WA_MESSTAB-MSGV3
               V4        = WA_MESSTAB-MSGV4
             IMPORTING
               MSG       = lv_msg
             EXCEPTIONS
               NOT_FOUND = 1
               OTHERS    = 2.
           IF sy-subrc <> 0.
    * Implement suitable error handling here
           ENDIF.
           WRITE:/ lv_msg.
         ENDLOOP.
    *        Start new screen                                              *
       FORM BDC_DYNPRO USING PROGRAM DYNPRO.                 "#EC PF_NO_TYPE
         CLEAR BDCDATA.
         BDCDATA-PROGRAM  = PROGRAM.
         BDCDATA-DYNPRO   = DYNPRO.
         BDCDATA-DYNBEGIN = 'X'.
         APPEND BDCDATA.
       ENDFORM.
    *        Insert field                                                  *
       FORM BDC_FIELD USING FNAM FVAL.                       "#EC PF_NO_TYPE
         CLEAR BDCDATA.
         BDCDATA-FNAM = FNAM.
         BDCDATA-FVAL = FVAL.
         APPEND BDCDATA.
       ENDFORM.
    Thanks,
    Srini

    Hi Rob,
    Thanks for quick reply.
    I have checked the NOTE : 304122
    But there in the NOTE it says ( " BAPI, BAPI_GOODSMVT_CANCEL, BAPI_GOODSMVT_CREATE, CNTL_ERROR" )
    These BAPI's work perfectly for (purchase order as input type), but here out type is ( A01 & R05 ) we are giving DELIVERY NUMBER as input to MIGO.
    So for this scenario we cannot use those BAPI's mentioned in the NOTE.
    Also as stated earlier in the message interesting part is
    "The code works absolutely perfect only from my ID. But when I test from other ID it is not executing. Code is working exactly as expected ONLY to my ID. When i try to execute the same code from another's ID it is not working"
    So what do you think might be the issue?

  • MIRO(Invoice Verification) posting date is lesser than MIGO(Goods Receipt)

    MIRO(Invoice Verification) posting date is lesser than MIGO(Goods Receipt) posting date.
    Explanation:
    Miro sholud be posted after the GRN has posted. It means that the Posting date of Miro should be greater than or equal to the Posting date of Migo. But I am facing the issue that I can able to post the Miro before the Migo date..
    For example:  I have posted the Migo(Goods receipt) document with the posting date u2013 10.8.09 and at the same time I can also able to post the Miro(Invoice Verification) posting date as u2013 5.08.09. This is should not be allowed . Kindly give me the solution. Is there any options in SAP standards to restrict this type of Postings(without using user exit).
    regards
    Varadharaj

    Hi
    you  need to use BADi for this INVOICE_UPDATE
    you can give logic as whil;e MIRO system will compare posting date with MIGO doc , then create a Z error msg in se91 nad assign it in that badi
    take help of ABAPer, check following link
    [LINK |GR date lesser than the PO date, the system should show an error message.;

  • SAP MM -- error in MIGO & J1ia

    The error is that the
    ( 1.)  Excise Invoice of Vendor is not being captured in Migo.
    MIGO  --  Excise Invoice (tab)
    ( 2.)  When we compare the Document Status between the Quality Server & Production Server it is showing as u201CIn Processu201D & u201CCompletedu201D respectively.
    J1IA (Display Excise Invoice)  --  Document Status is being shown as COMPLETED. (Production Server)
    When cross checked it in Quality Server it is being shown up as IN PROCESS.

    Dear,
    Activate CIN for Country India
    Define Tax Procedure TAXINJ / TAXINN in OBBG
    and assign it to Country.
    Create Tax Codes thru. FTXP T. code. Maintain Condition recors in FV11 T.code if the Tax procedure is TAXINN.
    Through J1ID Material Chapter Id
    For Material
    Maintain Chapter ID
    Maintain Chapter ID with Material Combination
    Maintain Cenvat Determination
    Maintan Tax Rates.
    For Vendor
    Vendor Excise details should be maintained
    If the Material is Excisable Excise Invoice tab will be automatically comes in MIGO once you Check the Migo document before posting.
    Please refer this link also,
    Capture Excise invoice in MIGO
    Regards,
    R.Brahmankar

  • BADI for MIGO transaction in ECC 6.0

    Hi All,
    We are upgrading our SAP R3 from 4.6c to ECC 6.0.
    In the new system, Transaction SE18 now has two options
    1. Enhancement spot
    2. BAdI Name
    When I display my BADI MB_DOCUMENT_BADI
    Attributes tab shows BAdI migrates to enhancement spot MB_GOODSMOVEMENT
    When I display Enhancement spot Technical details Tab shows Enhancement Implementation Status shows "Initial".
    We have implemented this BADI in our 4.6c version. And it’s triggering when I run MIGO transaction.
    In the new system BADI is not triggering when I run the MIGO.
    Above is the only difference I found in the new system when compared with our old system settings.
    Can any one suggest me what all the things I need to take care to get working this BADI
    Thanks,
    Satish

    Hi satish,
                Pls check here,
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://www.esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    Cheers
    Hareesha k

  • Document date&Posting date Validation In MIGO Transaction

    Hi,
    I need to control document date should not be in future date comparing to posting date and should not be past date comparing to PO date in MIGO transaction.Pls suggest.
    Regards
    Mani

    Dear Mani,
    Goto Spro
    Materials Management -> Inventory Management and Physical Inventory -> Define Attributes of System Messages
    Goto Settings for System Messages and select
    Version 00
    Application area -- M7
    Messages no -- 088 -- Document date lies in the future. (Check your entry)
    Convert in Error Massage.
    Regards,
    PK

  • MIGO against Outbound Delivery, fully GR-booked items appear again

    Hello gurus,
    I am totally confused with the MIGO behavior. Please help me out.
    We have a user Movement Type 9xx, which is made as a copy of MvT 101. We use this MvT 9xx to support our intra company Stock Transfer Order process.
    After STO is created, Outbound Delivery is made and Goods Issue is done we can do MIGO GR for the corresponding Outbound Delivery. (Well, I have to post GR again Outbound Delivery not STO because otherwise the outbound delivery document flow <in table VBFA> is not updated.)
    Say I have two items (X and Y) in one outbound delivery.
    If I post a GR 101 against outbound delivery item X and then I do MIGO GR against the same outbound delivery I only see item Y. This is perfectly correct.
    But the strange thing is that if I post a GR 9xx against the outbound delivery item X and I try again to post GR 9xx against the same outbound delivery (at this time I want to do GR for item Y) the both items (X and Y) are displayed on the MIGO screen.
    What can I do to let MIGO don't display the item X when a full qty GR 951 has taken place?
    Because of some constrains we need to realize MIGO GR against outbound delivery on item level. Is this doable?
    Any help will be appreciated. Thanks in advance.
    Yongmei

    Dear Yongmei,
    From your explanation, it appears that there is a difference in the attributes for the two Mvt types. I wld suggest you to compare the Quantity updation rules for both the Mvt types in OMJJ.
    Also check all the settings have been made for 9xx in OMJJ.
    Hope this helps.
    Regards
    Keshav

  • Updating custom fields to MSEG through MIGO

    Hi,
    I got a requirement to add a tab with custom fields in MIGO transaction, which I did using BADI MB_MIGO_BADI
    and requirement also says to extend table MSEG with custom fields and store the values in MSEG.
    I have gone through example implimentation and updated MSEG in similar way. IS it a good approach to extend MSEG table? I read one thread says we can't extend MSEG table with custom fields. is it true?
    Goods receipt will be done only through MIGO to restrict inconsistensies in material documents.
    One more question.
    How to restrict the additional custom screen to be displayed for particular action in MIGO?
    Thanks

    Hi,
    Yes you can do it, i did it with the same BADI method to update to custom fields in MSEG table through MIGO transaction.
    Here is the steps you need to follow :-
    1. Create a append structure or you can use the CI include to add fields in MSEG table. I did it though append structure only.
    2. Create a implementaion of MB_MIGO_BADI through SE18 or SE19 transaction.
    3. Inplement the interface IF_EX_MB_MIGO_BADI methods, the details of interface implementaions are described below:-
    Attribute
    GV_VEND_LOT     Instance Attribute     Public     Type     CHAR1     'X' : Purchase order Type NB (Standard PO) found                                                                               
    GIT_MSEG     Instance Attribute     Public     Type     TY_T_MSEG     Table MSEG                                                                               
    GV_BSART     Instance Attribute     Public     Type     ESART     Purchasing Document Type                                                                               
    GV_GRMODE     Instance Attribute     Public     Type     CHAR1     X: Document is of Type GR with PO and Y : Document with Mat.                                                                               
    GWA_MSEG     Instance Attribute     Public     Type     MSEG     Document Segment: Material                                                                               
    GC_CLASS_ID     Constant     Private     Type     MIGO_CLASS_ID     Class ID for MIGO Components (External Detail Screen)     'ZIMP_MB_MIGO_BADI'
    GV_LINE_ID     Instance Attribute     Private     Type     GOITEM-GLOBAL_COUNTER     LINE_ID of Line Displayed in Detail                                                                               
    GIT_LINE_ID     Instance Attribute     Private     Type     /KYK/TRG_NUMC6     Range Table: NUMC6                                                                               
    GWA_LINE_ID     Instance Attribute     Private     Type     /KYK/SRG_NUMC6     Range Structure: NUMC6                                                                               
    GC_X     Constant     Private     Type     CHAR1     'X' : Select     'X'
    GC_BSART     Constant     Private     Type     ESART     Purchasing Document Type     'NB' 
    IF_EX_MB_MIGO_BADI~INIT
    METHOD if_ex_mb_migo_badi~init.
      IF gv_grmode = gc_x.
    Regristration of BAdI-Implementation:
    Append class attribute GF_CLASS_ID (='ZIMP_MB_MIGO_BADI') to
    regristration table.
        APPEND gc_class_id TO ct_init.
      ENDIF.
    ENDMETHOD.
    IF_EX_MB_MIGO_BADI~PBO_DETAIL
    METHOD if_ex_mb_migo_badi~pbo_detail.
    Lines added to do display Vendor lot tab in the item level
    Only for Purchase order type NB (Standard PO)
    Local constants
      DATA : lc_cprog TYPE sycprog VALUE 'ZMMM_MIGO_VENDOR_COO',
             lc_dynnr TYPE sydynnr VALUE '0100'.
            lc_heading TYPE migo_badi_heading VALUE 'Vendor Lot Number'.
    Read Line item from buffer table
    if sy-subrc =0 then only display vendor lot tab
      READ TABLE git_line_id WITH KEY low = i_line_id
      BINARY SEARCH TRANSPORTING NO FIELDS.
      IF sy-subrc EQ 0 AND ( gv_grmode IS NOT INITIAL
        AND gv_vend_lot = gc_x ).
        e_cprog   = lc_cprog. " Program name
        e_dynnr   = lc_dynnr. " Screen number
        e_heading = text-001. " Tab Heading
        gv_line_id = i_line_id. " line Item
      ENDIF.
    ENDMETHOD.
    IF_EX_MB_MIGO_BADI~PAI_DETAIL
    METHOD if_ex_mb_migo_badi~pai_detail.
      IF gv_grmode IS NOT INITIAL AND gv_vend_lot = gc_x.
    'X':  The Method LINE_MODIFY Is Processed
        e_force_change = gc_x.
    Reset the Flag for next line item selection
        CLEAR gv_vend_lot.
      ENDIF.
    ENDMETHOD.
    IF_EX_MB_MIGO_BADI~LINE_MODIFY
    METHOD if_ex_mb_migo_badi~line_modify.
      IF cs_goitem-ebeln IS NOT INITIAL.
    Look for Purchase order number from EKKO and get the Order Type.
    If the Order type is NB (Standard PO) then set the flag GV_VEND_LOT.
        SELECT SINGLE bsart FROM ekko INTO gv_bsart
          WHERE ebeln = cs_goitem-ebeln.
        IF sy-subrc EQ 0 AND gv_bsart = gc_bsart.
          gv_vend_lot = gc_x.
          IF NOT i_line_id IS INITIAL.
            gwa_line_id-low = i_line_id.
          ENDIF.
          IF git_line_id IS NOT INITIAL.
            SORT git_line_id BY low.
          ENDIF.
          READ TABLE git_line_id WITH KEY
          low = i_line_id BINARY SEARCH
          TRANSPORTING NO FIELDS.
          IF sy-subrc <> 0 AND gwa_line_id IS NOT INITIAL.
            APPEND gwa_line_id TO git_line_id.
          ENDIF.
        ELSE.
          CLEAR gv_vend_lot.
        ENDIF.
        CLEAR : gv_bsart,
                gwa_line_id.
      ENDIF.
    *************Buffer MSEG table with custom fields **********************
    *Item is Adopted in Document
      IF NOT cs_goitem-take_it IS INITIAL.
        CLEAR gwa_mseg.
        MOVE-CORRESPONDING cs_goitem TO gwa_mseg.
        APPEND gwa_mseg TO git_mseg.
      ENDIF.
    ENDMETHOD.
    METHOD if_ex_mb_migo_badi~post_document.
    Delete duplicate line item if avail in GIT_MSEG table
      SORT git_mseg BY zeile.
      DELETE ADJACENT DUPLICATES FROM git_mseg COMPARING zeile.
    To access these valu in Ennhancement Spot ZENHIMPL_MM_MB_MIGO_BADI_MB
      EXPORT : git_mseg FROM git_mseg TO MEMORY ID 'GIT_MSEG',
               gv_grmode FROM gv_grmode TO MEMORY ID 'GV_GRMODE'.
    Refresh all class content
      CLEAR : gv_vend_lot,
              gv_bsart,
              gv_grmode,
              gwa_mseg,
              gv_line_id,
              gwa_line_id.
      REFRESH : git_mseg,
                git_line_id.
    ENDMETHOD.    
    METHOD if_ex_mb_migo_badi~mode_set.
    Local Constants
      DATA : lc_a01 TYPE goaction VALUE 'A01', " Goods Receipt
             lc_r01 TYPE refdoc VALUE 'R01',   " Purchase order
             lc_a04 TYPE goaction VALUE 'A04', " Display
             lc_r02 TYPE refdoc VALUE 'R02',   " Material Document
             lc_y   TYPE char1 VALUE 'Y'.      " Indicator for Display material document
    Set mode variable for Good Receipt with Purchase order
      IF i_action = lc_a01 AND i_refdoc = lc_r01.
        gv_grmode = gc_x.
      ELSEIF i_action = lc_a04 AND i_refdoc = lc_r02.
    Set mode variable for Good Receipt with Purchase order
        gv_grmode = lc_y.
      ELSE.
        CLEAR gv_grmode.
      ENDIF.
    ENDMETHOD.
    METHOD if_ex_mb_migo_badi~publish_material_item.
      IF ls_goitem-ebeln IS NOT INITIAL.
    Look for Purchase order number from EKKO and get the Order Type.
    If the Order type is NB (Standard PO) then set the flag GV_VEND_LOT.
    This method is used to material document display
        SELECT SINGLE bsart FROM ekko INTO gv_bsart
          WHERE ebeln = ls_goitem-ebeln.
        IF sy-subrc EQ 0 AND gv_bsart = gc_bsart.
          gv_vend_lot = gc_x.
          IF NOT ls_goitem-zeile IS INITIAL.
            gwa_line_id-low = ls_goitem-zeile.
          ENDIF.
          IF git_line_id IS NOT INITIAL.
            SORT git_line_id BY low.
          ENDIF.
          READ TABLE git_line_id WITH KEY
          low = ls_goitem-zeile BINARY SEARCH
          TRANSPORTING NO FIELDS.
          IF sy-subrc <> 0 AND gwa_line_id IS NOT INITIAL.
            APPEND gwa_line_id TO git_line_id.
          ENDIF.
        ELSE.
          CLEAR gv_vend_lot.
        ENDIF.
        CLEAR : gv_bsart,
                gwa_line_id.
      ENDIF.
    ENDMETHOD.
    METHOD modify_mseg.
      DATA : lwa_mseg TYPE mseg.
    Check if buffer MSEG table is not initial
    and mode is GR with PO then only update XMSEG from GIT_MSEG
      IMPORT : git_mseg TO git_mseg FROM MEMORY ID 'GIT_MSEG',
               gv_grmode TO gv_grmode FROM MEMORY ID 'GV_GRMODE'.
      IF git_mseg IS NOT INITIAL
         AND gv_grmode = gc_x.
        SORT git_mseg BY zeile.
        LOOP AT xy_mseg INTO lwa_mseg.
    Identify the record and update XMSEG
          CLEAR gwa_mseg.
          READ TABLE git_mseg
          INTO gwa_mseg
          WITH KEY zeile = lwa_mseg-zeile BINARY SEARCH.
          IF sy-subrc EQ 0.
            MODIFY xy_mseg FROM gwa_mseg
            TRANSPORTING zvendlot zcoo WHERE zeile = gwa_mseg-zeile.
          ENDIF.
          CLEAR lwa_mseg.
        ENDLOOP.
    Reset buffer table and mode
        REFRESH git_mseg.
        CLEAR gv_grmode.
      ENDIF.
    Free memory ids
      FREE MEMORY ID : 'GIT_MSEG',
                       'GV_GRMODE'.
    ENDMETHOD.
    4. Now go to the function module MB_POST_GOODS_MOVEMENT andcall the method modify_msegfrom the implemented class ZCL_IM__MB_MIGO_BADI.
    ENHANCEMENT 110  ZENHIMPL_MM_MB_MIGO_BADI_MB.    "active version
    Data declaration for badi method
      Data : lo_ZCL_IM__MB_MIGO_BADI TYPE REF TO ZCL_IM__MB_MIGO_BADI.
      CREATE OBJECT lo_ZCL_IM__MB_MIGO_BADI.
      if sy-subrc eq 0 and xmseg[] is NOT INITIAL.
        CALL METHOD lo_zcl_im__mb_migo_badi->modify_mseg
          CHANGING
            xy_mseg = xmseg[].
      endif.
    ENDENHANCEMENT.   
    Regards,
    Dhirendra Pandit

  • Invoice posting not permissible after posting MIGO

    Dear Experts
    I don't want to make MIGO ( Goods Receipt ) after making Invoice (MIRO) date.
    Suggest me steps for the same.
    Regards
    viral.

    Hi Viral,
    You need to incorporate the logic of "System should not allow while doing the MIRO before the Posting date of GRN posting date in the enhancement"
    The logic is to take the GR document number from the table DRSEG-LFBNR - Document No. of a Reference Document,  retreive the GR posting date from table MKPF, compare the same with the Invoice Posting date. if the invoicing posting date is smaller than the GR posting date then give the error message as "System should not allow while doing the MIRO before the Posting date of GRN posting date" if it is not then no message.This will be applicable only if GR-Based IV is flagged in the PO line item or else the invoices without GR's will not be posted.
    You will need an ABAPer to develop the same in the sytem.
    U may write the above code in
    Exit Function Module : EXIT_SAPLMRMP_010
    Include : ZXM08U16
    Regards,
    Kiran

  • MIGO authorization

    Hai Experts.
    IN MIGO ,
    for my user ID , its showing all the line items . after receiving goods also . Actually i given tolerance 3 % in my user id , I do the MIGO  for only PO order qty , and save . Again . i open the MIGO , same PO , its showing all the line items . qty is showing 0 qty edit mdode.
    For my client user id , its not showing the all the line items .what are the open PO qty is there ,that's line item only its showing .
    Clients wants that , after receiving po order qty ,i want to show all line items in MIGO .
    give me solution for this one . Tell me any object authorization allowing

    Hi, Just compare MIGO screen for your User ID & your Client user ID,
    For MIGO to suggest quantities of zero upon GR with reference to PO even all ordered quantity was received,
    Run transaction MIGO -> Settings -> Default Values & see the check-on "Propose All Items" is there for your client also,  it is only effective for the user who adopt this MIGO settings.

Maybe you are looking for