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: 

custom screen - do nothing on "ENTER"

Former Member
0 Kudos

I have a custom screen and it works beautifully except that when I hit ENTER, it acts as though I hit F8. How can I stop it from doing this? If it was a section screen I could put

CHECK sy-ucomm = 'ONLI'.

but I don't know how to do it in a dialog screen.

I have two buttons on my status. One is to exit and the other is to continue. ENTER exectutes the continue button but I don't want it to do that.

Regards,

Davis

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Check the Sy-ucomm of the Enter in the Debugging mode.

And write this code in PAI of the screen

CHECK SY-UCOMM NE <Enter Func code>.

5 REPLIES 5

Former Member
0 Kudos

Hi,

Check the Sy-ucomm of the Enter in the Debugging mode.

And write this code in PAI of the screen

CHECK SY-UCOMM NE <Enter Func code>.

0 Kudos

I tried that and it ends the screen. It doesn't return to the previous screen. Then I checked the attribute "Next Screen" and it was 0 so that was the issue.

Thanks for helping me realize the issue.

Davis

Sougata
Active Contributor
0 Kudos

I see what's going on if I understand you correctly.

You are trying to use the Function Key "Continue" (Green Tick) under the Standard Toolbar in your PF-Status. But this sits under the Standard Toolbar for which SAP has already by default has the Function Key setting "Enter" automatically so no developer can change it.

You should create a new button under "_Application Toolbar_" in your PF (GUI) status and then the system would automatically ask you to assign a Function Key to it. So this "Continue" button will come on the Application Toolbar area (the area under where the Title of the screen is) and the Exit button can remain in the Standard Toolbar (up at the top) where you've already defined.

Now, in your PAI flow logic you should code:


  CASE sy-ucomm.
    WHEN 'EXIT'.
* your logic...... 
      LEAVE PROGRAM.
    WHEN 'CONT'.   "<-----this is your new button under Application Toolbar
* your logic....      
  ENDCASE.

Hope this solves your issue.

Cheers,

Sougata.

Former Member
0 Kudos

Sougata, thanks for the reply but I am already doing what you suggested. For whatever reason, when I made the next screen the current screen number that took care of the issue.

Regards,

Davis

Former Member
0 Kudos

Hi

Please let me know what are the User command u placed in the PAI.

Will help me to guide u further.

Thanks & Regards,

GP