Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 01 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 comment
    10|10000 characters needed characters exceeded