How to issue warning message in BADI ME_PROCESS_PO_CUST

Hi Guys,
I have already checked the forum regarding this. There are lots of threads. Unfortunately none of them helped me. I must be missing some thing in my code.
I tried issuing warning message in BADI ME_PROCESS_PO_CUST and method PROCESS_ITEM.
First i tried with normal message statement
MESSAGE w001(00) WITH text-001 text-002.
Didn't worked.
Next tried calling standard macros
  DATA:mmmfd_cust_01 TYPE mmpur_metafield VALUE 90000000.
  call method cl_contextfield_mm=>set_current_field
                                  exporting im_field = mmmfd_cust_01.
  mmpur_metafield mmmfd_cust_01.
mmpur_message_config 'W' 'X' ' '.      "Tried all permutations here
mmpur_message_forced 'W' '00' '001' text-001 text-002 '' ''.
Still no solution
Tried with macro mmpur_message also
Can some one helpme out to solve this issue.
Thanks,
Vinod.

Hi all,
Thanks for the responce.
Not sure whether you have looked into BADI documentation or not. Please check below.
"Further notes
The above-mentioned macros are defined in the program MM_MESSAGES_MAC. Please include this program in your own application.
Never issue messages in BAdI ME_GUI_PO_CUST! This is the task of the business logic and must therefore be done via the BAdI ME_PROCESS_PO_CUST.
"Never use the ABAP statement MESSAGE in the BAdI ME_PROCESS_PO_CUST. Please use the macro mmpur_message_forced only. This macro only writes a message in the message collector.
If you wish to mark the business object as invalid in order to prevent posting, you must additionally use the INVALIDATE ( ) method of the relevant interface. In this connection, see also the code example in the PROCESS_ITEM method of the BAdI ME_PROCESS_PO_CUST.
I have tried almost all macros including mmpur_message_forced 'E' 'ME' '083' l_text ' '  ' '  ' '.
Not sure where i am missing:(
If i give error using MESSAGE statement it is working perfectly i.e. give error and save the PO. Only wanted to know if there are any implications.
Thanks,
Vinod

Similar Messages

  • How to display Warning messages in BADI ME_PROCESS_REQ_CUST?

    Hi,
    I have implemented BADI ME_PROCESS_REQ_CUST and coded necessary logic according to my requirement in Method  PROCESS_ITEM.
    On a certain condition , I need to display a Warning message.
    I have written the code as follows:--
    message w001(00) with 'XYZ'.
    It didnt work.
    Then, I included the message in message class ZPBS, and coded as follows.
    message w012(zpbs).
    But, still it didnt work..
    Can u guys please guide me what I need to do?
    Thanks,
    Shivaa....

    Hello Shiva
    Have a look at method PO_READ of class CL_PO_HEADER_HANDLE_MM.
    METHOD po_read.
      INCLUDE mm_messages_mac.
      DATA: l_po_number TYPE ekko-ebeln.
      IF im_po_number NE space.
        l_po_number = im_po_number.
      ELSE.
        l_po_number = po_number.
      ENDIF.
    * authority check on transaction code disabled
    * If called via CALL TRANSACTION, this check is already done by basis
    * (see note 358122)
    * restriction of T-code authority check to Enjoy only
      IF for_bapi IS INITIAL.
    * tcode authorization
        IF NOT im_tcode IS INITIAL.
          CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
            EXPORTING
              tcode  = im_tcode
            EXCEPTIONS
              ok     = 0
              not_ok = 1
              OTHERS = 2.
          IF sy-subrc NE 0.
            MESSAGE e172(00) WITH im_tcode INTO gl_dummy.
            mmpur_message_forced 'E' '00' '172' im_tcode '' '' ''.
            ex_result = mmpur_no.
            CALL METHOD set_state( im_state = c_available ).
            EXIT.
          ENDIF.
        ENDIF.
      ENDIF.
    Add the include MM_MESSAGE_MAC to you method and set the message using macro MMPUR_MESSAGE_FORCED.
    I am not sure whether the warning will indeed be displayed while changing an item but it should be displayed when checking the purchase requisition and presumably when saving it.
    Regards
       Uwe

  • How to show warning message in am

    How to show warning message in am but not Stop , it still can go ahead.
    Thank you very much.

    jamras ,
    If i got you correct you wanna show user a list fo warnings after that have occured in some method in AM, and show them to user collectively, and the processing of the page should not stop in the above. What you need to do for it, is instead of throwing warning message in AM, collect all warnings in a arraylist or vector. when you navigate back to CO, iterate through this arraylist/vector and for each use pagecontext.putDialogmessage(oaexception).In this way you will be able to show all warning messages on page and your processing will not stop!
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to add warning message while using 'print' function in Adobe LiveCycle Designer

    I am trying to make pdf document for my company which requires adding a warning message while anyone use 'print' function from the page...
    Does anyone know how to add warning message on LiveCycle Designer
    Also my supervisor mentioned something using 'nag' if that rings any bell

    No you shoudl never go into the XML source unless uinstricted to do so.
    You can open the script editor (under the window menu). It will appear above the drawing area but below the toolbars. You can resize it if there is not enough room. When you click on an object in the form you can choose an event to script against in the Show dropdown. In your case you will want to choose the prePrint event. A line will show up that indicates the object that is associated with the script as well as the event and other information. Add your script below this line. Once that is done you are finished and your form is ready for testing.
    Paul

  • Don't know how to repair "Warning" message

    Hi all,
    I opened a file using Adobe Acrobat 8.2, which came on a new Dell laptop I purchased just before the holidays. Just as I started to move the side cursor to advance the page a warning box appeared that said:
    Warning: A serious error has been detected and Adobe Acrobat 8 Standard cannot continue. Please reinstall the application and try again." When I click OK it closes the whole pdf file.
    I can't reinstall anything as I have no disk - the laptop didn't come with anything - all programs were preloaded. What do I do and how can I reinstall Adobe Acrobat?
    I've run all my cleaners, debuggers, defraggers, malware, etc and everything is clear. I really need help as I can't open school documents without this! Help! I truly appreciate it!

    Thank you, Anubha.To tell you the truth, I wasn't thrilled with the prospect of paying around $500 to get the newest version. Something interesting happened this afternoon, though, when I opened my laptop. As soon as it connected to the internet, a request for Adobe update popped up, and I watched in great surprise as it automatically "removed" files and then "re-installed" files.
    Bottom line, everything is working again. I don't know whether there is some feature that detects when a repair is needed, but a repair it did!Thank you again and thank you to the Adobe gods!Art
          From: Anubha Goel <[email protected]>
    To: Art627 <[email protected]>
    Sent: Wednesday, March 25, 2015 10:13 PM
    Subject: You have been mentioned by Anubha Goel in Re: Don't know how to repair "Warning" message in Adobe Community
    |
    You have been mentioned
    by Anubha Goel in Re: Don't know how to repair "Warning" message in Adobe Community - View Anubha Goel's reference to you  Hi Art627, I am sorry but Acrobat 8 is a very old version and Adobe no more provides support for this product.You might find download link for Acrobat 8 pro on Adobe's Other downloads link, but not for Acrobat 8 standard.Please let me know what is your OS version.I would suggest you to install and use the latest version of Acrobat i.e. 11.0.10 which is compatible with your OS as well as offers enhanced features and functions. Choose to download a 30-day free Adobe Acrobat trial version from here:Download Adobe Acrobat free trial | Acrobat XI Professional Now, see how it goes. Regards,Anubha 
    Participate in the conversation by replying to this email
    To stop receiving these messages whenever you are mentioned, go to your preferences and disable notifications for direct social actions. |

  • Issue warning message when duplicate material are enter on a purchase order

    Hi All,
    Is there any possibility  to give a message in   me21n if we enter a material which in already maintained as one line item  to create PO. To issue messages in sales order there is an exit. I tried with the badi ME_PROCESS_PO_CUST. I was struck here. Please suggest me good idea how to do this.Thanks to all.
    In Sales order i resolved in this way.
    LOOP AT xvbap
       WHERE matnr EQ vbap-matnr
             AND posnr NE vbap-posnr
             AND kwmeng NE 0.
       MESSAGE  'Material is already on the order' type 'I'.
    ENDLOOP.
    ENDFORM.
    Regars,
    Madhu.

    closed.

  • How to handle warning message for the fields in tab merging , PERSONAS 2.0

    Hi all,
    Please advice me on the below issue.
    In a transaction VA32 , I have merged the fields from one tab to another tab using tab caching.
    when i try to change the value of  a merged fields , it throws the warnings message. So it is continuously looping from one tab to another tab.
    So i tried to use the additional editor concepts in tab caching as below.
    Looping is stopped and throws warning message in the same tab.
    All the changes are saved successfully only when the enter button is clicked once in the main screen, else the changes are not saved and my previous value remains.
    Anybody have an idea on how we can use Additional actions in Tab caching concepts.
    Thank you,
    Arun

    Hi Kranthi,
    When i try to save the fields which i merged from different tab is not saving.
    Please find the below details.
    Green highlighted fields are custom fields which is merged from different screen like header or item overview screen. This is handled in script button.
    Red highlighted fields are merged from different tab like shipping or sales using tab caching concept.
    While changing the value of the fields which is merged from different tab , and press ENTER then it throws the Warning message if occurs.
    After warning message, if i try to save using the script button for copying all the custom fields which is merged from different screen , pasted it to their respective screens and also saved.
    Its working fine.
    When i try to save it before pressing ENTER button then the respective changes had made in the merged fields from different tab are not reflected.
    How we can handle this issue?
    Thank you,
    Arun

  • How to Setup Error Message in BADI Implementation in MIGO Screen?

    Hi anybody,
         I want to Setup error Message in MB_MIGO_BADI - Post Document Method.
    How do I setup SAP Standard Error Message?.
    anybody please tell me this is urgent......
    I will give reward for this answer.
    Thanks
    Regards,
    S.Muthu.

    Hi,
    Inside the user exits or Badi's the warning messages will not work. We are having two options for displaying the messages.
    1. Populate the warning message in the std message log.
    (Or)
    2. Use the Function Modules POPUP_TO_CONFIRM & POPUP_TO_INFORM and display the message.
    Regards
    Kiran Sure

  • How to Capture warning message in SHDB recording

    Hi SDN,
    I am getting problem in Recording FB03 through SHDB.
    when i am clicking on save as complete button i am getting a warning message as duplicate entry.
    when click on enter button the actuval object got saved bu from recording it is not captured.
    how we can continue with this

    Hi
    Sorry
    i know that
    i don't want to display messages.
    when i am recording a Transaction code.
    i am getting a warning message as check for duplicates.
    when click on enter button that warning message is got disappiared but that enter click is not recorded in FB03 recording.
    when i process that recording it is stopping that transaction code at that warning message in BDC.
    please suggest

  • How to show warning message in two Lines.

    Hi,
    Can some one please let me know how to show a warning message in two lines. I have created a Message in EBS in two lines but it still displays on the page in a single line.

    use bundled exception.
    ArryList peerExceptions = new ArrayList();
    peerExceptions.add(new OAException(....));
    peerExceptions.add(new OAException(....));
    OAException.raiseBundledOAException(exceptions);
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Force Error message in BADI ME_PROCESS_PO_CUST

    when PO is created, I have to collect the  error message similar to  Standard SAP does for certain condition (based on the quantity entered in the Service line items )  ,
    Please let me know how to do this within the BADI. I’m using post method of  ME_PROCESS_PO_CUST

    You can use the macro MMPUR_MESSAGE_FORCED in method CHECK (since your requirement is at the very end if I understand you correctly). To see some examples, take a look at the method PROCESS_ITEM in the sample code of the BAdI.
    Don't forget to:  
    INCLUDE mm_messages_mac. "useful macros for message handling

  • How to convert Warning message Appl.Area V1 mess.No 428 to Error Message

    Hi,
    Can any one please tell me how to make a warning message to error message in Scheduling Agreement, message no is 428 and application area is V1, this message comes when the user exceeds the target Qty in Schedule line.

    If a message is a custom message, then by changing the message type from W
    (warning) to E(Error) we can convert the message type into error message. This is done with the help of development guy. A change in the code is needed.
    If it is a standard message, then it depends on w hether we have teh access to change the message type. If access is there, then it is possible to change the message from Warning to Error. i.e. If we are capturing std SAP message in our code and displaying then we can change it, else if SAP message is displayed directly, we cant change it.
    So, to change it, capture the error message from SAP in some Zcode and then convert that message into a custom message of message type E.
    The whole change needs ABAP support.
    Reward if it helps.

  • How to display warning message in PL/SQL?

    Hi,
    I would like to know how to display a warning message in PL/SQL?
    Thanks and Regards,
    SC

    PL/SQL is not an interactive programming language, so there is generally no place to print any sort of message, no place to prompt the user for input, etc.
    A SQL*Plus script can use the SQL*Plus client as a very basic way of interacting with users using the PROMPT command to accept input and using DBMS_OUTPUT to print messages to the console (assuming the script does a SET SERVEROUTPUT ON to enable printing the results). Other applications may have similar sorts of scripting possibilities, generally based on a subset of the commands SQL*Plus supports.
    Justin

  • How to trap warning messages generated from the background processing?

    Hi all,
    Following is my requirement, i want to know whether it can be done and how?
    The credit management (CM) warning messages generated as a result of the CM background processes, where do the messages go? Can you trap them and include them in an interface control report?
    Thanks

    Hi
    If it's created a job for that process, you can try to read the log: here you should find all triggered messages, so the warning ones too.
    U can try to use fm like BP_JOBLOG_READ or BP_JOBLOG_SHOW in order to get the log.
    Max

  • How to convert warning message MM071 into error message

    Hello All,
    I have flag deletion indicator for 1 material thru tcode MM06
    Now i have to convert that error message into warning message..
    For the same i went to path--spro - Mat mgmt-purchasing-Environmentdata-define attributes of System messages,but it didnt solved my purpose..
    How to solve it...Helpful answers will be highly appreciated
    Regards
    NanoSAP

    dear sir.
    pl check message number ME-051 this message for Material & flagged for deletion.
    regards
    jrp

Maybe you are looking for