Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Error message as Pop up in ME21N Transaction

0 Kudos

Hi All,

I need to display error message as a pop up while creating or changing PO ( for eg. vendor field validation) in ME21N Screen. I am using BADI.  I was able to get the error message displayed successfully. But when I want to display in Pop up, it is not coming as error rather it is only displaying message. I tried the addition display like I or A, but only E and W type messages are working. I also tried Pop up FM's like POP_UP_DISPLAY_MESSAGE, POPUP_DISPLAY_TEXT but it cannot be displayed as error message.

But We can change the settings to display it as pop up but it will affect all transactions. Any helps????

2 REPLIES 2

raymond_giuseppi
Active Contributor

Did you try to put the error message with the now classic macro AND then execute a pop-up FM ?


im_item->invalidate( ).

mmpur_metafield mmmfd_xxx.
mmpur_message_forced 'E' 'ZMSG' '001' value1 space space space.

CALL FUNCTION 'AQ_INT_SHOW_MESSAGE_AS_POPUP'
         EXPORTING
           message_class  = 'ZMSG'
           message_number = '001'
           message_type   = 'E'...

But you should add some code to prevent trigger of the pop-up outside of actual interactive transaction (not in BAPI or Background)

Regards,

Raymond

0 Kudos

I don't know about macros. Can you explain Raymond ??