Error message in Me21n tcode

Hi,
   we have developed a  user exit to get error message when po value is greater than some amount in me21n tcode. am getting error message when entering all items. But when  press SAVE button  i want that error message also. But am not getting that error message in that time.How i can write a code for that.

Hi Geetha,
For that requirement you have to code in  EXIT_SAPMM06E_012 or  EXIT_SAPMM06E_013 MM06E005.
EXIT_SAPMM06E_012 : it will get triggered whenever you press HOLD,CHECK or SAVE button
EXIT_SAPMM06E_013 : it will get triggered just before saving the PO.
Thanks & Regards,
Faheem.

Similar Messages

  • How to capture error message log for Tcode MIR7

    Hi ,
    I have a problem to capture the error message outside the tcode which are created by MIR7/MIR0 .
    Are they stored in any database table?
    Is there any other way to access them?
    Anybody knows how to solve this that will be very helpful.
    Thanks,
    Anu

    call transaction 'XK01' using i_bdcdata
                     mode 'N'
                     update 'S'
                     messages into i_bdcmsgcoll.
    if sy-subrc <> 0.
        perform get_error.
            write:/ itab , v_text.
    endif.
    *Form
    form get_error.
    loop at i_bdcmsgcoll.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
       ID              = i_bdcmsgcoll-MSGID
       LANG            = sy-langu
       NO              = i_bdcmsgcoll-MSGNr
       V1              = i_bdcmsgcoll-MSGV1
      V2              = SY-MSGV2
      V3              = SY-MSGV3
      V4              = SY-MSGV4
    IMPORTING
       MSG             = v_text
    EXCEPTIONS
      NOT_FOUND       = 1
      OTHERS          = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endloop.
    endform.                    " get_error
    Edited by: Bala Krishna on Sep 9, 2008 7:50 PM

  • Error message in ME21n / me22n (on save)

    Hi Gurus
               I need to raise a error message in ME21n for which I am using ZXM06U44 and EXIT_SAPMM06E_013
    I followed this link to help me out... https://forums.sdn.sap.com/click.jspa?searchID=20007769&messageID=6723170
    I am getting a information message even though I gave a message of type E. I tired two options:
    1.
    *    mmpur_message 'E' 'ZV' '013' lv_lifnr lv_bukrs text-t00 text-t01 .
    2.
    MESSAGE e013(zv).
    none of these was able to give a error message..

    Use BAdi:ME_PROCESS_PO_CUST
    Method:PROCESS_ITEM/PROCESS_HEADER"As per your Requirement.
    DATA : re_data TYPE mepoitem.
      CALL METHOD im_item->get_data
        RECEIVING
          re_data = re_data.
    "Check for account assignment cat only for "A" and "L".
      IF re_data-knttp = 'L' OR re_data-knttp = 'A'.
        GET PARAMETER ID 'KNT' FIELD re_data-knttp.
        IF sy-subrc NE 0.
          MESSAGE 'You are not aurthorized to use Account Assignment Category (Logit)L!!' TYPE 'E'.
        ENDIF.
      ENDIF.
    I got Error Message in Incomplete log.

  • Raise an Error message in ME21N

    Dear All,
    I am using user exit (SRVDET: EXIT_SAPLMLSP_040) to raise an Error message, it will terminate ME21N by the Error message. Did anyone know how to make it return to ME21N after an Error message...
    I try to set screen to 500, 210...etc. but it seems make the program hung after leave screen. Any idea? Thanks a lot!
    BR,
    Well

    Hi
    Try to use the BADI ME_PROCESS_PO_CUST
    and raise the error message
    see the sample code
    BAdI Name: ZCHECK_PO_LINE_ITEM (Implementation name) PO Account assignment
    Definition Name: ME_PROCESS_PO_CUST
    Interface Name : IF_EX_ME_PROCESS_PO_CUST
    Implementing Class: ZCL_IM_BADIN_ACCOUNT_ASSGN
    Method :            PROCESS_HEADER
    METHOD if_ex_me_process_po_cust~process_header .
      DATA : re_data TYPE mepoheader.
    *get the item data
      CALL METHOD im_header->get_data
        RECEIVING
          re_data = re_data.
      re_header = re_data.
      IF ( re_data-bsart NE 'ZOC' AND re_data-bsart NE 'ZPC' ).
        IF ( re_data-bsart <> 'ZIC' AND re_data-bsart <> 'UB' ).
          IF re_data-bukrs NE '1001'.
            MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'Use only Sipchem Company'
                                            'Code for External Procurement'.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDMETHOD.
    Method :            PROCESS_ITEM
    METHOD if_ex_me_process_po_cust~process_item .
      DATA: v_menge TYPE bamng,   " PR Quantity
            v_statu.              " PR Status
      DATA : re_data TYPE  mepoitem,
           re_data1 TYPE mepoaccounting,
    re_accountings TYPE purchase_order_accountings ,
    header TYPE purchase_order_accounting.
    *get the item data
      CALL METHOD im_item->get_data
        RECEIVING
          re_data = re_data.
      IF ( re_header-bsart NE 'ZOC' AND re_header-bsart NE 'ZPC' ).
        IF re_header-bsart EQ 'ZRL'.
          IF re_data-konnr EQ space.
        MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant create a Release order'
                                              'without a reference to Outline Agreeement'.
          ENDIF.
        ENDIF.
        IF ( re_data-banfn EQ space AND re_data-anfnr EQ space ).
          MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You can create a Purchase order'
                                                         'only with reference to a PR or RFQ'.
        ENDIF.
        IF re_data-knttp NE 'K' AND re_data-pstyp NE '9' .
          IF syst-cprog EQ 'RM_MEPO_GUI'.
            IF re_data-uebto IS NOT INITIAL OR
               re_data-uebtk IS NOT INITIAL OR
               re_data-untto IS NOT INITIAL.
          MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant change delivery settings'.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDMETHOD.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to display long error message in ME21N

    Hi,
    How to display a long error text (in multiple lines) in ME21N / ME22N message popup we get while saving or checking the PO. My error message length is 100 chars. It is displaying only 40 chars in a single line. My requirement is to display that in multiple lines of message popup. Please let me know asap.
    Thnks in Advance.

    Hi,
    Messages have long texts.... Uncheck the self-explanatory box, change your long message to a short one, place your long message in the long text of your message. SAP should handle the rest.
    Reward if helpfull...
    Cheers,
    Ameen.

  • Error message while assigning tcode

    Hi,
         In se93 i am trying to assign a tcode. After assigning the program,i am trying to save the request.
    Dev. class in non-original system only modifiable
                with Organizer Tools
    The above error message is coming.How to rectify that.
    Regards,
    Bathri.
    Edited by: Bathrinath Sankaranarayanan on Apr 28, 2009 9:25 AM

    HI BAthrinath,
    IS u rprogram or tcode assigned dev class $tmp.
    Please check once.
    Thanks

  • Display Error Message in ME21N

    Hi,
    As per my requirement, I need to display an error message while creating a PO based on certain conditions. I tried the Exit: EXIT_SAPMM06E_012 using which i can stop the creation of PO but it gives a pop up box saying HOLD or EDIT. Inside edit i can find my custom error message. The requirement is to print this error message at the task bar and not to allow the HOLD option to come. The creation of the PO should stop immediately after displaying an error msg at the task bar and before the Hold option.
    Please suggest which exit i need to use...

    Hi,
    You want to restrict the standard msg and instead of that u want to show your message,  i feel you can't erase the stnd message.
    However, try to use  where-used- list for that message using se93 mess no.
    Best thing, is to find the implicit enhancement and insert the message before your HOLD  mesages get populated.
    Try this keeping break point at ' MM06EFDCM' debug to find the excat place.
    Hope this will help you as i have done same for the similar type of requirment.

  • Error message in ME21N and ME22N

    Dear Friends,
    I am facing one problem... my requirement is at the time of saving purchase order i need to check some thing and if that check fails i need to display the error message and needs to stop the creation of purchase order. That error message at the status bar also ok and pop up also ok. But when i try to display that error message in one exit 'EXIT_SAPMM06E_012' then the eror message is not coming properly.. i mean it is displaying one box under that one red symbol and in the message comming my message class name. I could not able to display the proper error message in proper way.
    I have tried one BADI also post save method that is displaying error message properly but immediately after that i am getting one more pop up saying system error with POST_METHOD some thing like that. I haVe checked in debugging that second error message is displaying from the standard program (message class : ME and number 816) but i dont want that second pop up. How to skip that and how to provide proper error message.
    Any help will be highly appreciated.
    Thanks a lot in advance,

    Hi,
    here is the sample of the code we have used in our system.
    restrict logic based on Document Type and Company Code
    IF i_ekko-bsart EQ c_ub AND i_ekko-bukrs EQ 'XXXX'.
    loop at Line Items of PO
      LOOP AT tekpo WHERE loekz EQ space.
      if Receiving Plant is YYYY and Storage Location is NULL
        IF tekpo-werks = 'YYYY' AND
           tekpo-lgort = space.
        issue error message
          MESSAGE ID 'ZM' TYPE 'E' NUMBER '042' WITH
              tekpo-ebelp                               "line item
              tekpo-werks.                              "receiving plant
        ENDIF.          "receiving plant/storage location
      ENDLOOP.
    ENDIF.          "document type
    Hope this helps.
    -Ramesh

  • ERROR MESSAGE IN PPOME TCODE AFTER UPGRADE TO ECC 6.0

    Hi Experts,
    I have a question.
    Recently our system went for upgrade and during testing phase we have found one issue.
    Error message is appearing in PPOME transactio code after upgrade to ECC 6.0
    The screen is getting defaulted to Budget section and unable to find the subtype as there are no subtypes available there and showing error message as "Fill in all required fields".
    Please let me know your solution on this.
    Regards,
    Sekhar.

    Hi,
    - you can deactivate the budget tab in the IMG-activity 'Hide/Show Tab Page'
    (SIMG_CFMENUOHP1HFW20 alternatively use SM30 on view 'T77OCTABUS')
    1. Create new entries for the following KEY:
    a) Scenario OME0
    b) Object type 'P', 'O', 'S'
    c) Tab Page 'PBC_ORIG'
    2. for each of this entries, set the 'Exclude Tab Page'-Flag.
    - in case you do not want to deactivate the Budget tab:
    The error occurs due to missing entries for subtypes in table T778U
    for infotype 1516.
    Please maintain the according subtyes you want to use if you create a
    budget.
    Regards,
    Ana

  • Is it possible to add error message in me21n  ?

    i post this question before  , but didn't
    get any answer .
    i add subscreen to me21n by (MM06E005).
    now i want to add message to inforce the user to fill
    the field in the tab .
    i tried to do so in the exit but its just lock the
    customer data tab .
    i tried exit EXIT_SAPMM06E_012  .
    the problem's are :
    1) is possible  ?
    2) if yes than where ?  (EXIT_SAPMM06E_012 ? )
    3) if yes how can i solve the problem that in the edit
    ( in the save process ) the user don't get the customer data tab of my ( go back to the last tab he was ) ?

    Hi,
    Yes..The macro is available in the top include of the user exit..
    You can use it as I mentioned above..
    I took the example from a standard program..The l_illegal_char is a field..
    Try this example..
    mmpur_message 'E' '00' '208' 'Custom field not populated' '' '' ''.
    Thanks,
    Naren

  • To remove error from error message screen in ME21N

    Hi all,
    I have a strange problem may be not to you guys,
    well i am showing an error message in ME21N on certain condition in EXIT 'EXIT_SAPMM06E_012' this is working fine i am using simple stmt Message e(MSGno) text-01, but when i correct the problematic part and again want to save my data it is aloowing me to save data but my error message(In red) still remains there if i see in EDIT ( of faulty messages pop-up window). Can any body know if we have to remove error message manually in case our program satify the condition.
    if yes what portion i m missing to delete the error message.
    any reply will be highy appreciated n offcourse points for sure
    thanks a lot.
    regards
    Mandy

    Well we can remove message from message text tray using pre-defined macros to erase message.its like
    IF SY-SUBRC NE 0.
      IF NOT tekpo-id IS INITIAL.
       "This is to remove error message later on
       "if problem corrected.  
        mmpur_business_obj_id tekpo-id.
      ENDIF.
       mmpur_metafield mmmfd_item_userexit.
    mmpur_message 'E' 'ZMM02' '050'
                  'Intraplant STO :' '' '' ''.
    else.
      "To erase message
       mmpur_metafield mmmfd_item_userexit    .
       mmpur_remove_messages_by_id tekpo-id.
    ENDIF.
    its working for one line item, if more then one line item you need to verify it.
    Mandy

  • Error message when PR without SOS is transferred to SRM

    Hello ,
    We are on SRM 7.0 SP07 , ECC 6.0
    We are facing error when PR without SOS is transferred from ECC to SRM .
    error messages seen in tcode -> /sappo/ppo2  for a particular PR which are not getting transferred are  S:/SAPSRM/CH_SOA_MSG:055 , S:/SAPSRM/CH_SOA_MSG:061 .
    Also, we noticed free text PR are getting transferred from ECC to SRM but for PR containing material are not getting transferred and getting above error message . As per SRM 7.0 we have implemented sourcing_cust badi. also data is transferred through standard XML message ( PRERPsourcingRequest , PRERPSourcingConfirmation )
    Please let me know what could be the issue.
    Regards,
    Ashish

    hello
    when i saw the same tcode /sappo/ppo2 on SRM side . i can see the error "UOM doesn't exist in XML file".  i created the PR with UOM "UNT" which is existing in both ECC and SRM , checked in CUNI tcode.
    but the data for the UOM which is passed in xml file for the message PRERPSourcingRequestout from ECC is "PA".
    so is there some conversion happening for UNT to PA becuase PA is not maintained as UOM in either ECC or SRM. it is mentioned in ISO code.
    Regards
    Ashish

  • To remove error from error message screen stnd SAP in case condition met

    Hi all,
    I have a strange problem may be not to you guys,
    well i am showing an error message in ME21N on certain condition in EXIT 'EXIT_SAPMM06E_012' this is working fine i am using simple stmt Message e(MSGno) text-01, but when i correct the problematic part and again want to save my data it is aloowing me to save data but my error message(In red) still remains there if i see in EDIT ( of faulty messages pop-up window). Can any body know if we have to remove error message manually in case our program satify the condition.
    if yes what portion i m missing to delete the error message.
    any reply will be highy appreciated <REMOVED BY MODERATOR>
    Mandy
    Edited by: Alvaro Tejada Galindo on Feb 7, 2008 10:51 AM

    Well we can remove message from message text tray using pre-defined macros to erase message.its like
    IF SY-SUBRC NE 0.
    IF NOT tekpo-id IS INITIAL.
    "This is to remove error message later on
    "if problem corrected.
    mmpur_business_obj_id tekpo-id.
    ENDIF.
    mmpur_metafield mmmfd_item_userexit.
    mmpur_message 'E' 'ZMM02' '050'
    'Intraplant STO :' '' '' ''.
    else.
    "To erase message
    mmpur_metafield mmmfd_item_userexit .
    mmpur_remove_messages_by_id tekpo-id.
    ENDIF.
    its working for one line item, if more then one line item you need to verify it.
    ENJOY SAP

  • How to find code responsible  Error Message generated in MIRO transaction

    Hi Gurus,
                    I have to find the code responsible for generating ERROR message in Miro tcode through DEBUGGING. Let me tell you the case...................
    In MIRO,
    We input
    In Basic data tab,
    Invoice Date,
    Posting Date,
    Reference,
    PO no. &
    Tax code as V5 ( VAT @ 8% )  in item data  & then
    In Details tab,
    We enter Business Area    & then
    In Payment Tab
    Baseline date        & then
    In Basic data tab
    We check the check box for Calculate tax &
    entered Amount     & then click entered .
    It displays GREEN button.
    When we click Simulate button & click post then it shows 1 message that " Invoice document still contains messages .".
    And then if we click Messages Button it shows " MSG No. & text -  Enter Bussiness area ."
    So the problem is though we input Business Area , still it shows message Enter Business area.
    So plz tell me how to find that code responsible for error message.

    Ashish- It is because, the error message is called using function module / BAPI. But Ideally when a developer codes to populate the structure of type BAPIRET2, he.she should also follow the following rule, to make the message traceable:
    "Populate BAPI structure for error message
    "Following code will not get called, but is for documentation for traceability.
    if 1 = 2.
      message e004.
    endif.
    That is why i said in my comment, if it is "coded properly" then we will be able trace
    Bottom line: you will not be able to find the program line using this approach.
    But now since you now the error message and number, you can go to the underlying program of MIRO (SAPLMR1M and SAPLFDCB)..click on the find button on the application toolbar, enter the message# and find..PLEASE SELECT THE RADIO BUTTON "In the main program".
    Hope this helps.
    Sajan Joseph.

  • ME_PROCESS_PO_CUST allows save in ME21n despite error message triggered

    Hello MM Experts,
    We have a business requirement to prohibit the use of account assignment "A" (assets) on 2 particular document types that are used by departmental end users that should NOT be allowed to buy assets.  The purchase of assets is retricted to our centralized purchasing buyers who use a different document type. 
    We recently upgraded to ECC 6.0 from 4.6c, so we want to try BADi ME_PROCESS_PO_CUST instead of a user exit.  We applied the BADi to ME21n and the developer referenced methods 'check' and 'save', as well as 'post' and 'close'. 
    Our new error message is successfully triggered when a check is done in ME21n (error says "Account Assignment "A" is only valid for PO's and CSO's).  But, depending on the sequence of entry steps for required fields, when I use the save icon or do another check, the box "SAVE" or "EDIT" appears.  You can then save the order and by pass the error message. 
    Other times, depending on a different sequence of entries in the ME21n screen, for the required fields, the correct box "HOLD" or "EDIT" appears and you cannot save the order with the incorrect account assignment A/asset (you can only correct it or hold it as a faulty order and correct later).
    Thanks for any advice,
    Suzanne

    Dear Suzanna ,
    In that case, you need to track all of the "action" or "button" in ME21N, you need to use "sy-ucomm" in the badi code to track all the check. like when you display a PO in ME23N than you switch to change mode, then the sy-ucomm = METOGG, and so on, tell the abaper to use sy-ucomm,there'll know about it.

Maybe you are looking for

  • For Malcolm Rayfield, or anyone who knows about VGA/DVI/ADC ports

    I gave up on my Apple Monitor and bought a new 19" LCD flatscreen, but I'm getting a lot of ghosting from my windows and text which stretches the length of the screen in both directions. The monitor came with both a DVI port and a VGA port, whereas m

  • CLI Mode won't work

    I use JBuilder 8 to develop Java projects and everything's fine. however when I try to compile / run a java file in DOS CLI mode, error pop-up: C:\>java Error opening registry key 'Software\JavaSoft\Java Runtime Environment\1.4' Error: could not find

  • Transmit iPad to apple tv

    Can I transmit my iPad 2 display to apple tv?

  • Purchase Order text adoption

    Hi, we have an ongoing problem that I'm hoping someone else has come across.  Through our material masters our engineers are maintaining some specific item text that is configured as "User can adopt text" into the purchase order.  However if a change

  • PRC: Interface Expense Reports to Payables

    Hi All, In R12, If we enter Expenditure batches using Expense Report classification in Projects, can we interface these Expense Reports to Payables? Wat is the signifance of "Expense Report Cost Account", function in Projects AutoAccounting? There is