Skip to Content
0

Problem with BADI ME_PROCESS_PO_CUST~PROCESS_HEADER

Nov 04, 2017 at 06:21 AM

177

avatar image
Former Member

I am facing a strange problem while putting a validation in the process_header method of the BADI ME_PROCESS_PO_CUST.

I am using the PROCESS_HEADER method of the BADI ME_PROCESS_PO_CUST. I have written a validation on the PO vendor in the method. It works fine and restricts from saving the PO, but I am facing a issue with the error message. Whenever I enter wrong vendor and hit the enter button the custom message is displayed.... But if I enter the wrong vendor and press the save button directly, it doesn't display the custom error message, instead it shows a generic error message: "Header is still faulty" MEPO(002). I find it necessary to mention here that I am using the MACRO mmpur_message_forced to throw my error and using im_header->invalidate(). Please let me know if I am doing something wrong..... Thanks in anticipation

10 |10000 characters needed characters left characters exceeded

You can restrict the message by the following.

IF sy-ucomm EQ 'MECHECKDOC' OR sy-ucomm EQ 'MESAVE'.
lt_items = im_header->get_items( ).

Regards

Sharada

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Mithun Kumar Nov 20, 2017 at 05:07 AM
1

I think the better place to do this is in the method IF_EX_ME_PROCESS_PO_CUST~CHECK, instead of PROCESS_HEADER.

Try if it helps.

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
Nov 20, 2017 at 07:13 AM
0

When the generic error is raised, if user clicks on the display message icon, is your message displayed in the list, look like standard behavior, did you also check your personal settings, look at message block.

Share
10 |10000 characters needed characters left characters exceeded