2017 Nov 04 6:21 AM
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
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
2017 Nov 20 5:07 AM
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.
2017 Nov 20 7:13 AM
2017 Nov 20 8:16 AM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |