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: 

How to convert the warning message to error message in ME51N Tcode?

former_member782353
Discoverer
0 Kudos

I am saving the PR in ME51N while saving I got a warning message like purchase document not yet released.

I want to know how to convert that warning message into error message? Already checked in the SPRO standard messages didn't find out.

Please tell me any user exit is available to convert the message.

7 REPLIES 7

former_member199306
Participant
0 Kudos

Hi,

Please check User Exit - ZXM02U05 if it solve your purpose.

Regards,

0 Kudos

you can also check function module - ME_REL_STRATEGIE_EBAN and do the enhancement.

swathi
Explorer
0 Kudos

HI

Please go through the function module ME_REL_STRATEGIE_EBAN &

Use FM FC_POPUP_ERR_WARN_MESSAGE

In this FM, just uncheck the field IS_ERROR and give your message title and message text.

Thank You

0 Kudos

Hi Swathi

Unable to find the message where it is getting triggered while debugging. Could you please provide where I need to put an exact breakpoint to find the message.

Thanks & Regards

0 Kudos

please provide your breakpoint at FM.

Thank you.

0 Kudos

and check for line by line execution in debugger mode.U'll find how it'll work

former_member688242
Participant
0 Kudos

You Question is: How to convert message log to error message:

Please use the below link: link

You will have to understand the Application Message Logging concept first. The messages are linked through Message Log and Message Handle. You need to first LOAD the corresponding Message Handle, then ADD your custom message to the Log opened by LOAD FM. Then you save the Log using SAVE FM.

You Question is: Question related to validation of PR

or you can use badi ME_PROCESS_REQ_CUS will do validation before you saving PReq , if any errors duing the validation then you can stop user from saving the document.

please check documentation and sample codes of this badi.

With its methods, the BAdI covers the complete transaction cycle for the purchase requisition. As a result, you can intervene at each step in the processing with an implementation of your own.

1.Transaction start

BAdI method INITIALIZE

2.Opening of a purchase requisition

BAdI method OPEN

3.Checking of data

Header data of purchase requisition

BAdI method PROCESS_HEADER

Item data of purchase requisition

BAdI method PROCESS_ITEM

Account assignments in der purchase requisition

BAdI method PROCESS_ACCOUNT "