Application Development and Automation 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: 
Read only

Error message is Showing like a information message.

former_member196331
Active Contributor
0 Likes
4,004

HI.

I need a small Clarification, Why system is behaving like this.

Requirement is: In Me28  People are Releasing the Purchase Order. Some people only display purposes , others are going to Release the purchase order.I need to Stop some users If they try to release the Po.

So, i was found that the below function module is triggering.

EXIT_SAPMM06E_012 I was written the Code like below.

MESSAGE 'You Are Not Authorized To Release Po' TYPE 'E'.


While releasing the Po, The above message is showing like information message. Not like error message.

May i know why, This place is PAI.


I Found one enhancement spot. If i written the same code. The code shows Like Error message.

this place also PAI.


May i know why this type of behaviors, particularly if i written as 'E'. Still showing Like information message.

Need small clarification.


1 ACCEPTED SOLUTION
Read only

pranay570708
Active Contributor
0 Likes
3,348

Hi,

'EXIT_SAPMM06E_012' is just for Check Customer-Specific Data Before Saving. That's why it is showing as information. You can try with exit 'EXIT_SAPMM06E_012' which is for update.


You can force display error message using macros. Try below code:

1. Include the macro

    INCLUDE mm_messages_mac.


2. To raise error,

   mmpur_message_forced  'E'   < message class>

                                        <message no>

                                       < parameter 1>'

                                      < parameter 2>

                                       < parameter 3>

                                      < parameter 4>.



HI.

I need a small Clarification, Why system is behaving like this.

Requirement is: In Me28  People are Releasing the Purchase Order. Some people only display purposes , others are going to Release the purchase order.I need to Stop some users If they try to release the Po.

So, i was found that the below function module is triggering.

EXIT_SAPMM06E_012 I was written the Code like below.

MESSAGE 'You Are Not Authorized To Release Po' TYPE 'E'.


While releasing the Po, The above message is showing like information message. Not like error message.

May i know why, This place is PAI.


I Found one enhancement spot. If i written the same code. The code shows Like Error message.

this place also PAI.


May i know why this type of behaviors, particularly if i written as 'E'. Still showing Like information message.

Need small clarification.


11 REPLIES 11
Read only

former_member196331
Active Contributor
0 Likes
3,348

Not got any suggestions.

Read only

0 Likes
3,348

Hi,

In the source code, check if there's any condition specified before calling these exits. May be while calling 'EXIT_SAPMM06E_012', some validations does not satisfy and hence not getting called.

Do a where used list check of 'EXIT_SAPMM06E_012' and look for if any conditions specified before that FM call.

Read only

0 Likes
3,348

Hi,

There is no condition in  the exit.In include i was mentioned the below code only.

**IF sy-tcode EQ 'ME28'.

**  IF sy-uname EQ ABAPuser'.

**    MESSAGE 'You Are Not Authorized To Release Po' TYPE 'E'.

**  ENDIF.

**ENDIF.

Read only

0 Likes
3,348

Wouldn't it be easier and more conform the standard to control the use of transaction code ME28 for ABAPuser with authorizations on this Tcode ?

Read only

0 Likes
3,348

ok... But One place Showing wrong, another place Showing Correctly. that's why i am asking.

Read only

Patrick_vN
Active Contributor
0 Likes
3,348

I think that the message command behaves differently depending on the context. It is mentioned in the keyword documentation if I'm not mistaken.

Read only

0 Likes
3,348

HI,

Are you talking about Context Type 'E', or I , I was used Type 'E' Only.

No doubt.

Read only

0 Likes
3,348

Check the ABAP keyword documentation, there is a page that covers the behavior of the message command depending on where it is used

Read only

0 Likes
3,348

Ok i will check it.

Read only

pranay570708
Active Contributor
0 Likes
3,349

Hi,

'EXIT_SAPMM06E_012' is just for Check Customer-Specific Data Before Saving. That's why it is showing as information. You can try with exit 'EXIT_SAPMM06E_012' which is for update.


You can force display error message using macros. Try below code:

1. Include the macro

    INCLUDE mm_messages_mac.


2. To raise error,

   mmpur_message_forced  'E'   < message class>

                                        <message no>

                                       < parameter 1>'

                                      < parameter 2>

                                       < parameter 3>

                                      < parameter 4>.



Read only

0 Likes
3,348

Ok I will check it.