Skip to Content

User exit MGA00001 - logic to prevent database commit of material

Hello,

I have been asked to show a warning to users if they are trying to extend a material using MM01 and the material has a cross plant block (MARA-MSTAE). I am using popup_to_confirm with warning message icon and the options to Proceed or Exit. If the user presses 'Exit' I need to write logic here to get out of MM01 without creating the extended material. I am checking the answer from the popup_to_confirm fm (if lv_ans = 2 i.e. user chose EXIT). I have tried leave to transaction 'MM01' and EXIT. Both of those take me back to the main screen of MM01 but the record was created in the database.

Can anyone help with this?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Sep 21, 2015 at 09:21 AM

    Hi,

    please raise a message with exception APPLICATION_ERROR, which is defined in fm EXIT_SAPLMGMU_001. (MESSAGE ... RAISING APPLICATION_ERROR. or simple RAISE APPLICATION_ERROR.)

    Regards,

    Klaus

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.