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: 

ME21N - Custom Message

Former Member
1,636

Dear friends,

when i save the PO (ME21n or ME22n ) i want to validate Communication tab fields

for that i used user exit EXIT_SAPMM06E_012 and there include ZXM06U43 its triggered properly

i used following statements to display error message


IF I_EKKO-IHREZ IS INITIAL OR I_EKKO-UNSEZ IS INITIAL.
*    MESSAGE E030(ZLOAD).
*    MESSAGE 'Document incomplete! Please maintain LP number and order number in Communication tab' TYPE 'S'.
*    MESSAGE 'Document incomplete!' TYPE 'S'.
  mmpur_message 'E' 'ME' '040' 'Custom field not populated' '' '' ''. 

but when this part trigger another popup box comming with


Document still faulty
Do you want to put the document on hold or process data?

and also there are three buttons called HOLD EDIT CANCEL

I want to give a error message when it trigger in the status bar and document wont save.

Hope, you can understand my question...

Thanks in Advance

4 REPLIES 4

Former Member
0 Kudos
336

this is not coming from your message. If you have correct data then it should reach your message.

But message shown in your screen shot

ME 040 is "Can delivery date be met?" are u expecting that message to come ?

Former Member
0 Kudos
336

Hi,

First correct the header/item details for Document faulty case and then try the logic below

IF I_EKKO-IHREZ IS INITIAL OR I_EKKO-UNSEZ IS INITIAL.

message S030(ZLOAD).

LEAVE TO SCREEN SY_DYNNR.

*message S030(ZLOAD). " If required u this

Endif.

Here when saving the data if the condition check is true, then a message is thrown and control will be back to the screen from where you clicked the SAVE button.

and will not allow the system to SAVE the order.

Regards,

Dwaraka.S

Edited by: Dwarakanath Sankarayogi on Feb 5, 2009 10:39 AM

Former Member
0 Kudos
336

No Frends

when i comment that message line its not appear

only come with that message line

no ME 040 is i copied from this forum , that also not working

what can i do?

Former Member
0 Kudos
336

HI,

Kindly see all Header data such as vendor address and also see delivery date it must be met and must be in the future not in the past