BADI MRM_HEADER_CHECK - Disable Tab in MIRO

Hi all,
I've been asked to disable the G/L tab in MIRO if a PO is entered. on the PO Tab.
I've implemented the BADI MRM_HEADER_CHECK -  I can do a check and issue a warning message.
However if I issue a Error meesage then It goes into an infinite loop.
Is there and way I can stop processing on the message - to stop the transaction from completing the tab switch ?
Or any other way of achieving the desired result if anyone can think of anything?
Thanks in advance,
D.

Hi Guys,
Thanks for the quick response !
Sakthi Sri - I've already tried implementing the FM MRM_PROT_FILL
But it doesn't stop the user from switching to the G/L tab,  it adds in the warning message but processing still continues
and allows the user to carry on entering G/L Items.
My Code so far is:
  DATA: lit_errtab    TYPE TABLE OF mrm_errprot,
        lwa_errtab    TYPE mrm_errprot.
Declare the Contstants
  CONSTANTS: lc_Space    type CHAR01  VALUE '' ,
             lc_X        type CHAR01  VALUE 'X',
             c_ebeln(23) TYPE C       VALUE '(SAPLMR1M)RM08M-EBELN',
             c_hkont(25) TYPE C       VALUE '(SAPLMR1M)ACGL_ITEM-HKONT',
DATA: gt_errtab TYPE TABLE OF mrm_errprot,
gs_errtab TYPE mrm_errprot.
Field Symbols
  FIELD-SYMBOLS: <fs_ebeln> TYPE ANY,
                 <fs_hkont> TYPE ANY.
Local Variables Set-up
  DATA:  lv_ERROR TYPE CHAR01.
  ASSIGN (c_ebeln)  TO <fs_ebeln>.
  ASSIGN (c_hkont)  TO <fs_hkont>.
Clear the Error Flag
    lv_Error = lc_space.
Only do this check when the Item tabs are selected.
  case sy-ucomm.
    when 'ITEMS_PO'.
      if <fs_hkont> is assigned.
        if <fs_hkont> is not initial.
          lv_Error =  lc_X.
        endif.
      endif.
    when 'ITEMS_G/L'.
      if <fs_ebeln> is assigned.
        if <fs_ebeln> is not initial.
          lv_Error =  lc_X.
        endif.
      endif.
  endcase.
Error Detected raise an error message
  if lv_Error = lc_X.
CLEAR gs_errtab.
gs_errtab-msgty = 'E'.
gs_errtab-msgid = 'Z31'.
gs_errtab-msgno = '033'.
gs_errtab-source = 'Q'.
APPEND gs_errtab TO gt_errtab.
CALL FUNCTION 'MRM_PROT_FILL'
TABLES
t_errprot = gt_errtab.
  endif.
endmethod.

Similar Messages

  • Required help for badi for GL tab in MIRO transaction

    Hi,
    I am working in MIRO transaction.
    I am having a requirement as below:
    While creating invoices, In the gl tab when we enter gl account number system should populate Tax jurisdiction code by default.
    I am using BADI EXTENSION_US_TAXES method MM_ITEM_TAX_MODIFY but it populates the tax jurisdiction in PO reference tab not in GL tab.
    Please advice
    Regards,
    Suvarna Nandi

    Hi
    Have you tried with enhancement FYTX0002? See also Note 302998 - Collecting fields for user-exit. It's an idea.
    I hope this helps you
    Regards
    Eduardo

  • Tcode MIRO with BADI: MRM_HEADER_CHECK

    Hi,
    in MIRO i will use badi: MRM_HEADER_CHECK.
    i implementedt it and use in method: IF_EX_MRM_HEADER_CHECK~HEADERDATA_CHECK
    this code:
      DATA: GT_ERRPROT    TYPE TABLE OF MRM_ERRPROT,
            GS_ERRPROT    TYPE          MRM_ERRPROT.
      APPEND GS_ERRPROT TO GT_ERRPROT.
      IF NOT I_RBKPV-LIFNR IS INITIAL
         AND I_RBKPV-LANDL <> 'DE'
         AND I_RBKPV-LZBKZ IS INITIAL.
        CLEAR GS_ERRPROT.
        GS_ERRPROT-MSGTY = 'E'.
        GS_ERRPROT-MSGID = 'ZZ'.
        GS_ERRPROT-MSGNO = '010'.
        GS_ERRPROT-MSGV1 =
         'ERROR in LZB'.
        CALL FUNCTION 'MRM_PROT_FILL'
          TABLES
            T_ERRPROT = GT_ERRPROT.
      ENDIF.
    In MIRO i get the message wich i need, but the user is able to save (post) in MIRO.
    How can i avoid saving when i generate the above message?
    thanks.
    Regards, Dieter

    Hi,
    check this:
    * If there is any error do not allow saving, posting, ....
        DATA: gt_errtab    TYPE TABLE OF mrm_errprot,
              gs_errtab    TYPE mrm_errprot.
        CONSTANTS:     c_errprot(23)   TYPE c VALUE '(SAPLMRMF)TAB_ERRPROT[]'.
        FIELD-SYMBOLS: <fs_errprotj_dt> TYPE table.
        ASSIGN (c_errprot) TO <fs_errprotj_dt>.
        REFRESH gt_errtab[].
        gt_errtab[] = <fs_errprotj_dt>[].
        IF NOT gt_errtab[] IS INITIAL.
          READ TABLE gt_errtab INTO gs_errtab WITH KEY msgty = 'E'.
          IF sy-subrc = 0.
            DATA: c_okqx(17)   TYPE c VALUE '(SAPLMR1M)OK-CODE'.
            FIELD-SYMBOLS: <fs_okqx> TYPE ANY.
            ASSIGN (c_okqx) TO <fs_okqx>.
            CASE <fs_okqx>.
              WHEN 'COMP' OR 'BU'. "Saving as complete/Post
                READ TABLE gt_errtab INTO gs_errtab WITH KEY msgty = 'E'
                msgid = 'ZZ' msgno = '010'.
                IF sy-subrc = 0.
    * delete the ok-code.
                  CLEAR <fs_okqx>.
                  MESSAGE s0XX(zxx). "Invoice still has error messages
                ENDIF.
            ENDCASE.
          ENDIF.
        ENDIF.
    Something more: in your code you should clear the message if the condition is not met (that is, the user has done something in the transaction to correct the condition producing the message).
    DATA: GT_ERRPROT    TYPE TABLE OF MRM_ERRPROT,
            GS_ERRPROT    TYPE          MRM_ERRPROT.
      APPEND GS_ERRPROT TO GT_ERRPROT.
      IF NOT I_RBKPV-LIFNR IS INITIAL
         AND I_RBKPV-LANDL  'DE'
         AND I_RBKPV-LZBKZ IS INITIAL.
        CLEAR GS_ERRPROT.
        GS_ERRPROT-MSGTY = 'E'.
        GS_ERRPROT-MSGID = 'ZZ'.
        GS_ERRPROT-MSGNO = '010'.
        GS_ERRPROT-MSGV1 =
         'ERROR in LZB'.
        CALL FUNCTION 'MRM_PROT_FILL'
          TABLES
            T_ERRPROT = GT_ERRPROT.
    ELSE.
    * This is the code added
        FIELD-SYMBOLS: <fs_errprot> TYPE table.
        ASSIGN (c_errprot) TO <fs_errprot>.
        REFRESH gt_errtab[].
        gt_errtab[] = <fs_errprot>[].
        LOOP AT gt_errtab INTO gs_errtab
        WHERE msgty = 'E'
        AND msgid = 'ZXX'
        AND msgno = '010'.
          DELETE gt_errtab INDEX sy-tabix.
        ENDLOOP.
        <fs_errprot>[] = gt_errtab[].
      ENDIF.
    Best regards.
    Edited by: Pablo Casamayor on Sep 14, 2009 12:55 PM

  • MIRO badi MRM_HEADER_CHECK park/post control

    Hello friends,
    We have implemented MRM_HEADER_CHECK badi to check unplanned delivery cost, and used MRM_PROT_FILL fm to fill the errors.
    Everything going fine, but for this error message system should not allow to post document in MIRO, and it should only allow to part the document.
    Any expert ideas where and how do we control to not to allow posting the document, but only to allow to park if any failure in this badi?
    Thanks in advance.
    Manohar

    Check this thread in which Pablo Casamayor uses field symbol call stack technique (to retrieve values from main program memory) and use it to not allow saving in MIRO if there are still error messages.
    Another problem also may arise that even if user corrects the invoice document still custom message may still show in the message log, for that issue also the post by Pablo clarifies.
    [Pablo Casamayor's solution to MIRO messages problem with BADI: MRM_HEADER_CHECK |Tcode MIRO with BADI: MRM_HEADER_CHECK;

  • CUSTOMIXED TAB IN MIRO

    hi all,
    how to place a customized tab in MIRO tRANSACTION

    You can use some user exit or badi for the same.

  • How to disable tabs in titlebar for all users?

    I want to disable tabs in title bar for all users, because looks ugly http://i57.tinypic.com/33nkm77.png
    I type to C:\Program Files\Mozilla Firefox\defaults\pref\local-settings.js
    pref("browser.tabs.drawInTitlebar", false);
    It doesn't work, but any other options in this file works fine.
    Setting with about:config works fine, but only for currrent user.

    I think that preference refers to what happens when you have Firefox maximized and you do not display either the classic menu bar or the title of the page in that area: the tabs slide up to the top.
    I agree the double-high blue area is irritating. To modify that, I think you need to do one of these:
    * Change the Windows XP color theme (I always preferred Silver)
    * Create a custom style rule to modify the appearance of the tab bar (so the blue does not show through it)
    * Find a Firefox theme that fixes that area (e.g., [https://addons.mozilla.org/firefox/themes/])
    I haven't researched the second and third options in detail.

  • Capture Inv. Party under Details Tab of MIRO for auto line items

    I am unable to get the "Inv. Party" in FBL3N for automatically generated line items.  For example, the entries generated based on Tax Code is not capturing the information entered in Assignment field.  The date of transaction in yyyymmdd format is being captured when FBL3N is viewed.  The layout option doesn't provide "Inv. Party" to be selected though it is appearing in the Details Tab of MIRO.
    I am presently maintaining the details of Vendor items from FBL1N for all transactions, get the data for a particular GL Code, say VAT credit due, then using Excel VLOOKUP to match and get the Vendor code to submit to tax authorities.
    Is there any simpler way out?

    Hi,
    go through this...
    https://wiki.sdn.sap.com/wiki/display/Snippets/Displaycustomerfieldsinheaderoflogisticsinvoiceverification+transactions
    Thanks,
    Shailaja Ainala.

  • Permamently display menu bar in Mac OS/Disable tabs

    iMac i5, Mac OS 10.7.5, Thunderbird 24.x
    The Menu Bar in T-bird 24.x is automatically hidden even though the T-bird Help says that it CAN'T be done. I prefer to have the Menu Bar PERMANENTLY visible, but I can't find a setting in Preferences to do this. Where is the setting that will make the Menu Bar permanently visible.
    I DESPISE tabs in Thunderbird; where is the setting to DISABLE tabs? Again I can't find it in the Preferences.

    Use what you like romad, but personally I have come to like the Australis theme in Thunderbird and I downloaded Firefox alpha when I heard that after a year or fussing and fiddling they have finally moved forward.
    Seriously I have no idea what your talking about though. You carrying on like Thunderbird suddenly changed. Australis has been there since Version 17 tabs since Version 3
    As far as your minority operating system is concerned. I have never used it and have no desire to try and decipher what apple did to a perfectly good copy of BSD. If the product changes so radically on point releases that information a couple of years old is worthless, I am sorry. I am used to point releases being minor changes and whole numbers containing the big stuff. However as Thunderbird does not have a feature of the kind you describe, but apple users have been complaining of similar for years in a number of different applications I suggest you ask apple how to fix OSX so it does not do it.

  • Is there a way to disable tab font smoothing (maybe with userchrome.css)?

    hello everyone I've just switched from chrome to ff and I'm very satisfied. Just one problem, is there a way to disable tab font smoothing (maybe with userchrome.css)? I've changed the colour of tab font (with userchrome.css) to white to improve readability but with white text is too bold. thanks !!

    hey thanks for the quick reply. here's a screenshot
    http://www.mediafire.com/view/?c2a2l69ci5zbq#bt6qrwr6ku8m5n6
    i think we just have to add some antialiasing in the userchrome.css? but i don't know the code.
    here's my modified userchrome.css
    /* Inactive Tab */
    tab:not([selected="true"]) {
    color:white !important;}
    /* Tab while loading */
    tab[busy] {
    color: blue !important;}
    tab .tab-text {
    font-size: 12px !important;
    /* tab font */
    tab .tab-text {
    font-family:Verdana !important;
    i read somewhere else the problem is more evident with white text on dark background
    thanks

  • Disabling tab functionality in a field

    Dear all,
    How do you disable tab functionality in a field in sap b1 2005? I would just like to have a formatted search on the field.
    Regards,
    Monil

    Hi Monil
    Is this at row level? If so, then set it as visible but not active in the Form settings. If it is a header field, then consider that the TAB is to validate a field and changing standard SAP logic is not advisable. Some more information on the exact field type will help me guide you better.
    Kind regards
    Peter Juby

  • Exit or BADI when Tax Calculation in MIRO from Purchase order

    Hi Gurus,
    I Need a Exit or BADI when Tax Calculation in MIRO from Purchase order.
    The problem is the tax is automatically calculated from tax code in PO but I want it to be calculated
    from PO condition. Is there any exit available by which I can modify the value of tax when ticking the check box of tax calculation in MIRO.

    BADI has method COPY_DRSEG_SELKZ but since there only importing paramters and no exporting or changing parametrs you cannot change the values of rseg here.
    Try using proper Implicit enahncement by debugging .
    For implicit enhancement check
    Re: How do we search enhancement point/section
    Edited by: Gautam Totekar on May 29, 2009 5:56 PM

  • How to disable Tabs in the application

    Hi OAF Guys
    How to disable tabs in the application? if any one knows reply asap
    Thanks in advance

    Tabs are generated by the menu structure, if you want your page not to have tabs, have a responsibility with a menu which does not have any levels of submenus and just has your page as a function in the menu.
    Thanks
    Tapash

  • How do I disable tabs?

    I want to disable tabs. I use a Mac at home, so an application doesn't take the entire screen like on Windows, so tabs are a pointless distraction that constantly gets in the way. Opening a new window is much more convenient.
    The extension TabKiller doesn't work on Firefox 4, so is there another way to entirely disable tabs? As for the moment I'm using Safari since Firefox 4 is utterly useless to me.

    Regrettably, no it doesn't.
    If I encounter a link that "pops" i.e. starts with a new page, I'll always get it in an open tab. Back before tabs it would open a new window, but no longer. Firefox assumes I want a new tab, because everyone uses/loves tabs.
    In Safari all I have to do is set "Open pages in new tabs" to "Never" and I'll never see another tab. In Firefox it becomes infrequent, but I still get new tabs popping up. For example, it's happened 5 times since I've been searching the Mozilla websites.
    In Chrome, forget it. Tabs are integrated into the interface. Asking Google to disable them in Chrome is like asking them to pull their eyes out. I should know, I have tried. (But then Google doesn't listen to anyone. They poop rainbows, and don't dare suggest otherwise.)
    If I can't find an answer this way I'll have to find the fellow who made Tab Killer and convince him to write an update for version 4, or I'll have to downgrade back to version 3.6

  • Entering the text in note tab in MIRO transaction

    hai friends,
    can u please tell how to store a text in note tab in MIRO transaction usging function module.
    please help me.
    Regards,
    N.selvamuthukumar

    Hi
    I need to program the same. Can you please send the details of how you implemented it.

  • Can I disable TAB key for Flash?

    Hi All,
    Can i disable TAB key actions in flash? That is i dont want
    the focus to get transferred from one button to another on clicking
    TAB key. Im using my SWF in an MFC application. Even if the MFC
    developers trap the TAB key, it doesnt affect flash - the tab key
    works for flash. I will have to do something in flash.
    I tried _focusrect = false; but it doesnt satisfy me
    requirements.
    Regards
    Roshan

    Hi niki,
    That would do the thing. Thanks a lot.
    Regards
    Roshan

Maybe you are looking for