Skip to Content
0

Enter Button skips code

Jan 31 at 01:16 PM

59

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Rajkumar Narasimman Feb 01 at 07:56 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded