2016 May 20 6:41 AM
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.
2016 May 24 1:53 PM
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>.
2016 May 24 10:20 AM
2016 May 24 11:25 AM
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.
2016 May 24 11:32 AM
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.
2016 May 24 11:45 AM
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 ?
2016 May 24 11:47 AM
ok... But One place Showing wrong, another place Showing Correctly. that's why i am asking.
2016 May 24 11:37 AM
I think that the message command behaves differently depending on the context. It is mentioned in the keyword documentation if I'm not mistaken.
2016 May 24 11:44 AM
HI,
Are you talking about Context Type 'E', or I , I was used Type 'E' Only.
No doubt.
2016 May 24 12:01 PM
Check the ABAP keyword documentation, there is a page that covers the behavior of the message command depending on where it is used
2016 May 24 12:03 PM
2016 May 24 1:53 PM
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>.
2016 May 24 2:06 PM