Skip to Content

Message with Type E coming like that of Type A

Hello all ,

I have came across a really strange situation.

I have done my coding in BADI ME_HOLD_PO as follows :

if im_ekko-bedat is not initial.

if im_ekko-bsart ne 'ZSTM'.

if im_ekko-bedat < sy-datlo.

message 'Purchase order date is in the past' type 'E'.

endif.

endif.

endif.

Now the problem is that the above message is not coming as an error message (at status bar) instead its coming like a message with that of type 'A' i.e the message is being displayed as a pop up and the screen is reseted with the press of enter.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 04, 2012 at 10:36 AM

    Hello,

    You've to understand in which programming event this BAdI is called to understand this behavior. You can also read the SAP documentation on the [behavior of messages|http://help.sap.com/abapdocu_702/en/abenabap_messages_types.htm].

    BR,

    Suhas

    PS: Check out the demo program DEMO_MESSAGES to have a feel of how messages react during different programming events.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 04, 2012 at 10:56 AM

    This badi is not suitable for raising messages. You are just validating the PO header values, please check for other customer exits and available badis for this check. As you have not mentioned the transaction used its hard for us to give you a solution. So search for available exits and Badi's in SCN.

    Kesav

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 22, 2013 at 09:17 PM

    I had the same issue. Implement your check in ME_PROCESS_PO_CUST~CHECK and issue message as follows.

    CH_FAILED = MMPUR_YES.

    MMPUR_MESSAGE_FORCED <your message data>.

    -----------------------------------------

    Then maintain an implicit enhancement spot in class CL_PO_HEADER_HANDLE_MM method GET_TRANSACTION_STATE and set the flag EX_PARKING_ALLOWED_FINAL = MMPUR_NO.

    I exported a flag to memory in the CHECK method and imported it into GET_TRANSACTION_STATE to determine when to not allow parking.

    This will prevent the user from being prompted with an option to HOLD/PARK the PO.

    Add comment
    10|10000 characters needed characters exceeded