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: 

User exit MGA00001 - logic to prevent database commit of material

jimminy1
Participant
0 Kudos

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?

1 ACCEPTED SOLUTION

former_member195402
Active Contributor
0 Kudos

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

1 REPLY 1

former_member195402
Active Contributor
0 Kudos

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