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.
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.
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
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 a comment