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: 

Error message

Former Member
0 Kudos

Hi,

My requirement is to throw an error message on PO Creation Screen ( T-Code ME21N ).

I am using the exit ZXM06U44 (Function exit - EXIT_SAPMM06E_013).

I am using the syntax

message e030(yi) with text-001 text-002.

I have tried other message class also. but all are giving Information message.

Please suggest me some solution to this.

Regards,

Nibha

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Try using macro "mmpur_message" for issuing message in this userexit.

Sample code for your requirement.


mmpur_message 'E' 'YI' '030'
                  text-001
                  text-002
                  ' '
                  ' '.

7 REPLIES 7

Former Member
0 Kudos

Try using macro "mmpur_message" for issuing message in this userexit.

Sample code for your requirement.


mmpur_message 'E' 'YI' '030'
                  text-001
                  text-002
                  ' '
                  ' '.

0 Kudos

Hi,

your suggestion helped me to search another macro

mmpur_message_forced which threw error message in the exit ZXM06U44

But this is allowing to create a new PO rather than stopping from further processing of program.

Please help.

0 Kudos

Try using a different userexit for that transaction. It seems your error message is issued too late.

0 Kudos

hi

I had a same req few days back.. the exit I used was

SAPMM060E : Exit_SAPMM06E_017

code snippet:

IF sy-subrc NE 0.
    MESSAGE ID 'ZV' TYPE 'E' NUMBER '013' WITH i_ekko-lifnr i_ekko-bukrs.
  ENDIF.

Former Member
0 Kudos

Hi,

Try and use

errflag = 'X'.

*ELSE.

*WRITE:/ errmsg-message.

ENDIF.

ENDLOOP.

Might help you

Former Member
0 Kudos

Error message for EnjoySAP purchasing transactions are generated with the mmpur_message macro.

mmpur_message 'E' 'ZQM_COMMON' '003 var1 var2 var3 var4.

where E -> type of message (information/warning/error)

ZQM_COMMON -> message class

003 -> message number

var1, var2, var3, var4 -> different message parameters

0 Kudos

Hi,

I tried the macro mmpur_message in the exit ZXM06U44 but it is not working with message type 'E', this is again giving Information message. I have used below code

mmpur_message 'E' 'S1' 333 text-003 xekpo-matkl ' ' ' '.

This is also giving another information message System error (error in method PO_POST)

Message no. ME816.

However, this macro is working for warning message.

Please suggest me some solution.