Application Development and Automation 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: 
Read only

Warning message in EXIT

kirankumark2
Participant
0 Likes
2,656

Hi,

I have a requirement to display an Warning message on Purchase order SAVE and tried all the possibilities. I am able to display an error message but not a Warning message. Can someone provide me the way OR an alternative approach to achieve the same. checked in Google also but not found suitable solution.

Hi,

I have a requirement to display an Warning message on Purchase order SAVE and tried all the possibilities. I am able to display an error message but not a Warning message. Can someone provide me the way OR an alternative approach to achieve the same. checked in Google also but not found suitable solution.

8 REPLIES 8
Read only

SimoneMilesi
Active Contributor
2,502

Hello,

I think you didn't look really well, since there are plenty of blog like this one with examples of message handling.
Yes, the blog shows an error message, but you just need to change the message type from 'E' to 'W'.

Read only

former_member688242
Participant
0 Likes
2,502

Please refer link link

There are different blog for the same please search on internet

Read only

0 Likes
2,502

Hi,

thanks for your reference. But tried all the Message type declaration combinations and failed to achieve the warning message display. For your information i am using EXIT EXIT_SAPMM06E_012.

Read only

kirankumark2
Participant
0 Likes
2,502

Hi Simone,

Thanks for suggesting but before posting i tried all the message type combinations and failed to get warning message. For ypur kind information i am using an EXIT EXIT_SAPMM06E_012.

Read only

SimoneMilesi
Active Contributor
0 Likes
2,502

Why are you relying on the exit instead of the BAdI?

I'm trying to understand in which scenario you need it.

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,502

Could you explain what you exactly tried and what happened for each solution?

For your information, a warning message must be sent during the PAI and must not be "swallowed" by function module called with "EXCEPTIONS ... error_message = x ..."

Read only

Sijin_Chandran
Active Contributor
0 Likes
2,502

Hello,

As suggested by many here I would suggest you to write your logic in BADI instead of EXIT and make use of macro MMPUR_MESSAGE_FORCED for populating the Messages.

This populates the Messages in the Standard Log of PO Transaction which you get once you press Check button.

Thanks,

Sijin

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,502

Don't use old customer exits, go with BAdI ME_PROCESS_PO_CUST and macros of mm_messages_mac such as mmpur_metafield (identify field related for the warning/error, look at type pool MMMFD) and mmpur_message_forced to generate the message.

" IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM 
    mmpur_metafield mmmfd_acctasscat.
    mmpur_metafield_add mmmfd_net_price.
    mmpur_message_forced 'W' 'ZMM' '123' <item>-knttp <item>-sobkz <t163k>-knttp <t163i>-knttx.   

There are already many threads/questions/wiki on those (use the links)

What did you already try?