Skip to Content
author's profile photo Former Member
Former Member

Enter Button skips code

Hi Experts,

I have a clarification in code. In SD Module in the object "MV45AFZZ" there is some custom code to pop up a warning message if a user tries to create/modify a contract through VA41/VA42 tcodes with existing data.

This logic works when the save button is pressed.

When we press the enter button, the code is skipped and flow continues leading to saving of the data which is not the expectation.

At the point of pressing enter the SY-UCOMM value is 'SICH' and 'SY-DYNNR' value is '4001' same as for Save.

Can anyone please help.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 01, 2018 at 07:56 PM

    Hi Shyam Nandan,

    "there is some custom code to pop up a warning message if a user tries to create/modify a contract 

    Use Authorization and allow the authorized users to use VA41 and VA42 transactions. If it is Warning Message, the message will populate in the screen, once enter button is pressed, the remaining code will execute (i.e Saving).

    "At the point of pressing enter the SY-UCOMM value is 'SICH' and 'SY-DYNNR' value is '4001' same as for Save.

    While 'Enter' action, the SY-UCOMM contains Null Value(' '). During 'Save' action, SY-UCOMM contains 'SICH' value.

    "When we press the enter button, the code is skipped and flow continues leading to saving of the data which is not the expectation.

    You can trigger Error message instead of the warning message if saving should not happen.

    Regards

    Rajkumar Narasimman

    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.