02-17-2009 2:18 AM
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
02-17-2009 2:39 AM
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>.
02-17-2009 2:39 AM
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>.
02-17-2009 3:01 AM
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
02-17-2009 3:04 AM
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.
02-17-2009 3:09 AM
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
02-17-2009 3:32 AM
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